0% found this document useful (0 votes)
7 views34 pages

Exponential Distribution in Probability

The document discusses the exponential distribution, defining its probability density function, expected value, and variance. It provides examples, including the lifetime of an alkaline battery, and demonstrates calculations for probabilities and the moment-generating function. Additionally, it includes a SAS program for generating empirical data and comparing theoretical and empirical statistics.

Uploaded by

Temana Mabandla
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views34 pages

Exponential Distribution in Probability

The document discusses the exponential distribution, defining its probability density function, expected value, and variance. It provides examples, including the lifetime of an alkaline battery, and demonstrates calculations for probabilities and the moment-generating function. Additionally, it includes a SAS program for generating empirical data and comparing theoretical and empirical statistics.

Uploaded by

Temana Mabandla
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Ch 5: Discrete and Continuous Probability Distributions

Part 4: (B) Exponential Distribution

STK 220

c University of Pretoria

August 9, 2025
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 1 / 34
[Link] distribution
Definition
Exponential distribution. A random variable X has an exponential
distribution with parameter q if its probability distribution (pdf) is given by
8
< 1 e  xq for x > 0
g (x; q ) = q
: 0 elsewhere

where q > 0.
Notation: X  EXP (q )

Theorem (Mean and variance)


The expected value and variance are

E (X ) = q and Var (X ) = q 2

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 2 / 34
Fact (Moment-generating function)
The moment-generating function of the exponential distribution is given by
1
MX (t ) =
1  qt
Proof:
h i R•
MX (t ) = E e tX = e tx g (x ) dx
0
1 R• tx  x 1 R• x ( 1q t )
= e e q dx = e dx
q0 q0

 
1 R 1 x ( 1q t )
=  1
 t e dx
q tq 0 q
1 • 1 1
x ( q t ) 
1
= e  = [0  1] =
(qt  1) 0 (qt  1) 1  qt
Use the moment-generating function to derive the expected value and
variance of X  EXP (q ).
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 3 / 34
6.3. Exponential distribution

Exponential densities and distribution functions with q = 2, 4 and 6

0.6 1.0
g(x) G(x)
0.4
0.5
0.2

0.0 0.0
0 2 4 6 8 10 0 2 4 6 8 10
x x

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 4 / 34
Example (Battery)
The lifetime, X, of an alkaline battery has an exponential distribution with
a mean lifetime of q = 20 hours.
1. Give the probability density of X .
2. The expected value of X .
3. The variance and standard deviation of X .

1. 8
< 1 e  20x x >0
g (x ) = 20
: 0 elsewhere
X  EXP (20)
2.
µ = E (X ) = q = 20
3.
2 2 2
p
s = Var (X ) = q = 20 = 400 and s = Std (X ) = 400 = 20
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 5 / 34
[Link] distribution
Example (Battery)
Let
X = the lifetime of the alkaline battery (in hours)

4. Determine the distribution function(CDF ) of X .

Rx
4. For x  0 : G (x ) = 0dt = 0
• x
Rx 1
t
 20
t 
 20 
For x > 0 : G (x ) = e dt = e 
20
0  0
x  x
 20  20
