Continuous Probability Distributions (PPT)

advertisement
Continuous Probability
Distributions
Continuous Random Variables and
Probability Distributions
•
•
•
•
Random Variable: Y
Cumulative Distribution Function (CDF): F(y)=P(Y≤y)
Probability Density Function (pdf): f(y)=dF(y)/dy
Rules governing continuous distributions:
 f(y) ≥ 0  y




f ( y )dy  1
 P(a≤Y≤b) = F(b)-F(a) =
 P(Y=a) = 0  a

b
a
f ( y )dy
Expected Values of Continuous RVs

Expected Value :   E (Y )   yf ( y )dy (assuming absolute convergenc e)

E g (Y )   g ( y ) f ( y )dy




   y  2 y    f ( y )dy   y f ( y )dy  2  
 E Y  2  (  )   (1)  E Y  

Variance :   V (Y )  E (Y  E (Y ))   ( y   ) 2 f ( y )dy 
2
2


2

2

2

2
2
2



yf ( y )dy   2  f ( y )dy 

2
E aY  b   (ay  b) f ( y )dy  a  yf ( y )dy  b  f ( y )dy 






 a (  )  b(1)  a  b


V aY  b  E (aY  b)  E (aY  b)   
2





2

(ay  b)  (a  b)  f ( y )dy 

  (ay  a ) 2 f ( y )dy  a 2  ( y   ) 2 f ( y )dy  a 2V (Y )  a 2 2
 aY b  a 
Example – Cost/Benefit Analysis of
Sprewell-Bluff Project (I)
• Subjective Analysis of Annual Benefits/Costs of
Project (U.S. Army Corps of Engineers assessments)
• Y = Actual Benefit is Random Variable taken from a
triangular distribution with 3 parameters:
 A=Lower Bound (Pessimistic Outcome)
 B=Peak (Most Likely Outcome)
 C=Upper Bound (Optimistic Outcome)
 6 Benefit Variables
 3 Cost Variables
Source: B.W. Taylor, R.M. North(1976). “The Measurement of Uncertainty in Public Water Resource
Development,” American Journal of Agricultural Economics, Vol. 58, #4, Pt.1, pp.636-643
Example – Cost/Benefit Analysis of
Sprewell-Bluff Project (II) ($1000s, rounded)
Benefit/Cost
Pessimistic (A) Most Likely (B) Optimistic (C)
Flood Control (+)
850
1200
1500
Hydroelec Pwr (+)
5000
6000
6000
Navigation (+)
25
28
30
Recreation (+)
4200
5400
7800
Fish/Wildlife (+)
57
127
173
Area Redvlp (+)
0
830
1192
Capital Cost (-)
-193K
-180K
-162K
Annual Cost (-)
-7000
-6600
-6000
Operation/Maint(-)
-2192
-2049
-1742
Example – Cost/Benefit Analysis of SprewellBluff Project (III) (Flood Control, in $100K)
Triangular Distribution with:
lower bound=8.5
Peak=12.0
8.5  y  12.0
k ( y  8.5) 3.5

f ( y )  k (15.0  y ) / 3.0 12.0  y  15.0
0
elsewhere ( y  8.5, y  15.0)

upper bound=15.0
Triangular Distribution (Not Scaled)
1
0.9
Choose k  area under density curve is 1:
0.8
0.7
Area above 12.0 is 0.5((15.0-12.0)k) = 1.50k
Total Area is 3.25k  k=1/3.25
Probability Density
Area below 12.0 is: 0.5((12.0-8.5)k) = 1.75k
0.6
0.5
0.4
0.3
0.2
0.1
0
8
8.5
9
9.5
10
10.5
11
11.5
12
12.5
Flood Control Benefits ($100K)
13
13.5
14
14.5
15
15.5
16
Example – Cost/Benefit Analysis of
Sprewell-Bluff Project (IV) (Flood Control)
( y  8.5) 11.375 8.5  y  12.0

f ( y )  (15.0  y ) / 9.75 12.0  y  15.0
0
elsewhere

y  8.5  F ( y )  0

8.5  y  12  F ( y )   (t  8.50) 11.375 dt  (1/11.375)  t 2   8.5t
y
8.5

 y 2  8.5 y   8.5 2  8.5  11.375   y
2
2
2
2
2

y

8.5
 17 y  8.52  22.75

12  y  15  F ( y )  F (12)   (15  t ) 9.75 dt  .5385  (1/ 9.75) 15t   t 2 
y

12


 .5385  15 y   y 2 2   15(12)  12 2 2  9.75 
 .5385   216  30 y  y 2  19.5 12  y  15
