* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Lecture 5: Exponential distribution
Survey
Document related concepts
Transcript
Stats for Engineers Lecture 5 Summary From Last Time Discrete Random Variables Binomial Distribution ๐ ๐ ๐ 1โ๐ ๐ ๐ ๐=๐ = ๐โ๐ Probability of number of ๐ success when you do ๐ Bernoulli trials Mean and variance Poisson distribution ๐ 2 = ๐๐(1 โ ๐) ๐ = ๐๐ ๐ โ๐ ๐๐ ๐ ๐=๐ = ๐! Probablily of ๐ randomly occurring events, given average number is ๐ Mean and variance ๐=๐ ๐ 2 = var ๐ = ๐ Is approximation to Binomial when n is large and p is small Continuous Random Variables Probability Density Function (PDF) ๐(๐ฅ) Uniform distribution ๏ฌ 1 ๏ฏ ๐ ๐ฅ = ๏ญ๏ฑ 2 ๏ญ ๏ฑ 1 ๏ฏ ๏ฎ0 ๐ ๐ ๐ฅ โฒ ๐๐ฅโฒ ๐ ๐โค๐โค๐ = ๐ ๏ฑ1 ๏ฃ x ๏ฃ ๏ฑ 2 otherwise Poisson or not? Which of the following is most likely to be well modelled by a Poisson distribution? 1. 2. 3. 4. Number of trains arriving at Falmer every hour Number of lottery winners each year that live in Brighton Number of days between solar eclipses Number of days until a component fails 54% 23% 18% 5% 1 2 3 4 Are they Poisson? Answers: 1. Number of trains arriving at Falmer every hour NO, (supposed to) arrive regularly on a timetable not at random 2. Number of lottery winners each year that live in Brighton Yes, is number of random events in fixed interval 3. Number of days between solar eclipses NO, solar eclipses are not random events and this is a time between random events, not the number in some fixed interval 4. Number of days until a component fails NO, random events, but this is time until a random event, not the number of random events Time between random events / time till first random event ? If a Poisson process has constant average rate ๐, the mean after a time ๐ก is ๐ = ๐๐ก. What is the probability distribution for the time to the first event? โ Exponential distribution Poisson - Discrete distribution: P(number of events) Exponential - Continuous distribution: P(time till first event) Exponential distribution The continuous random variable ๐ has the Exponential distribution, with constant rate parameter ๐ if: ๐ ๐ฆ = ๐๐ 0, โ๐๐ฆ , ๐ฆ>0 ๐ฆ<0 ๐(๐ฆ) ๐=1 ๐ฆ Occurrence 1) Time until the failure of a part. 2) Separation between randomly happening events - Assuming the probability of the events is constant in time: ๐ = const Relation to Poisson distribution If a Poisson process has constant average rate ๐, the mean after a time ๐ก is ๐ = ๐๐ก. The probability of no-occurrences in time ๐ก is ๐ โ๐ ๐๐ ๐ ๐=0 = = ๐ โ๐ = ๐ โ๐๐ก . ๐! If ๐(๐ก) is the pdf for the first occurrence, then the probability of no occurrences is ๐(no occurrence by ๐ก) = 1 โ ๐(first occurrence has happened by ๐ก) ๐ก =1โ ๐ ๐ก ๐๐ก 0 ๐ก ๐ก ๐ ๐ก ๐๐ก = ๐ โ๐๐ก โ1โ 0 ๐ ๐ก ๐๐ก = 1 โ ๐ โ๐๐ก โ 0 Solve by differentiating both sides respect to ๐ก assuming constant ๐, ๐ ๐ก ๐ ๐ ๐ก ๐๐ก = 1 โ ๐ โ๐๐ก ๐๐ก 0 ๐๐ก โ ๐ ๐ก = ๐๐ โ๐๐ก The time until the first occurrence (and between subsequent occurrences) has the Exponential distribution, parameter ๐. Example On average lightening kills three people each year in the UK, ๐ = 3. So the rate is ๐ = 3/year. Assuming strikes occur randomly at any time during the year so ๐ is constant, time from today until the next fatality has pdf (using ๐ก in years) ๐ ๐ก = ๐๐ โ๐๐ก = 3 ๐ โ3๐ก ๐(๐ก) E.g. Probability the time till the next death is less than one year? 1 1 3 ๐ โ3๐ก ๐๐ก ๐ ๐ก ๐๐ก = 0 0 3๐ โ3๐ก = โ3 ๐ก 1 0 = โ๐ โ3 + 1 โ 0.95 Exponential distribution Question from Derek Bruff A certain type of component can be purchased new or used. 50% of all new components last more than five years, but only 30% of used components last more than five years. Is it possible that the lifetimes of new components are exponentially distributed? 1. YES 2. NO 53% 48% 1 2 Exponential distribution A certain type of component can be purchased new or used. 50% of all new components last more than five years, but only 30% of used components last more than five years. Is it possible that the lifetimes of new components are exponentially distributed? Exponential distribution models time between independent randomly occurring events, where frequency of events is independent of time. i.e. probability of failing in the first 5 years has to be same as the probability of failing in any other period of 5 years. No memory property. The observed lifetimes imply that instead the failure rate must increase with time NOT exponential Mean and variance of exponential distribution โ ๐= โ ๐ฆ๐๐ โ๐๐ฆ ๐๐ฆ = โ๐ฆ๐ โ๐๐ฆ ๐ฆ ๐ ๐ฆ ๐๐ฆ = โโ โ 0 โ โ 0 + โ 0 โ๐๐ฆ ๐ ๐ โ๐๐ฆ ๐๐ฆ = โ ๐ 1 ๐ = ๐ฆ ๐ ๐ฆ ๐๐ฆ โ ๐ = ๐ฆ ๐๐ ๐๐ฆ โ 2 ๐ โโ 0 โ 1 ๐ 1 1 2 โ๐๐ฆ โ โ๐๐ฆ = โ๐ฆ ๐ ๐ฆ๐ ๐๐ฆ โ 2 = 0 + 2 โ 2 = 2 0 +2 ๐ ๐ ๐ ๐ 0 2 ๐ 2 2 ๐ ๐=3 ๐= 1 3 2 โ๐๐ฆ โ = 0 1 ๐ Example: Reliability The time till failure of an electronic component has an Exponential distribution and it is known that 10% of components have failed by 1000 hours. (a) What is the probability that a component is still working after 5000 hours? (b) Find the mean and standard deviation of the time till failure. Answer Let Y = time till failure in hours; ๐ ๐ฆ = ๐๐ โ๐๐ฆ . 1000 (a) First we need to find ๐ ๐๐ โ๐๐ฆ ๐ ๐ โค 1000 = 0 = โ๐ โ๐๐ฆ ๐ ๐ โค 1000 = 0.1 โ 1000 0 = 1 โ ๐ โ1000๐ 1 โ ๐ โ1000๐ = 0.1 โ ๐ โ1000๐ = 0.9 โ โ1000๐ = ln 0.9 = โ0.10536 โ ๐ โ 1.05 × 10โ4 If ๐ is the time till failure, the question asks for ๐(๐ > 5000): โ ๐๐ โ๐๐ฆ ๐๐ฆ ๐ ๐ > 5000 = 5000 = โ๐ โ๐๐ฆ โ 5000 = ๐ โ5000๐ โ 0.59 (b) Find the mean and standard deviation of the time till failure. Answer: Mean = 1/๐ = 9491 hours. Standard deviation = Variance = 1 ๐2 = 1/๐ = 9491 hours Is it exponential? Which of the following random variables is best modelled by an exponential distribution? Question adapted from Derek Bruff 1. 2. 3. 4. The distance between defects in an optical fibre The number of days between someone winning the National Lottery The number of fuses that blow in the UK today The hours of sunshine in Brighton this week assuming an average of 7.2hrs/day 39% 27% 27% 17% 1 2 3 4 Is it exponential? Which of the following random variables is best modelled by an exponential distribution? 1. The distance between defects in an optical fibre - YES: continuous distribution that is the separation between independent random events (the location of the defects) 2. The number of days between someone winning the National Lottery - NO: continuous (if you allow fractional days), but draws happen regularly on a schedule 3. The number of fuses that blow in the UK today - NO: this is a discrete distribution โ the number of events is a Poisson distribution (exponential is the distribution of times between events) 4. The hours of sunshine in Brighton this week assuming an average of 7.2hrs/day - NO: This is a continuous variable, but not the time between independent random events Normal distribution The continuous random variable ๐ has the Normal distribution if the pdf is: 1 ๐ ๐ฅ = 2๐๐ 2 ๐: mean ๐ โ ๐ฅโ๐ 2 2๐2 (โโ < ๐ฅ < โ) ๐: standard deviation Note: The distribution is also sometimes called a Gaussian distribution X lies between ๐- 1.96 and ๐+ 1.96 with probability 0.95 ๐ i.e. X lies within 2 standard deviations of the mean approximately 95% of the time. โ ๐ ๐ฅ ๐๐ฅ = 1 โโ [see notes for proof] If ๐ has a Normal distribution with mean ฮผ and variance ๐ 2 , write ๐ โผ ๐ ๐, ๐ 2 Occurrence of the Normal distribution 1) Quite a few variables, e.g. distributions of sizes, measurement errors, detector noise. (Bell-shaped histogram). 2) Sample means and totals - see later, Central Limit Theorem. 3) Approximation to several other distributions - see later.