Exponential and Chi- Square Random Variables
Exponential and Chi-Square Random Variables
Recall Poisson R. V.
• In a fixed time interval of length T, if there are an average of arrivals, then “number of arrivals” has a Poisson distribution:
( )!
yep y
y
where y = 0, 1, 2, …
Similarly, given the average number of arrivals per unit time, say in * arrivals per minute…
Poisson R. V.
• …then in T minutes, we expect *T arrivals, and so “number of arrivals” in T minutes has a Poisson distribution:
**( )( )
!
y TT ep y
y
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.
3 2(2)(3)
3!
ep
• Note *T = 2 arrivals and so
0 22(2)
(0)0!
ep e
• Find the probability of no arrivals in the 10-minute period.
Time till arrival?
• Consider W, the time until the first arrival.
Number of customers
Tt
• 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 , 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)0( )
1 (0) 1 10!
www e
p e
Sometimes writtenwhere = 1/ is the average inter-arrival time(e.g., “minutes per arrival”).
/( ) 1 wF w e
Exponential Distribution
• A continuous random variable W whose distribution and density functions are given by
and
is said to have an exponential distribution with parameter (“average”)
/1 , 0( )
0, otherwise
we wF w
/1, 0
( )
0, otherwise
we wf w
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.2 arrivals per minute
0 5 10 15
0.1
0.2
lambda = 0.2
0 2 40
0.2
0.4
dgamma x 2.5( )
xcumulative distribution
0 5 10 15
0.5
1
0.2
0( ) (0.2 )wE W w e dw
As expected, since average time is 1/0.2 = 5 minutes/arrival.
( using integration-by-parts )
Distributions for W, time till first arrival:
5 minutes
Exponential mean, variance
• If W is an exponential random variable with parameter the expected value and variance for W are given by
2( ) and ( )E W V W
Also, note that
2 2( ) 2 , and in general,
( ) ( !)n n
E W
E W n
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 = 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
0 5 10 15
0.5
1
dexp x 0.2( )
dexp x 0.5( )
dexp x 1( )
x
f(y) e -
0 2 40
0.2
0.4
dgamma x 2.5( )
x
Exponential distributions for some various rates .
( ) yf y e
1where = is average inter-arrival time.
Memoryless
• Note P(W > w) = 1 – P(W < w)
= 1 – (1 – e-w) = e-w
• Consider the conditional probability P(W > a + b | W > a ) = P(W > a + b)/P(W > a)
• We find that
( )
( | )
( )
a bb
a
P W a b W a
ee
eP W b
The only continuous memoryless random variable.
Gamma Distribution
• The exponential distribution is a special case of the more general gamma distribution:
where the gamma function is
1 /
, 0( ) ( )
0, otherwise
yy ey
f y
1
0( ) yy e dy
For the exponential, choose = 1 and note (1) = 1.
Gamma Density Curves
0 5 10 15
0.5
1
dexp x 0.2( )
dexp x 0.5( )
dexp x 1( )
x
0 2 40
0.5
1
dgamma x 1( )
dgamma x 2( )
dgamma x 3( )
x
the shape parameter,
0 5 10 15
0.5
1
Gamma function facts:(1) 1;
( ) ( 1) ( 1), 1;
( ) ( 1)!, .n n n Z
Exponential mean, variance
• If Y has a gamma distribution with parameters and the expected value and variance for Y are given by
2( ) and ( )E Y V Y
In the case of = 1, the values for the exponential distribution result.
Deriving the Mean
• By definition of the density function1 /
0
1 /
0
1 ( )( )
and so ( )
y
y
y ef y dy dy
y e dy
• Since this holds for any > 0, note that
1 /
0 ( 1) yy e dy
Deriving the Mean
• Now, consider the expected value1 /
0
/
0
( ) ( )( )
1
( )
y
y
y eE Y y f y dy y dy
y e dy
11
= ( 1)( )
( ) = , as claimed.
( )
Problem 4.88
• Find E(Y) and V(Y) by inspectiongiven that
2 24 , 0( )
0, otherwise
yy e yf y
Chi-Square Distribution• As another special case of the gamma distribution, consider letting = v/2 and = 2, for some positive integer
v.
This defines the Chi-square distribution. Note the mean and variance are given by / 2 1 / 2
/ 2, 0
( ) 2 ( / 2)
0, otherwise
v y
v
y ey
f y v
2( ) ( / 2)(2) , ( ) 2E Y v v V Y v
Statistical Testing
• For a sample of size n, with variance s2.
• To compare against a given value 02
• We find that the ratio (n – 1)s2/02 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