Exponential and Gamma Distributions

advertisement
Exponential and Chi-Square
Random Variables
Recall Poisson R. V.
• In a fixed time interval of length T, if there are an
average of l arrivals, then “number of arrivals”
has a Poisson distribution:
p( y) 
y l
l e
y!
where y = 0, 1, 2, …
Similarly, given the average number of arrivals
per unit time, say in l* arrivals per minute…
Poisson R. V.
• …then in T minutes, we expect l*T arrivals,
and so “number of arrivals” in T minutes has a
Poisson distribution:
(l T ) e
p( y ) 
y!
*
y
 l *T
where y = 0, 1, 2, …
Consider the time between arrivals. That is,
consider the “inter-arrival times”.
0.2 arrivals per minute
• If customers arrive at an average of 0.2 arrivals
per minute, find the probability of 3 arrivals in a
10-minute period.
• Note
l*T
3 2
(2) e
= 2 arrivals and so p(3) 
3!
• Find the probability of no arrivals in the
10-minute period.
0 2
(2) e
2
p(0) 
e
0!
Time till arrival?
• Consider W, the time until the first arrival.
Number of
customers
t
T
• W is a continuous random variable. What
can we say about its probability distribution?
Inter-arrival Distribution
• Note that F(w) = P(W < w) = 1 – P(W > w)
Number of
customers
w
t
• Time of first arrival W > w implies zero arrivals
have occurred in the interval (0, w).
• Don’t we already know this probability?
Inter-arrival times
• If the average arrivals per unit time equals l, the
probability that zero arrivals have occurred in the
interval (0, w) is given by the Poisson distribution
F(w) = P(W < w) = 1 – P(W > w)
(l w)0 e l w
 1  p(0)  1 
 1  e l w
0!
Sometimes written F (w)  1  e w / b
where b = 1/ l is the average inter-arrival time
(e.g., “minutes per arrival”).
Exponential Distribution
• A continuous random variable W whose distribution
and density functions are given by
1  e w / b , 0  w  
F ( w)  
otherwise
 0,
 1 w/ b
and
, w0
 e
f ( w)   b
 0, otherwise

is said to have an exponential distribution with
parameter (“average”) b .
Exponential Random Variables
• Typical exponential random variables may
include:
• Time between arrivals (inter-arrival times)
• Service time at a server (e.g., CPU, I/O device, or
a communication channel) in a queueing network.
• Time to failure (“lifetime”) of a component.
0.4
0.2 arrivals per minute
dgam max
(  2.5) 0.2
0
0
2
Distributions
for W,
time4 till first arrival:
x
c umulat iv e dis tribut ion
lambda = 0.2
0.2
1
0.1
0.5
0
5
10
15
0

E(W )   w(0.2e
0
0.2 w
5
10
15
)dw  5 minutes
( using integration-by-parts )
As expected, since average time is 1/0.2 = 5 minutes/arrival.
Exponential mean, variance
• If W is an exponential random variable with
parameter b the expected value and variance
for W are given by
E (W )  b and V (W )  b
Also, note that
E (W 2 )  2b 2 , and in general,
E (W n )  (n!) b n
2
Problem 4.74
• Air samples in a city have CO concentrations that
are exponentially distributed with mean 3.6 ppm.
• For a randomly selected sample, find the
probability the concentration exceeds 9 ppm.
• If the city manages its traffic such that the mean
CO concentration is reduced to 2.5 ppm, then what
is the probability a sample exceeds 9 ppm?
Problem 4.82
• The lifetime of a component is exponentially
distributed with an average b = 100 hours/failure.
• Three of these components operate independently
in a piece of equipment and the equipment fails if
at least 2 of the components fail.
• Find the probability the equipment operates for at
least 200 hours without failure.
Density Curves
f (f(y)
y) l el-lel y
1
Exponential
distributions for
some various
rates l.
dexp( x 0.2)
dexp( x 0.5) 0.5
dexp( x 1)
0
5
10
15
x
where b =
1
l
is average inter-arrival time.
Memoryless
• Note P(W > w) = 1 – P(W < w)
= 1 – (1 – e-lw) = e-lw
• Consider the conditional probability
P(W > a + b | W > a ) = P(W > a + b)/P(W > a)
• We find that
P(W  a  b | W  a )
The only
continuous
memoryless
random variable.
e  l ( a b )
 lb
 la  e
e
 P(W  b)
Gamma Distribution
• The exponential distribution is a special case of the
more general gamma distribution:
 y 1e y / b
, 0 y
 
f ( y )   b ( )
 0,
otherwise

where the gamma function is

( )   y 1e y dy
0
For the exponential, choose  = 1 and note (1) = 1.
1
dexp( x 0.2)
Gamma Density Curves
dexp( x 0.5) 0.5
dexp( x 1)
t he s hape paramet er,
0
10
15
(1)  1;
( )  (  1)(  1),   1;
(n)  (n  1)!, n  Z .
dgam max
(  1)
dgam max
(  2) 0.5
dgam max
(  3)
0
5
Gamma functionx facts:
1
0
2
4
x
1
0.5
Exponential mean, variance
• If Y has a gamma distribution with parameters
 and b the expected value and variance for
Y are given by
E (Y )  b and V (Y )  b
2
In the case of  = 1, the values for the
exponential distribution result.
Deriving the Mean
• By definition of the density function



0
1   f ( y)dy  
 1  y / b
y e
dy

b ( )

and so b ( )   y e

0
 1  y / b
dy
• Since this holds for any  > 0, note that
b
 1

(  1)   y e y / b dy
0
Deriving the Mean
• Now, consider the expected value
 1  y / b

  y

e
E (Y )   y f ( y )dy   y  
dy


0
 b ( ) 

1
 y/b
 
y
e
dy

b ( ) 0
1
= 
b  1 (  1)
b ( )
 ( )
=
b  b , as claimed.
( )
Problem 4.88
• Find E(Y) and V(Y) by inspection
given that
4 y 2e2 y , 0  y  
f ( y)  
otherwise
 0,
Chi-Square Distribution
• As another special case of the gamma distribution,
consider letting  = v/2 and b = 2, for some positive
integer v.
v / 21  y / 2
 y e
, 0 y
 v/2
f ( y)   2 (v / 2)
 0,
otherwise

This defines the Chi-square distribution. Note the
mean and variance are given by
E (Y )  (v / 2)(2)  v, V (Y )  b  2v
2
Statistical Testing
• For a sample of size n, with variance s2.
• To compare against a given value s02
• We find that the ratio (n – 1)s2/s02 has the chi-square
distribution with v = n – 1 degrees of freedom.
• Develop and test the “null hypothesis” based on the
chi-square probability distribution.
Get the details on hypothesis testing
in MAT 432 in the Spring!
Practice Problems
• Work problems:
4.69, 4.71, 4.73, 4.77, 4.78, 4.81, 4.83
Download