= e 1 = 1e
(
0 x 0
G (x ) =  x
1e 20 x >0

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 6 / 34
6.3 Exponential distribution
X  EXP (20)
g(x)
0.04

0.02

0.00
0 10 20 30 40 50 60
x
1.0
G(x)
0.5

0.0
0 10 20 30 40 50 60
x

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 7 / 34
[Link] distribution
Example (Battery)
Let
X = the lifetime of the alkaline battery (in hours)
Calculate
5. The probability that the battery will last between 5 and 10 hours.
6. The probability that the battery will last more than 45 minutes.
7. The probability that the battery will last exactly 7 hours.
8. P (|X  20| < 30)
9. P (|X  20| < 30)
10. Determine the median of X .

5.

P (5 < X < 10) = G (10)  G (5) = 0.1723

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 8 / 34
5. Alternatively

R
10 1 x
P (5 < X < 10) = e 20 dx
5 20
x 10
= e  20  = e 0.5 + e 0.25 = 0.1723
5

6.
 
3 R• 1  x
P X > = e 20 dx
4 0.75 20
•
x  0.75
= e 20   
= 0 + e 20 = 0.9632
0.75

 OR :  
3 3
P X > = 1P X < = 1  G (0.75) = 0.9632
4 4

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 9 / 34
7.
P (X = 7) = 0
8.

P (|X  20| < 30) = P (30 < X  20 < 30)


= P (10 < X < 50)
= P (0 < X < 50)
= G (50) = 0.9179
9.

P (|X  20| > 30) = P (X  20 < 30) + P (X  20 > 30)


= P (X < 10) + P (X > 50)
= 0 + [1  G (50)] = 0.0821
OR :
P (|X  20| > 30) = 1  P (|X  20| < 30)
= 1  0.9179 = 0.0821
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 10 / 34
10.
R
me 1 x
e 20 dx = 0.5
0 20
x me
e  20  = 0.5
0
me
 20
e + 1 = 0.5
me
 20
e = 0.5
me
 = ln (0.5)
20
me = 20 ln (0.5)
= 13.8629
OR :
me
 20
G (me ) : 1  e = 0.5
me = 13.8629

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 11 / 34
Example (Battery)
Let
X = the lifetime of the alkaline battery (in hours)
Use the RANDSEED CALL with a seed of 777 to generate a sample of
size 10000 from X  EXP (20).
1. Determine the theoretical and empirical values for µ, s2 and s and
compare with each other.
2. Determine the theoretical and empirical values for me and compare
with each other.
3. Calculate the theoretical and empirical probabilities for
(a) P (5 < X < 10)
(b) P (X > 0.75)
(c) P (0 < X < 50)
and compare with each other.

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 12 / 34
SAS program
proc iml;
theta=20;
print’Theoretical distribution’;
mu=theta; sigma2=theta**2; sigma=sqrt(sigma2);
print mu sigma2 sigma;
me=quantile(’exponential’,0.5,theta);
print me;
prob1=cdf(’exponential’,10,theta)-cdf(’exponential’,5,theta);
prob2=1-cdf(’exponential’,0.75,theta);
prob3=cdf(’exponential’,50,theta);
print prob1 prob2 prob3;
**Start generating the empirical distribution**;
print ’Empirical distribution’;
call randseed(777,1); x_em=randfun(10000,’exponential’,theta);
mean_em=mean(x_em);var_em=var(x_em);sd_em=std(x_em);
print mean_em var_em sd_em;
call qntl(me_em,x_em,0.5);
print me_em;
Q3a_em=mean(x_em>5 & x_em<10);
Q3b_em=mean(x_em>0.75);
Q3c_em=mean(x_em>0 & x_em<50);
print Q3a_em Q3b_em Q3c_em;

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 13 / 34
SAS Program (Continued):

create d from x[colname={’x’}];


append from x;
quit;
proc univariate data=d plot;
var x;
histogram / endpoints=0 to 60 by 1 cfill=orange;
run;

SAS output
Theoretical distribution Empirical distribution
mu sigma2 sigma mean_em var_em sd_em
20 400 20 20.231638 416.76547 20.414835
me me_em
13.862944 13.824187
prob1 prob2 prob3 Q3a_em Q3b_em Q3c_em
0.1722701 0.9631944 0.917915 0.1767 0.9658 0.9139

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 14 / 34
SAS output
The UNIVARIATE Procedure
Variable: x
Moments
N 10000 Sum Weights 10000
Mean 20.2316376 Sum Observations 202316.376
Std Deviation 20.4148347 Variance 416.765475
Skewness 2.03501408 Kurtosis 6.35028768
Uncorrected SS 8260429.58 Corrected SS 4167237.98
Coeff Variation 100.905498 Std Error Mean 0.20414835
Basic Statistical Measures
Location Variability
Mean 20.23164 Std Deviation 20.41483
Median 13.82419 Variance 416.76547
Mode . Range 215.37337
Interquartile Range 22.15516

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 15 / 34
Empirical probability density

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 16 / 34
Example (Battery)
Let
X = the lifetime of the alkaline battery (in hours)

11. Derive the moment-generating function of X .


12. Use the moment-generating function of X to show that the expected
lifetime of the batttery is 20 hours.
13. Use the MGF of X to determine µ20 , the second moment about the
origin.
14. Use the answers of (12) and (13) to calculate the variance of X .

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 17 / 34
11.
h i
MX (t ) = E e tX
1 R• tx  x
= e e 20 dx
20 0
•  
1 R 1
x 20 t
= e dx
20 0

   
1 R 1 1
x 20 t
=  1
 t e dx
20 t  20 0 20
  •
x 20 t 
1 1
= e 
20t  1 0
1 1
= (0  1) = = (1  20t )1
20t  1 1  20t

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 18 / 34
12.

MX (t ) = (1  20t )1
MX0 (t ) =  (1  20t )2 (20)
µ = E (X ) = MX0 (0)
= 20

13.

MX0 (t ) = 20 (1  20t )2


MX00 (t ) = 40 (1  20t )3 (20)
 2
µ2 = E X = MX00 (0)
0

= 800

14.
 
Var (X ) = E X  [E (X )]2
2

= 800  400 = 400


c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 19 / 34
[Link] distribution

Fact (Properties of the waiting time distribution)


Consider the probability of getting x successes during a time interval of
length t when
1 the probability of a success during a very small time interval from t to
t + Dt is a · Dt
2 the probability of more than one success during such a time interval is
negligible
3 the probability of a success during such a time interval does not
depend on what happened prior to time t.
4 The number of successes is a value of the discrete random variable X
having the Poisson distribution with l = at.

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 20 / 34
[Link] distribution
Theorem
The probability density of the continuous random variable Y , the waiting
time until the first success is given by
(
ae ay for y > 0
f (y ) =
0 elsewhere

this is the exponential distribution with q = 1a .

Proof:

F (y ) = P (Y  y ) = 1  P (Y > y )
= 1  P (0 successes in a time interval of length y )
e ay (ay )0
= 1  p (0; ay ) = 1 
0!
= 1  e ay for y > 0
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 21 / 34
[Link] distribution
Proof (Continues):
We obtain the density function by

dF (y )
f (y ) = = 0  (a) e ay = ae ay
dy
The probability density function of Y is:
(
ae ay for y > 0
f (y ) =
0 elsewhere
1
This the exponential distribution with q = .
a
Note: The exponential distribution applies not only to the occurrence
of the first success in a Poisson process, it also applies to the waiting
times between successes.

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 22 / 34
[Link] distribution

Example (Highway)
The number of cars exceeding the speed limit by more than 10 miles per
hour in half an hour on a highway is a random variable having a Poisson
distribution with a = 8.4.
Let X =the number of cars exceeding the speed limit by more than 10
miles per hour in half an hour.
Let Y =the waiting time between cars exceeding the speed limit by more
than 10 miles per hour.
1. Give the probability distribution of X .
2. Give the probability density of Y .
3. Determine the expected value and variance of Y .

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 23 / 34
[Link] distribution
1. It is given that X has a Poisson distribution with a = 8.4 and t = 1,
i.e.l = at = 8.4 (1) = 8.4.
(8.4)x e 8.4
P (X = x ) = for x = 0, 1, 2, 3, 4, ...
x!
2. The waiting time is a random variable having an exponential
1
distribution with q = .
8.4
(
8.4e 8.4y y >0
f (y ) =
0 elsewhere
3.
1
E (Y ) = q = = 0.1191
8.4
 2
2 1
Var (Y ) = q = = 0.0142
8.4
p
Std (Y ) = 0.0142 = 0.11916
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 24 / 34
[Link] distribution

Average waiting time in a half an hour time period:


0.1191(30) = 3.57
Alternatively:
8 y
< 1 e  3.57 y >0
f (y ) = 3.57
: 0 elsewhere

Var (Y ) = 0.0142(30)2 = 12.78


p
Std (Y ) = 12.78 = 3.5749

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 25 / 34
[Link] distribution
Example (Highway)
4. What is the probability that 5 cars will exceed the speed limit by more
than 10 miles per hour in an half an hour?
5. What is the probability of a waiting time of less than 30 minutes
between cars exceeding the speed limit by more than 10 miles per hour
6. What is the probability of a waiting time of less than 5 minutes
between cars exceeding the speed limit by more than 10 miles per
hour?
7. What is the probability of a waiting time between 15 and 30
minutes between cars exceeding the speed limit by more than 10
miles per hour?

4.
(8.4)5 e 8.4
P (X = 5) = = 0.0784
5!
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 26 / 34
6.3. Exponential distribution

5.
R1
P (Y < 1) = 8.4e 8.4y dy
0
 
8.4y 1
 8.4

= e= e 0
+1
= 0.9998 = F (1)

OR
R
30
1  y
P (Y < 30) = e 3.57 dy
0 3.57
y 30 30
 3.57  3.57
= e  = e +1
0
= 0.9998 = F (30)

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 27 / 34
6. The waiting time is a random variable having an exponential
1 5 1
distribution with q = and y = = of the time unit.
8.4 30 6
F (y ) = 1  e 8.4y
   
1 1 8.4
 6
P Y < =F = 1e = 0.7534
6 6
OR
y
 3.57
F (y ) = 1  e

5
 3.57
P (Y < 5) = F (5) = 1  e = 0.7534

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 28 / 34
7.
R1 8.4y
 
8.4y 1
P (0.5 < Y < 1) = 8.4e dy = e 0.5
0.5
= e 8.4 + e 4.2 = 0.0148
= F (1)  F (0.5)

OR

1  y R
30 y 30
P (15 < Y < 30) = e 3.57 dy = e  3.57 
15 3.57 15
30 15
 3.57  3.57
= e +e = 0.0147
= F (30)  F (15)

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 29 / 34
[Link] distribution

Example (Bank closures)


It is known that, on average, there are 7.2 bank closures per year.
Let X =the number of bank closures per year.
Let Y be the waiting time between bank closures in a year..
1. Give the probability distribution of X .
2. Give the probability density of Y .
3. Determine the expected value and variance of Y .
4. Calculate the probability that the next bank closure will take place
less than 26 weeks after the previous bank closure.
5. Calculate the probability that a bank closure will take place more than
73 days after the previous bank closure.

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 30 / 34
[Link] distribution
1. a = 7.2 per year and t = 1 since the time period of interest is 1 year.
l = 7.2 (1) = 7.2.
7.2x e 7.2
P (X = x ) = for x = 0, 1, 2, 3, ...
x!
X  POI (7.2)
2. The waiting time in a year is a random variable having an
1
exponential distribution with q =
7.2
(
7.2e 7.2y y >0
f (y ) =
0 elsewhere
3.
1
E (Y ) = = 0.1389
7.2
 2
1
Var (Y ) = = 0.0193
7.2
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 31 / 34
[Link] distribution
4. In a year
    1
26 1 R2
P Y < = P Y < = 7.2e 7.2y dy
52 2 0
1
7.2y  2 3.6
= e 0
=  e + 1 = 0.9727 = F (0.5)
Over 52 weeks:
1
E (Y ) = = 0.1389(52) = 7.2228
7.2
( y
1  7.2228
7.2228 e y >0
f (y ) =
0 elsewhere

R
26 1 y
 7.2228
P (Y < 26) = e dy
0 7.2228
y 26

= e  7.2228  = e 3.6 + 1 = 0.9727 = F (26)
0
c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 32 / 34
[Link] distribution

5. In a year:
     
73 1 1
P Y > = P Y > = 1P Y <
365 5 5
1
R5
= 1  7.2e 7.2y dy
0
 1.44 
= 1  e +1
= e 1.44 = 0.2369

1
= 1F
5

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 33 / 34
1 In 365 days:
1
E (Y ) = = 0.1389(365) = 50.699
7.2
( y
1  50.669
50.669 e y >0
f (y ) =
0 elsewhere

1 R
73 y
 50.699
P (Y > 73) = 1  e dy
0 50.699
y 73
= 1  e  50.69 
 1.44 0 
= 1  e +1
= 0.2369
= 1  F (73)

c University of Pretoria)
STK 220 ( Ch5 P4 (B) Exponential Dist. August 9, 2025 34 / 34

You might also like