y  15  F ( y )  1
2

y
12

Example – Cost/Benefit Analysis of
Sprewell-Bluff Project (V) (Flood Control)
( y  8.5) 11.375 8.5  y  12.0

f ( y )  (15.0  y ) / 9.75 12.0  y  15.0
0
elsewhere

y  8.5
0
3.175824  0.747253 y  0.043956 y 2
8.5  y  12

F ( y)  
2

10
.
538462

1
.
538462
y

0
.
051282
y
12  y  15


y  15
1
Example – Cost/Benefit Analysis of Sprewell-Bluff Project (VI) (Flood Control)
Cumulative Distribution Function
1
0.9
0.8
0.7
F(y)
0.6
0.5
0.4
0.3
0.2
0.1
0
8
8.5
9
9.5
10
10.5
11
11.5
12
y
12.5
13
13.5
14
14.5
15
15.5
16
Example – Cost/Benefit Analysis of Sprewell-Bluff Project
(VII) (Flood Control)
12
15
15  15  y 
 y3
 15 y 2
8.5 y 2 
y3 
 y  8.5 
E (Y )   yf ( y )dy   y 
dy   y 
dy  


 
 



8. 5
12
9
.
75
11
.
375
29
.
25
19
.
5
22
.
75
34
.
125





 8.5 
 12

12
 123
8.5(12) 2   8.53 8.53   153
153   15(12) 2
123 
  
  
  
 
 




29
.
25
19
.
5
29
.
25
19
.
5
22
.
75
34
.
125
22
.
75
34
.
125
 
 
 


 59.08  62.77   21.00  31.49   148.35  98.90   94.95  50.64  
 3.69  10.49  49.45  44.41  11.84
 
E Y2
12
15
15
 y 4 8.5 y 3 
 15 y 3
y4 
2
2  y  8.5 
2  15  y 
  y f ( y )dy   y 
dy   y 
dy   

 
 



8.5
12
9
.
75
11
.
375
39
29
.
25
34
.
125
45
.
5





 8. 5 
 12

12
 12 4 8.5(12)3   8.54 8.54   154
154   15(12) 3 12 4 
  
  
  
 
 




39
29
.
25
39
29
.
25
34
.
125
45
.
5
34
.
125
45
.
5
 
 
 


 531.69  502.15  133.85  178.46   1483.52  1112.64  759.56  455.74  
 29.54  44.61  370.88  303.82  141.21
 
 V (Y )  E Y 2  E (Y )  141.21  11.84 2  141.21  140.19  1.02
   1.02  1.01
2
Uniform Distribution
• Used to model random variables that tend to occur
“evenly” over a range of values
• Probability of any interval of values proportional to its
width
• Used to generate (simulate) random variables from
virtually any distribution
• Used as “non-informative prior” in many Bayesian
analyses
 1
 b  a
f ( y)  

0
a yb
elsewhere
0
ya
F ( y)  
b  a
1
ya
a yb
yb
Uniform Distribution - Expectations
E (Y )  
b
a
 
E Y2  
 1 
 1 y
y
dy  

ba
ba 2
b
a
2 b
a
b 2  a 2 (b  a )(b  a ) b  a



2(b  a )
2(b  a )
2
3 b
 1 
 1 y
y2
dy




ba
ba 3
a
b 3  a 3 (b  a )( a 2  b 2  ab)



3(b  a )
3(b  a )
(a 2  b 2  ab)

3
(a 2  b 2  ab)  b  a 
2
2
 V (Y )  E Y  E (Y ) 



3
 2 
 
2
4(a 2  b 2  ab)  3(b 2  a 2  2ab) a 2  b 2  2ab (b  a ) 2



12
12
12
(b  a ) 2 b  a
 

 0.2887(b  a )
12
12
Exponential Distribution
• Right-Skewed distribution with maximum at y=0
• Random variable can only take on positive values
• Used to model inter-arrival times/distances for a
Poisson process
 1  y /
 e

f ( y)  
0


F ( y)  
y
0
1

e
t 
y0
elsewhere
1
dt 
1 
 1  t 
 e
 
y
0


 e  y    e  0  1  e  y 
y0
Exponential Density Functions (pdf)
Exponential pdf's
1.2
1
f(y)
0.8
f(y|th=1)
f(y|th=2)
f(y|th=5)
f(y|th=10)
0.6
0.4
0.2
0
0
1
2
3
4
5
y
6
7
8
9
10
Exponential Cumulative Distribution Functions (CDF)
Exponential CDF
1
0.9
0.8
0.7
F(y)
0.6
F(y|th=1)
F(y|th=2)
F(y|th=5)
F(y|th=10)
0.5
0.4
0.3
0.2
0.1
0
0
3
6
9
y
12
15
Gamma Function

