You are on page 1of 18

LECTURE NOTES

CHAPTER 6: CONTINUOUS PROBABILITY DENSITY

6.1 Introduction

The idea of probability density has already been covered in the previous lecture.
Basically, if you have a continuous random variable X, where X takes on an
uncountably infinite number of possible values, then all values of X and their
corresponding probabilities can be described using the probability density function.
Recall that P(X = x) = 0.

This chapter focuses on some of the common probability densities; such as uniform,
gamma, exponential, chi-square and beta. The usual probability density, which is the
normal distribution is not covered in this chapter since the theoretical stuff discussed
involes moment generating function technique (which has not been included in the
course).

6.2 Uniform Distribution

In probability theory and statistics, the continuous uniform distribution or rectangular


distribution is a family of symmetric probability distributions, such that for each
member of the family, all intervals of the same length on the distributions support are
equally probable. The support is defined by two parameters, and , which are its
minimum and maximum values. See the probability density function given as follows:

1
for < x <
f (x;, ) =

0 elsewhere

It is important to also
note that the mean and variance of X, where X has a continuous
uniform distribution are:
+ 1 2
E(X) =
2
and V (X) =
12
( )


1
Example 1: Sketch the graph of a uniform probability density.
Solution 1:

Example 2: Prove that if X has a continuous uniform distribution, then


its E(X) = ( + ) 2

Outline of Solution 2:

1
E(X) = x.

dx


=
1 + ( )( )
( 2 )

+
=
2

Example 3: Prove that if X has a continuous uniform distribution, then


2
its V (X) = ( ) 12

Outline of Solution 3:

1
E(X 2 ) = x .
2
dx

3 3 1
=
3

( ) ( )
V (X) = E X 2 E X
2
4 ( ) 3( + )
3 3

=
12( )
1 2
= ( )
12

2
Example 4: The time in minutes that Aayren takes to checkout at her local
supermarket follows a continuous uniform distribution defined over the interval [3,9].
Find
a) Aayrens expected check-out time.
b) the variance of the time taken to check-out at the supermarket.
c) the probability that Aayren will take more than 7 minutes to check-out.
Hints for Solution 4:
+
a) Use the fact that E ( X ) = .
2

1 2
b) Use the fact that V ( X ) = ( .)
12

c) Recall the notes in Chapter 3: Probability Distribution & Probability Density on


how to calculate probability. The answer that you should get is 1/3.

3
6.3 Gamma Distribution

The gamma distribution is a two-parameter family of continuous probability


distributions. In particular, the arrival of times in Poisson process has a gamma
distribution. In order to study the gamma distribution, it is important to first introduce
the gamma function. The gamma function, is defined as follows:

( ) x
=
0
e x dx
1
( )
where 0,

The followings are


essential properties of gamma function:
()
1. 1 = 1
2. ( +1) = (a ) for > 0
3. ( + n ) = ( +1)( + 2)...( + n 1) ( ) for > 0
4. ( ) = ( 1)! for > 0

Example
5: Prove that (1) = 1.
Hint for Solution 5:
Consider the gamma
function given above, replace = 1 and integrate accordingly.

4
Example 6: Prove that ( +1) = ( ) for > 0

Hints and Incomplete Outline of Solution 6:


Consider the gamma
function above and replace in the equation with +1.

(
+1 = ) x 0
+11
e x dx

= xe
0
x
dx

Need integration by parts,


where u = x and dv = e x dx



x
(
+1 = x
e
) + x 1e x dx
0
0

= ()

5
Example 7: Using the result in Example 6, determine ( + 2), ( + 3), ( + 4 )

and finally derive the result for ( + n ). You should be able to demonstrate that

Property 3 of gamma function holds true.


Hints and Incomplete Outline
of Solution 7:

( )
Note that + 2 can be written as +1 +1 . ( )
Let A = +1
( )
+1 +1 = A +1 ) (
= A ( A)
= ( +1) ( +1)
( + 2) = ( +1) ( )
Now, go and figure out the rest.

Now, if X has a gamma distribution, then its probability density function is given by
the following equation:
1
x 1e x / for x > 0
( )
f x; , = ()

0 elsewhere

6
where and are the shape and scale parameters respectively. The shape parameter
can be loosely defined as a parameter that affects the shape of the distribution. On the
other hand, the scale parameter is related to stretching or shrinking the distribution.
The mean and variance are given as follows:
E(X) = and V (X) = 2

Example 8: Prove
that E(X) = .
Hint for Solution 8:

1
You need to find
x. x 1e x / dx and apply integration by parts.
0

()

7
Example 9: Prove that V (X) = 2 .
Hint for Solution 9:

1
You need to find E ( X 2 ) = x .
2
x 1e x / dx and apply integration by parts.
0

()
2
Next, plug the result into the usual equation, V (X) = E ( X 2 ) E ( X ) .

8
Example 10: If the life of one computer component (in years) has gamma distribution
with mean 6 and variance 18, find the probability that this component has a lifetime
of at least 9 years?
Hints for Solution 10:
Consider the facts that E(X) = and V (X) = 2 and solve the equations to find
the values of and respectively. Plug these values in the probability density
function and integrate
it with appropriate limits to find the required probability. The
answer that you should get is 4e-3.

9
6.4 Exponential Distribution

Consider the gamma density function given in the previous section. If you let = 1
and = , the gamma distribution will be reduced to what is known as the
exponential distribution. Note that the exponential distribution has only one
parameter, which is .
1
(
f x; ,b =) x 1e x /

()
1
= x 11e x /
1
1 ()
1 x/
( )
f x; =

e for x > 0

The exponential distribution


is used to model waiting time before the first success or
waiting time in between successes. For example, you may want to know how long do
you need to wait before being served in a restaurant? Or, how long will a battery in
your watch can last before it needs to be replaced?

The exponential distribution in some ways is related to the Poisson distribution.


Remember that a Poisson random variable represents the number of successes
whereas the exponential random variable represents the waiting time in between
successes. Therefore, the exponential density function seen above, is most often
represented as

( )
f x; = e x for x > 0

where 1/ is replaced with


and itself represents the rate of success (it is the same
definition that you have seen in Poisson distribution).

Note that if X is an exponential random variable, then the mean and variance of X are
given as follows:

1 1
E(X) = and V (X) = 2

10
Example 11: Prove that an exponential random variable X, with the following
1 1
probability density f ( x; ) = e x has E(X) = and V (X) = 2 .

Hints for Solution 11:
Well, you dont actually need
any hint --- as you should already be equipped with
sufficient knowledge to tackle this problem. Good luck!

11
Example 12: If X is an exponential random variable with rate parameter equals to ln 3,
compute P(2 X 4 ) .

Hints for Solution 12:


This
is a straightforward integration --- the answer is 0.0988.

Example 13: The number of Hollywood film stars arriving at the entrance of a private
masquerade party per hour is a random variable having a Poisson distribution with
equals 30. What is the probability that a security officer has to wait more than 3
minutes before the next film star shows up at the entrance?
Hints to Solution 13:
X = no of film stars arriving; X ~ Poi( ). Y = waiting time; so Y ~ Exp( ). It is
important that you pay attention to the length of time where is concerned. Note that
= 30 (per hour). So length of time is 1 hour --- so 1 hour is considered as one unit.
Therefore convert 3 minutes to be 1/20 . Starting point to solve this problem is:

P(Y > 1/20) =
1/20
e x dx

Answer: 0.2231

12
6.5 Chi-square Distribution

Another special case of the gamma distribution arises when you let = v/2 and = 2,
where v is the parameter that represents the number of degrees of freedom. This new
distribution is known as the chi-square distribution and its probability density is
shown as below.
1
( )
f x; ,b = x 1e x /

()
1 v
1
= x 2 ex/ 2
2v / 2 ( )
v/2
1 v2

( )
f x;v = x 2 ex/ 2 for x > 0
2v / 2 ( )
v/2

The mean andvariance of the chi-square distribution are given as follows:

E(X) = v and V (X) = 2v

To prove that E(X) =v and V (X) = 2v using the procedure seen in the previous
sections will be slightly time consuming. So, lets use a short-cut!


We can prove by manipulating the fact that, if Y is a gamma random variable, then
E(Y ) = and V (Y ) = 2 --- recall that you have been able to prove these
statements in Section 6.3. Now, if we have a chi-square distribution X, where X itself

arises from the gamma distribution by simply replacing = v/2 and = 2, then it is
sensible to also say that the mean and variance of X can be obtained by replacing =
v/2 and = 2 into E(Y ) = and V (Y ) = 2 .

v v
E(X) = 2 = v and V (X) = 2 2 = 2v
2 2


The chi-square distribution plays an important role in sampling problem, but sampling
problem is not covered in this course. Therefore, the section about chi-square
distribution ends here, without a proper practical example to illustrate its applications.

13
6.6 Beta Distribution

A random variable X has a beta distribution and it is referred to as a beta random


variable if and only if its probability density is given by:

+
( )
x 1 (1 x) 1 for 0 < x < 1
( )
f x; , =

() ()
0 elsewhere

A beta distribution
represents the outcomes for percentages or proportions, and that is
why our X in the probability density above can only be from 0 to 1. Some students
might get confused since the name beta itself represent three different things:
i. Beta --- as in the name of the distribution
ii. Beta --- the name of the second shape parameter
iii. Beta --- the name of a function (as in gamma function --- I hope you
remember there is a difference between gamma function and gamma distribution).

Now, lets introduce component (iii) into our discussion.

You should know that if you integrate the above probability density from 0 to 1, the
answer you should get is 1 (because this is the property of any probability density ---
something that you have seen in Chapter 3). Therefore:
1
(
+ ) x 1 (1 x) 1 dx = 1

0 ( ) ( )

(
+ ) 1

(1 x) 1 dx = 1
x 1

() ()
0

1 () ()
x 1 (1 x) 1 dx = = B , ( )
0 + ( )

The last line isknown as beta function, B(, ) --- you need to be able to manipulate
this fact in order to find the mean and variance of beta distribution. This manipulation
is similar to what you have done in the gamma distribution.

14

Example 14: Prove that the mean of a beta distribution is .
+

Solution 14:



Example 15: Prove that the variance of a beta distribution is 2
.
( )( )
+ + +1

Solution 15:

15
Example 16: Suppose that DVDs in a certain shipment are defective with a beta
distribution, with = 2 and = 5. Compute the probability that the shipment has 20%
and 30% defective DVDs.
Solution 16:

Answer: 0.2352

16
EXERCISES FOR CHAPTER 6: CONTINUOUS PROBABILITY DENSITY

1. Suppose Y has a continuous uniform distribution where the minimum and


maximum values are given a and 4a. Find variance of Y.

2. Use integration by parts to show that ( ) = ( 1) ( 1) for > 1 .

3. Suppose that the lifetime of a device (in hours) has the gamma distribution with

shape parameter k = 4 and scale parameter b = 100. Find the mean and standard
deviation of the lifetime.
a) Find the probability that the device will last more than 300 hours.
b) Find the mean and standard deviation of the lifetime.

