lecture 12: more named continuous rv - rensselaer...

21
Lecture 12: More Named Continuous RV 2 1 Probability Theory and Applications Fall 2008 October 9 σ 2 1 σ All possible definitions of probability fall short of the actual practice. William Feller

Upload: donguyet

Post on 25-May-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Lecture 12: More Named Continuous RV 2

1

Probability Theory and ApplicationsFall 2008October 9

σ 21σ

All possible definitions of probability fall short of the actual practice. William Feller

Outline

• Exponential Review• Gamma• Uniform• Beta

PDF of named distributions

• Note you can use an applet to see what happens when you change parameters of the named distributions

http://www.causeweb.org/repository/statjava/Distributions.html

Life Length Problem

Assume X = the life length in years of my 1998 Buick Park Avenue is an exponential random variable with mean 10.

Given that the car more than14 years old, what is the prob. that it will run more than h years?

Under exponential assumption

P(X>14+h|X>14) =P(X>h)The exponential is memoryless. Doesn’t seem like right distribution.

PDF under exponential Model

0 5 10 15 20 25 30 35 40

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

x

exponential with mean 10: exp(-x/10)/10

More Realistic PDF for car model

0 5 10 15 20 25 30 35 40

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

x

x8-1 exp(-x 8/10)/((8/10)8)/γ(8)

0.25 1.258

1 0( ) 1.25 7!0 . .

x

x e xf xo w

−⎧>⎪= ⎨

⎪⎩

Under new model

Assume X = the life length in years of my 1998 Buick Park Avenue has the pdf in the previous slide (note mean is still 10)

Given that the car more than14 years old, what is the prob. that it will run more than h=2 years?

P(X>14+2|X>14) =0.4583Which is must worse than P(X>2)=0.9997

Clearly this is not a memory less distribution

Gamma Distribution

X has gamma distribution with parameters k and θ if and only if X has pdf

1

1

0

1 e 0( ) ( )

0 . .

( )

xk

k

k t

x xf x k

o w

with k t e dt

θ

θ−−

∞− −

⎧<⎪= Γ⎨

⎪⎩

Γ = ∫Exponent is special case of Gamma with k=1

Gamma

Meanin example mean=8*1.25=10

Variance

in example variance =8*1.25*1.25=12.5

Note exponential is special case of gamma with k=1

2kθ

Meaning of parmaters

• Θ is the rate parameter • k is the scale parameter

Has more effect on the variance/how much distribution spreads out

Gamma generalizes factorial

Integrate by parts:

1 1 2

0

00

1 2

00

2

0

( ) ( 1)

( 1)

0 ( 1) ( 1) ( 1)

t

t t

t t

t

e t dt u t du t dt

uv vdu dv e v e

t e e t dt

e t dt

α α α

α α

α

α α

α

α α α

∞− − − −

∞∞ − −

∞∞− − − −

∞− −

Γ = = = −

= − = = −

= − − − −

= + − − = − Γ −

Properties of Gamma

1. Generalizes factorial for α≥1

2.

3. If α=n is an integer >0

( ) ( 1) ( 1)α α αΓ = − Γ −

0

(1) 1ye dy∞

−Γ = =∫

( ) ( 1) ( 1) ( 1)( 2) ( 2)( 1)! (1)( 1)!

n n n n n nnn

Γ = − Γ − = − − Γ −= − Γ= −

Problem

In a certain city, the daily consumption of electric power in millions of kilowatt hours can be treated as a random variable having a gamma distribution with k=3 and θ=2. If the power plant has a daily capacity of 12 million kilowatt hours, what is the probability that the power supply will be inadequate on a given day?

Demand PDF

0 5 10 15 20 25 30

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

x

1/16 x2 exp(-x/2)

mean=2*3=6

Answer

The pdf is

Integrate to get probability2 / 2

12

2 / 2 / 2 / 2

12

6

1( 12)8*2

1 2 8 1616400 .062

t

t t t

P X t e dt

t e te e

e

∞−

∞− − −

≥ =

⎡ ⎤= − − −⎣ ⎦

= =

2 23

1 e 0( ) 2 (3)

0 . .

x

x xf x

o w

−⎧= <⎪= Γ⎨

⎪⎩

Probability inadequate e.g.Exceeds 12

Uniform Distribution

X ~ Uniform(a,b) a< b

Mean (a+b)/2 variance (b-a)2/12What is cdf?

1( )

0 . .

a x bf x b a

o w

⎧ = < <⎪= −⎨⎪⎩

a b

Examples of Uniform

• Alien abduction between mile marker 0 and 200. Uniform(0,200)

• X~Uniform(0,10)Find

Rewrite as P(X2-7X+10 ≥0)

10( 7)P XX

+ ≥

answer

X2-7X+10 has roots at 2 and 5

Want P(X≤2)+P(X≥5)=(2-0)/10+(10-5)/10=7/10

2 5

Beta: Generalization of Uniform

Proportion of new restaurants failing in a given city has the following pdf:

What is the probability at least 25% of the restaurants will fail?

34(1 ) 0 1( )

0 . .x x

f xo w

⎧ − = < <= ⎨⎩

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0

0.5

1

1.5

2

2.5

3

3.5

4

x

4 (1-x)3

13

.25

( .25) 4(1 ) .3164P X x dx≥ = − =∫

Beta: Generalization of Uniform

Beta with parameters α>0 β>0 lets us make custom shaped distributions for RV between 0 to 1

http://www.math.uah.edu/stat/special/Beta.xhtml

1 1

11 1

0

(1 ) 0 1( )

0 . .

( , ) (1 )

1( , )

cx x xf x

o w

Beta Integral x x

c

α β

α βα β

α β

− −

− −

⎧ − = < <= ⎨⎩

Β = −

Facts about Beta

If α and β are integers,

Find c?

In general Mean = Variance =

( ) ( )( , )( )α βα βα β

Γ ΓΒ =

Γ +

3 5(1 ) 0 1( )

0 . .4 6

1 ( ) (10 1)! 504( , ) ( ) ( ) (4 1)!(6 1)!

cx x xf x

o wBeta with

c

α βα β

α β α β

⎧ − = < <= ⎨⎩

= =Γ + −

= = = =Β Γ Γ − −

αα β+ ( 1)( )

αβα β α β+ + +

410

αα β

=+

4*10 2(4 10 1)(1 10) 125

=+ + +