( )   y  1e  y dy
0

(  1)   y  e  y dy Integratin g by Parts :
0
u  y   du  y  1dy
dv  e  y dy  v  e  y

 y 
 (  1)   y e dy  uv   vdu   y e
 y
0
0

  y  1e  y dy 
0

 0  (0)    y  1e  y dy  ( ) (Recursive Property)
0
Note that if  is an integer, ( )  (  1)!
Consider t he integral :


0
y  1e  y  dy
Letting x  y  :
 y  x  dy  dx

 y
0
 1  y 
e
EXCEL Function:

dy   ( x )
0
 1  x
e dx  
=EXP(GAMMALN(



0
x 1e  x dx    ( )
Exponential Distribution - Expectations
E (Y )  

0

E Y
2
1

(2) 2   (2  1)!  
 

0

1


1  y 
 1 y  
2 1  y 
y e
dy

ye
dy

y
e dy 



0
 0



1  2 y 
 1 y  
31  y 
y  e
dy

y
e
dy

y
e dy 



0
 0


2
(3) 3   2 (3  1)!  2 2
 V (Y )  E Y 2   E (Y )  2 2  ( ) 2   2
 
2
Exponential Distribution - MGF
M (t )  E etY   

0

1


0
e
 1t 
 y

  
1

1   y   t 
ty  1  y  
e  e
dy
dy  0 e



dy 
1


0
e
y *
1  1  y * 
 M (t ) 
e
* 
0
1    
dy
where  

1  t
*
*
1
  (0  1) 

 (1  t ) 1

 1  t
M ' (t )  1(1  t )  2 ( )   (1  t )  2
M ' ' (t )  2 (1  t ) 3 ( )  2 2 (1  t ) 3
 E (Y )  M ' (0)  
 V (Y )  M ' ' (0)  M ' (0)  2 2   2   2
2
*
Exponential/Poisson Connection
• Consider a Poisson process with random variable X being
the number of occurences of an event in a fixed time/space
X(t)~Poisson(lt)
• Let Y be the distance in time/space between two such
events
• Then if Y > y, no events have occurred in the space of y
Exponentia l " Survival ": P (Y  y )  e  y 
e  ly ( l y ) 0
Poisson Probabilit y : P ( X ( y )  0) 
 e  ly
0!
 l  1  Inter - arrivals distances in Poisson Process are Exponentia l with mean   1 l
Gamma Distribution
•
•
•
•
Family of Right-Skewed Distributions
Random Variable can take on positive values only
Used to model many biological and economic characteristics
Can take on many different shapes to match empirical data
 1
 1  y 
 ( )   y e

f ( y)  
0


y  0,  ,   0
otherwise
Obtaining Probabilities in EXCEL:
To obtain: F(y)=P(Y≤y)
Use Function:
=GAMMADIST(y,,,1)
Gamma/Exponential Densities (pdf)
Exponential and Gamma density functions
0.5
0.4
0.3
exp(2.0)
f(y)
exp(5.0)
gam(2,2)
gam(2,3)
gam(3,2)
0.2
0.1
0
0
2
4
6
y
8
10
Gamma Distribution - Expectations
 

1
1
 1  y  
 y 

E (Y )   y
y
e
dy

y
e dy 

 0

0
( ) 
 ( ) 


1
1
(  1) 
( 1) 1  y 
 1

y
e dy 
(  1)  

 0

( ) 
( ) 
( )
( ) 

 
( )


1
1
 1  y  
 1  y 

E Y   y 
y
e
dy

y
e dy 

 0

0
( ) 
 ( ) 


1
1
(  2)  2
(  2 ) 1  y 
 2

y
e dy 
(  2) 


 0

( ) 
( ) 
( )
 
2

2
(  1)(  1)  2 (  1)( )  2


 (  1)
( )
( )
 
 V (Y )  E Y 2  E (Y )  (  1)  ( ) 2   2  2   2   2  2   2
   
2
Gamma Distribution - MGF
  
M (t )  E e
tY

0


1
 1  y  
dy 
ety 
y
e

 ( ) 

1 
 y  t 
 1
 

 1 t 
 y 

 1
  
1
1
y
e
dy

y e
 0
 0
( ) 
( ) 

1

 1  y  *
*

y e
dy
where  
 0
( ) 
1  t
1
* 

 M (t ) 

(

)


(
1


t
)
( )  

dy
 
M ' (t )   (1  t )  1 (  )   (1   t )  1
M ' ' (t )  (  1) (1   t )   2 (  )   (  1)  2 (1  t )   2
 E (Y )  M ' (0)  
 V (Y )  M ' ' (0)  M ' (0)   (  1)  2  ( ) 2   2
2
Gamma Distribution – Special Cases
• Exponential Distribution – 1
• Chi-Square Distribution – n/2, 2 (n ≡ integer)
–
–
–
–
E(Y)=n V(Y)=2n
M(t)=(1-2t)-n/2
Distribution is widely used for statistical inference
Notation: Chi-Square with n degrees of freedom:
Y ~ n
2
Normal (Gaussian) Distribution
• Bell-shaped distribution with tendency for individuals to
clump around the group median/mean
• Used to model many biological phenomena
• Many estimators have approximate normal sampling
distributions (see Central Limit Theorem)
f ( y) 
1
2
2
e
1 ( y  )2

2 2
   y  ,       ,   0
Obtaining Probabilities in EXCEL:
To obtain: F(y)=P(Y≤y)
Use Function:
=NORMDIST(y,,,1)
Normal Distribution – Density Functions (pdf)
Normal Densities
0.045
0.04
0.035
0.03
N(100,400)
0.025
f(y)
N(100,100)
N(100,900)
N(75,400)
0.02
N(125,400)
0.015
0.01
0.005
0
0
20
40
60
80
100
y
120
140
160
180
200
Normal Distribution – Normalizing Constant

Consider t he integral :  e

( y  )2
2 2

Changing variables : z 

k  e

( y  )2
2
2


y
dy   e


z2
2

dy  k

(we want to solve for k )
dz 1
  dy  dz
dy 
dz 
k


 e


z2
2
dz
  1
  2
   z12  z 22 
k
2
2
     e dz1  e dz 2    e 2
dz1dz 2


 

 
Changing to Polar Co - Ordinates :
z1  r cos  , z 2  r sin  with domains : r  (0, ),   [0,2 ) and dz1dz 2  rdrd
z2
2
z2
1
   z12  z 22 
2   r 2 cos 2   sin2  
2   r 2
k
2
2
dz1dz 2    e
rdrd     e 2 rdrd 
    e
0
0
0
0
 
2
2
1
  e

1
 r2
2
0
2
r 0
1
1
2
2
2
0
0
0
d   (0  (1)) d   d  
k
    2  k 2  2 2  k  2 2
 
 2
(cos 2   sin 2   1)
Obtaining Value of 1/2

From Previous slide, we get :  e
z2 2

dz  2
1
 e
dz    2
0
2

 1   1 2 1 u
Now, Consider :     u
e du  u 1 2 e u du
0
2 0

z2 2
z2
Changing Variables : u 
 du  zdz
2
 1   z
     
2 0  2
2

 2 e
0
z2 2



1 2
e
z2 2
zdz  

0
 1  z2 2
2  e
zdz 
z
1
dz  2   2  
2
Normal Distribution - Expectations
1  12 z 2
Z ~ N (0,1)  f ( z ) 
e
2
 
1
E ( Z )   z 
e

 2
1
 z2
2

1
dz 

2



ze

1
 z2
2
dz 
1
2

 e


1
 z2
2


  0  (0)  0

 
1
 1  12 z 2 
 1   2  2 z2
dz  2
E Z   z 
e
  z e dz


 2  0
 2

1
Changing Variables : u  z 2  du  2 zdz  du  zdz
2
1
2   12 z 2
2 
 1   2  2 z2
u 2  1 
 2
ze
zdz

u
e
  z e dz 
 du 


0
0
0
2
2
2
 2 
 
2

1

2
2


0
u
3 2 1
e
 
Note : If Y ~ N  ,  
u 2
1
1
3
du 
  2 3 2 
2  2 
2
 V ( Z )  E Z 2  E ( Z )  1  0 2  1    1
2
then Y    Z
 E (Y )  E (   Z )    E ( Z )     (0)  
2
 V (Y )  V (   Z )   2V ( Z )   2 (1)   2
32

 1   1  3/ 2 2

2

1
   
2 2
2 2
Normal Distribution - MGF
 1
 1  y   2  
1
dy 
M (t )  E e   e 
exp 

2
 2 2


2 2
 2 



 y2
1
y (   t 2 )  2 

exp  2 
 2 dy
2
2  
2


2 
2

 

tY
ty
 y2

y  2
exp




ty

  2 2  2 2 2 dy 

 
Completing the square : (   t 2 ) 2   2  2 t 2  t 2
2
 
 
2
2
 y 2
y (   t 2 )  2 2 t 2  t 2
2 t 2  t 2 
 M (t ) 
exp  2 
 2

dy 
2
2
2
2  

2
2
2
 2

2
2
2
 y 2

1
y (   t 2 )  2  2 t 2  t 2
2 t 2  t 2 

exp  2 


dy 
2
2
2
2  
2


2

2



2
 1  y  (   t 2 ) 2  2 t 2  t 2 2 

1


exp  
dy 
2
2
2  


2

2

2
 


 1  y  (   t 2 ) 2 
 2 t 2  t 2 2  
1
dy
 exp 
exp  

2
2
2


2



2
 2 

The last integral being 1, since it is integratin g over the density of a normal R.V. : Y ~ N   t 2 ,  2
1

 


 

 
    exp t  t 
 2 t 2  t 2
 M (t )  exp 
2 2

2
2




 




2 
2

Normal(0,1) – Distribution of Z2
 
 1 z
M Z 2 (t )  E etZ   etz 
e

 2

2

2
2


0
e
 1 2 t 
z2 

 2 
2
dz 
2


0
2
2
e
1

dz 
2

 2 
z2 

 1 2 t 


e

Changing Variables : u  z  z  u and dz 
 M Z 2 (t ) 
2

0
e
 2 
u 

 1 2 t 
12
1
 1  2 

 

2  2  1  2t 
 Z 2 ~ 12
1
1
du 
2 u
2
dz 
dz
1
2

1 
 z 2  t 
2 


0
u
2 u
du
 2 
1

1 u 
 1 2 t 
2
e
du 
 2

(1  2t ) 1 2  (1  2t ) 1 2
2
Beta Distribution
• Used to model probabilities (can be generalized to
any finite, positive range)
• Parameters allow a wide range of shapes to model
empirical data
 (   )  1
 1
y
(
1

y
)
0  y  1,  ,   0
 ( )(  )

f ( y)  
0
otherwise


Obtaining Probabilities in EXCEL:
To obtain: F(y)=P(Y≤y)
Use Function:
=BETADIST(y,a,b)
Beta Density Functions (pdf)
Beta Density Functions
4.5
4
3.5
3
Beta(1,1)
2.5
f(y)
Beta(2,2)
Beta(4,1)
Beta(1,3)
2
Beta(5,5)
1.5
1
0.5
0
0
0.1
0.2
0.3
0.4
0.5
y
0.6
0.7
0.8
0.9
1
Weibull Distribution

0

F ( y)  

  y
1  exp  

 
y0



y  0 ( ,   0)
  y
dF ( y )
  1 
f ( y) 
   y   exp  
dy


 
   1    y 
  y exp  
   
 
 


for y  0
   1    y   
E (Y )   y  y exp    dy
0
 
     
y
y  1
Changing variables : u 
 du 
dy and y  (u )1 



   1    y   


 1
 E (Y )   y  y exp    dy   (u )1  e u du   1   u1  e u du   1  1  
0
0
0
 
 
     

   y    




2
2
2 
 1
 E Y   y  y exp    dy   (u ) 2  e u du   2   u 2  e u du   2  1  
0
0
0
 
 
     

 
 
 1 
2
2
 V (Y )  E Y 2  E (Y )   2  1     2 1  
  
  
 
Note: The EXCEL function WEIBULL(y,*,* uses parameterization: *=, *
Weibull Density Functions (pdf)
Weibull pdf's
1.2
1
f(y)
0.8
W(1,1)
W(1,2)
W(2,1)
W(2,2)
0.6
0.4
0.2
0
0
1
2
3
4
5
y
6
7
8
9
10
Lognormal Distribution
1  log y   

 

1
2 


e
 2y 2 2

f ( y)  
0



Note : Y *  ln( Y ) ~ N  ,  2

2
y  0,      ,   0
otherwise

 

 2 12     2 2 
  e
E (Y )  E e  M Y * (t  1)  exp   (1) 
2 


 2 22
2
Y* 2
2Y *
EY E e
Ee
 M Y * (t  2)  exp   (2) 
2

 
Y*
 
  
    e 
 
 V (Y )  E Y   E (Y )  e 
2
2
2   2
  e 2  
Obtaining Probabilities in EXCEL:
To obtain: F(y)=P(Y≤y)
Use Function:


2   2
2
=LOGNORMDIST(y,,)

Lognormal pdf’s
Lognormal pdf's
1.2
1
f(y)
0.8
LN(0,1)
LN(0,4)
LN(1,1)
LN(1,4)
0.6
0.4
0.2
0
0
1
2
3
4
y
5
6
7
8
Download