4. If a random variable has a uniform density with minimum value a and


maximum value b, find its corresponding distribution function.

5. A manufacturer produces sweets of length L mm, where L has a continuous


uniform distribution with range 15 and 30.
a) Find the probability that a randomly selected sweet has a length greater
than 24 mm.
b) If the sweets are randomly packed in a bag of 20 sweets, find the
probability that it contains at least 8 sweets with length greater than 24
mm.

6. Show that if a random variable has a uniform density with the parameters and
, the probability that it will take on a value less than + p( - ) is equal to p.
Note that represents the minimum value and represents the maximum value.

7. Find the probability that the value of a random variable will exceed 4 if it has a
gamma distribution with shape parameter = 2 and scale parameter = 3.

17
8. At a certain location on the PLUS highway, the number of cars exceeding the
speed limit by more than 90 kilometres per hour in half an hour is a random
variable having a Poisson distribution with = 8.4. What is the probability of a
waiting time of less than 5 minutes between cars exceeding the speed limit by
more than 90 kilometres per hour?


9. If X has a beta distribution, with mean and variance 2
,
+
( )(
+ + +1 )
find the mean and variance of Y = 1 X.


10. A utilities industry consultant predicts a cutback in the Zimbabwe utilities
industry during 2020 2025 by a percentage specified by a beta distribution

where f ( x; , ) =
(
+ ) x 1 (1 x) 1 with = 2 and = 1. Calculate the
() ()

probability that a Malaysian company, operating in Zimbabwe will downsize by

between 20% and 40% during the given five-year period.

SELECTED ANSWERS TO EXERCISES

1. 3a2/4
2. -
3. a) 13e-3 ; b) 400 and 200
4.
5. a) 0.4; b) 0.5841
6.
7.
8. 0.75
9.
10. -

18

You might also like