Download presentation
1
Stats for Engineers Lecture 5
2
Summary From Last Time Discrete Random Variables 𝑛 𝑘 𝑝 𝑘 1−𝑝 𝑛−𝑘
𝑛 𝑘 𝑝 𝑘 1−𝑝 𝑛−𝑘 Binomial Distribution 𝑃 𝑋=𝑘 = Probability of number of 𝑘 success when you do 𝑛 Bernoulli trials Mean and variance 𝜇=𝑛𝑝 𝜎 2 =𝑛𝑝(1−𝑝) 𝑃 𝑋=𝑘 = 𝑒 −𝜆 𝜆 𝑘 𝑘! Poisson distribution 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 𝑓 𝑥 =
3
Number of trains arriving at Falmer every hour
Poisson or not? Which of the following is most likely to be well modelled by a Poisson distribution? 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
4
Are they Poisson? Answers:
Number of trains arriving at Falmer every hour NO, (supposed to) arrive regularly on a timetable not at random Number of lottery winners each year that live in Brighton Yes, is number of random events in fixed interval 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 Number of days until a component fails NO, random events, but this is time until a random event, not the number of random events
5
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)
6
Exponential distribution
The continuous random variable 𝑌 has the Exponential distribution, with constant rate parameter 𝜈 if: 𝑓(𝑦) 𝜈=1 𝑓 𝑦 = 𝜈 𝑒 −𝜈𝑦 , 𝑦>0 0, & 𝑦<0 𝑦 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
7
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 𝑡 𝑓 𝑡 𝑑𝑡 = 𝑒 −𝜈𝑡 ⇒ 0 𝑡 𝑓 𝑡 𝑑𝑡=1− 𝑒 −𝜈𝑡 Solve by differentiating both sides respect to 𝑡 assuming constant 𝜈, 𝑑 𝑑𝑡 0 𝑡 𝑓 𝑡 𝑑𝑡= 𝑑 𝑑𝑡 1− 𝑒 −𝜈𝑡 The time until the first occurrence (and between subsequent occurrences) has the Exponential distribution, parameter 𝜈. ⇒ 𝑓 𝑡 =𝜈 𝑒 −𝜈𝑡
8
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? 0 1 𝑓 𝑡 𝑑𝑡= 𝑒 −3𝑡 𝑑𝑡 = 3 𝑒 −3𝑡 − =− 𝑒 −3 +1≈0.95 𝑡
9
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? Question from Derek Bruff YES NO
10
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
11
Mean and variance of exponential distribution
𝜇= −∞ ∞ 𝑦 𝑓 𝑦 𝑑𝑦 = 0 ∞ 𝑦𝜈 𝑒 −𝜈𝑦 𝑑𝑦 = −𝑦 𝑒 −𝜈𝑦 0 ∞ + 0 ∞ 𝑒 −𝜈𝑦 𝑑𝑦 = − 𝑒 −𝜈𝑦 𝜈 0 ∞ = 1 𝜈 𝜎 2 = −∞ ∞ 𝑦 2 𝑓 𝑦 𝑑𝑦 − 𝜇 2 = 0 ∞ 𝑦 2 𝜈 𝑒 −𝜈𝑦 𝑑𝑦 − 1 𝜈 2 = − 𝑦 2 𝑒 −𝜈𝑦 0 ∞ +2 0 ∞ 𝑦 𝑒 −𝜈𝑦 𝑑𝑦 − 1 𝜈 2 =0+2 𝜇 𝜈 − 1 𝜈 2 = 1 𝜈 2 𝜎 𝜎 𝜈=3 𝜇= 1 3
12
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 𝜈 = − 𝑒 −𝜈𝑦 =1− 𝑒 −1000𝜈 𝑃 𝑌≤1000 =0.1⇒ 1− 𝑒 −1000𝜈 =0.1 ⇒ 𝑒 −1000𝜈 =0.9 ⇒−1000𝜈= ln 0.9 = − ⇒𝜈≈1.05× 10 −4
13
If 𝑌 is the time till failure, the question asks for 𝑃(𝑌>5000):
𝑃 𝑌>5000 = 5000 ∞ 𝜈 𝑒 −𝜈𝑦 𝑑𝑦 = − 𝑒 −𝜈𝑦 ∞ = 𝑒 −5000𝜈 ≈0.59 (b) Find the mean and standard deviation of the time till failure. Answer: Mean = 1/𝜈 = hours. Standard deviation = Variance = 𝜈 2 =1/𝜈 = hours
14
The distance between defects in an optical fibre
Is it exponential? Which of the following random variables is best modelled by an exponential distribution? Question adapted from Derek Bruff 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
15
Is it exponential? Which of the following random variables is best modelled by an exponential distribution? The distance between defects in an optical fibre - YES: continuous distribution that is the separation between independent random events (the location of the defects) The number of days between someone winning the National Lottery - NO: continuous (if you allow fractional days), but draws happen regularly on a schedule 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) 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
16
𝑓 𝑥 = 1 2𝜋 𝜎 2 𝑒 − 𝑥−𝜇 2 2 𝜎 2 (−∞<𝑥< ∞)
Normal distribution The continuous random variable 𝑋 has the Normal distribution if the pdf is: 𝑓 𝑥 = 1 2𝜋 𝜎 2 𝑒 − 𝑥−𝜇 𝜎 (−∞<𝑥< ∞) 𝜇: mean 𝜎: standard deviation Note: The distribution is also sometimes called a Gaussian distribution X lies between 𝜇 and 𝜇 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]
17
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.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.