Top Banner
Stats for Engineers Lecture 5
18

Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Mar 28, 2015

Download

Documents

Clara Huggins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Stats for Engineers Lecture 5

Page 2: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Summary From Last Time

Binomial Distribution 𝑃 (𝑋=π‘˜ )=ΒΏ(π‘›π‘˜)π‘π‘˜ (1βˆ’π‘ )π‘›βˆ’π‘˜

πœ‡=𝑛𝑝Mean and variance 𝜎 2=𝑛𝑝(1βˆ’π‘ )

Probability of number of success when you do Bernoulli trials

Poisson distribution

Probablily of randomly occurring events, given average number is

𝑃 (𝑋=π‘˜ )=π‘’βˆ’πœ†πœ†π‘˜

π‘˜!

Mean and variance

Is approximation to Binomial when n is large and p is small

Discrete Random Variables

Continuous Random Variables𝑃 (π‘Žβ‰€ 𝑋≀𝑏 )=∫

π‘Ž

𝑏

𝑓 (π‘₯ β€² )𝑑π‘₯ β€²Probability Density Function (PDF)

Uniform distribution1

2 1

2

0

otherwise1 x

𝑓 (π‘₯ )=ΒΏ

Page 3: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

1 2 3 4

18%23%

5%

54%

Poisson or not?

Which of the following is most likely to be well modelled by a Poisson distribution?

1. Number of trains arriving at Falmer every hour

2. Number of lottery winners each year that live in Brighton

3. Number of days between solar eclipses

4. Number of days until a component fails

Page 4: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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 failsNO, random events, but this is time until a random event, not the number of random events

Page 5: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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)

Time between random events / time till first random event ?

Page 6: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Exponential distributionThe continuous random variable has the Exponential distribution, with constant rate parameter if:

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:

𝑓 (𝑦 ) 𝜈=1

𝑦

𝑓 (𝑦 )={πœˆπ‘’βˆ’πœˆ 𝑦 , 𝑦>00 ,βˆ§π‘¦<0

Page 7: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Relation to Poisson distribution

The probability of no-occurrences in time is

If is the pdf for the first occurrence, then the probability of no occurrences is

ΒΏ1βˆ’π‘ƒ (first  occurrence   has   happened   by   𝑑)ΒΏ1βˆ’βˆ«

0

𝑑

𝑓 (𝑑 )𝑑𝑑

β‡’1βˆ’βˆ«0

𝑑

𝑓 (𝑑 )𝑑𝑑=π‘’βˆ’πœˆπ‘‘ β‡’βˆ«0

𝑑

𝑓 (𝑑 )𝑑𝑑=1βˆ’π‘’βˆ’πœˆπ‘‘

Solve by differentiating both sides respect to assuming constant ,

β‡’ 𝑓 (𝑑 )=πœˆπ‘’βˆ’πœˆπ‘‘The time until the first occurrence (and between subsequent occurrences) has the Exponential distribution, parameter .

If a Poisson process has constant average rate , the mean after a time is .

𝑃 (no   occurrence   by   𝑑)

Page 8: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Example

On average lightening kills three people each year in the UK, So the rate is .

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)

𝑓 (𝑑)

𝑑

E.g. Probability the time till the next death is less than one year?

∫0

1

𝑓 (𝑑 )𝑑𝑑=∫0

1

3π‘’βˆ’3 𝑑 𝑑𝑑

ΒΏ [3π‘’βˆ’ 3𝑑

βˆ’3 ]0

1

ΒΏβˆ’π‘’βˆ’ 3+1β‰ˆ0.95

Page 9: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

1 2

53%

48%

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

1. YES2. NO

Page 10: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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

Page 11: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Mean and variance of exponential distribution

πœ‡=13

𝜈=3

𝜎 2=βˆ«βˆ’βˆž

∞

𝑦2 𝑓 (𝑦 )π‘‘π‘¦βˆ’πœ‡2=∫0

∞

𝑦2πœˆπ‘’βˆ’πœˆ 𝑦 π‘‘π‘¦βˆ’ 1𝜈2 =[βˆ’ 𝑦2π‘’βˆ’πœˆ 𝑦 ]0

∞+2∫

0

∞

𝑦 π‘’βˆ’πœˆ 𝑦 π‘‘π‘¦βˆ’ 1𝜈2 =0+2

πœ‡πœˆβˆ’

1𝜈2 =

1𝜈2

𝜎𝜎

Page 12: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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 )=∫0

1000

πœˆπ‘’βˆ’πœˆ 𝑦(a) First we need to find

ΒΏ [βˆ’π‘’βˆ’πœˆ 𝑦 ]01000

ΒΏ1βˆ’π‘’βˆ’1000 𝜈

𝑃 (π‘Œ ≀1000 )=0.1β‡’1βˆ’π‘’βˆ’1000𝜈=0.1β‡’π‘’βˆ’ 1000𝜈=0.9β‡’βˆ’1000𝜈=ln 0.9=βˆ’0.10536β‡’πœˆβ‰ˆ1.05Γ—10βˆ’ 4

Page 13: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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.

Mean = = 9491 hours.Answer:

Standard deviation == = 9491 hours

Page 14: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

1 2 3 4

17%

27%27%

39%

Is it exponential?

Which of the following random variables is best modelled by an exponentialdistribution?

Question adapted from Derek Bruff

1. The distance between defects in an optical fibre

2. The number of days between someone winning the National Lottery

3. The number of fuses that blow in the UK today

4. The hours of sunshine in Brighton this week assuming an average of 7.2hrs/day

Page 15: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Is it exponential?

Which of the following random variables is best modelled by an exponentialdistribution?

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

Page 16: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

Normal distribution

The continuous random variable has the Normal distribution if the pdf is:

mean standard deviationNote: 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]

Page 17: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.

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.

If has a Normal distribution with mean and variance , write

Page 18: Stats for Engineers Lecture 5. Summary From Last Time Binomial Distribution Mean and variance Poisson distribution Mean and variance Is approximation.