Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stats for Engineers Lecture 5

Similar presentations


Presentation on theme: "Stats for Engineers Lecture 5"β€” Presentation transcript:

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.

18


Download ppt "Stats for Engineers Lecture 5"

Similar presentations


Ads by Google