Professional Documents
Culture Documents
SST 204 Courtesy of Michelle Owino
SST 204 Courtesy of Michelle Owino
LESSON ONE
RANDOM VARIABLES
1.1 Introduction
In this lesson we will discuss the definition of a random variable, types of
random variables and their probability distributions.
1.2 Lesson Learning Outcomes
By the end of this lesson the learner will be able to:
i. Define a random variable
ii. State types of random variables
iii. Obtain the probability distributions of discrete and continuous
random variables.
1.3 Random variables
Let S be a sample space representing the outcomes of a statistical experiment.
Then we can define a random variable as follows:
A random variable X is a real valued function defined on S, that is
𝑿∶𝑺→ℝ
Capital letters are used to denote random variables while small letters are
used to denote respective values of the random variables.
Example 1.1: Suppose that three boys are selected at random from a school
parade and each is asked whether he smokes (S) or he does not (N). Then the
sample space of this random experiment is given by
𝑆 = {𝑆𝑆𝑆, 𝑆𝑆𝑁, 𝑆𝑁𝑆, 𝑁𝑆𝑆, 𝑆𝑁𝑁, 𝑁𝑆𝑁, 𝑁𝑁𝑆, 𝑁𝑁𝑁}
Let X denote the number of smokers among three chosen boys. Then
𝑋(𝑆𝑆𝑆) = 3, 𝑋(𝑆𝑆𝑁 = 𝑋(𝑆𝑁𝑆) = 𝑋(𝑁𝑆𝑆) = 2,
𝑋(𝑆𝑁𝑁) = 𝑋(𝑁𝑆𝑁) = 𝑋(𝑁𝑁𝑆) = 1, 𝑋(𝑁𝑁𝑁) = 0.
Therefore, X is a random variable which takes the values 0,1,2,3.
Example 1. 2 : Suppose that a real number is selected at random in the closed
interval [0,2]. Let X denote the number so chosen. Then X is a random variable
with possible values , 0 ≤ 𝑥 ≤ 2.
COURTESY OF MICHELLE OWINO
There are two types of random variables namely discrete and continuous
random variables.
1.3.1 : Discrete Random Variables
1
P(X=0) =P{NNN} = ,
8
3
P(X=1) =P{SNN, NSN,NNS} = ,
8
3
P(X=2) =P{SSN, SNS,NSS} = ,
8
1
and P(X=3) =P{SSS} = .
8
We can write these probabilities in a table form as follows:
x 0 1 2 3
P(X=x) 1 3 3 1
8 8 8 8
𝑓(𝑥) = 𝑃(𝑋 = 𝑥)
and satisfying the following conditions:
(𝑖) 𝑓(𝑥) ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥
(𝑖𝑖) ∑𝑥=∞
𝑥=−∞ 𝑓(𝑥) = 1.
COURTESY OF MICHELLE OWINO
Solution
1
𝑃(𝑋 = 𝑥) = 8 , 𝑥 = 0,1,2,3,4,5,6,7
1
, 𝑥 = 0,1,2,3,4,5,6,7
𝑓(𝑥) = {8
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obviously 𝑓(𝑥) ≥ 0 and ∑=9
𝑥=0 𝑓(𝑥) = 1.
𝑘𝑥, 𝑥 = 2,3,4,5,6
𝑓(𝑥) = {
0, 0𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain the value of the constant k.
Solution
Since 𝑓(𝑥) is a probability distribution, then
∑6𝑥=2 𝑓(𝑥) = 1
∑6𝑥=2 𝑘𝑥 = 1
2𝑘 + 3𝑘 + 4𝑘 + 5𝑘 + 6𝑘 = 1
20𝑘 = 1
1
𝑘=
20
∞
(𝑖𝑖) ∫−∞ 𝑓(𝑥) 𝑑𝑥 = 1.
𝑏
NB: 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = ∫𝑎 𝑓(𝑥).
Example 1.6 Let X be a continuous random variable. Show that the function
1
𝑥, 0 ≤ 𝑥 ≤ 2
𝑓(𝑥) = {2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1
is a p.d.f of X. Hence calculate 𝑃 ( ≤ 𝑋 ≤ 1) and 𝑃(−1 ≤ 𝑋 ≤ 1).
2
COURTESY OF MICHELLE OWINO
Solution
2 21
Clearly 𝑓(𝑥) ≥ 0, for all real x and ∫0 𝑓(𝑥) = ∫0 𝑥 𝑑𝑥 = 1, Hence 𝑓(𝑥) is
2
a p.d.f.
1 11 3
𝑃 ( ≤ 𝑋 ≤ 1) = ∫1 𝑥 𝑑𝑥 = and
2 2 2 16
0 1 1 1
𝑃(−1 ≤ 𝑋 ≤ 1) = ∫−1 𝑓(𝑥)𝑑𝑥 + ∫0 𝑓(𝑥)𝑑𝑥 = 0 + = .
4 4
1
𝑘𝑥 + , 0 ≤ 𝑥 ≤ 3
𝑓(𝑥) = { 30
0, 𝑒𝑠𝑙𝑒𝑤ℎ𝑒𝑟𝑒
Where k is a constant. Calculate the value of k hence compute 𝑃(1 ≤ 𝑋 ≤ 2).
Solution
3
∫0 𝑓(𝑥) 𝑑𝑥 = 1 since 𝑓(𝑥) is a p.d.f
3
1
∫ (𝑘𝑥 + ) 𝑑𝑥 = 1
30
0
1
𝑘= .
5
1 1
𝑥+ , 0≤𝑥≤3
Therefore 𝑓(𝑥 ) = {5 30 and hence
0, 𝑒𝑠𝑙𝑒𝑤ℎ𝑒𝑟𝑒
2
1 1 1
𝑃(1 ≤ 𝑋 ≤ 2) = ∫ ( 𝑥 + ) 𝑑𝑥 =
5 30 3
1
𝑐, 𝑎 < 𝑥 < 𝑏
Example 1.8 Let 𝑓(𝑥) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
be a p.d.f of a continuous random variable X. Find the value of the constant c.
COURTESY OF MICHELLE OWINO
Solution
𝑏
∫𝑎 𝑓(𝑥)𝑑𝑥 = 1 since 𝑓(𝑥) is a p.d.f of X.
𝑏
∫𝑎 𝑐 𝑑𝑥 = 1
1
𝑐=
𝑏−𝑎
1
, 𝑎<𝑥<𝑏
Therefore 𝑓(𝑥) = {𝑏−𝑎
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
And such a distribution is known as rectangular density function on the interval
(a,b). If a=0 and b=1, then we have
1, 0 < 𝑥 < 1
𝑓(𝑥) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
as the uniform density function on the unit interval (0,1).
EXERCISES
2
(1 + 𝑥), 4 ≤ 𝑥 ≤ 7
1. If 𝑓(𝑥) = {39
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
is a p.d.f of a continuous random variable X calculate 𝑃(𝑋 < 5) and
𝑃(5 ≤ 𝑋 ≤ 6.5).
𝑘𝑥𝑒 −𝑥 , 𝑥 > 0
2. Let 𝑓(𝑥) = {
0, 𝑥 ≤ 0
be a p.d.f of X. Find the value of the constant k. Hence determine 𝑃(𝑋 < 5)
and 𝑃(𝑋 ≥ 10).
x 0 1 2 3 4 5 6 7 8 9
f(x) 0.02 0.1p 0.2p 0.05 0.1 0.7p 0.2 0.9p 0.15 0.3p
Determine the value of the constant p and find 𝑃(𝑋 < 5) and 𝑃(3 ≤ 𝑋 ≤ 7).
COURTESY OF MICHELLE OWINO
References
1. Introduction to the Theory of Statistics by A.M. Mood, F.A. Graybill and D.C.
Boes .
2. Probability and Statistics by Rao V. Dukkip
LESSON TWO
DISTRIBUTION FUNCTIONS
2.1: Introduction
In this lesson will use the probability distributions we discussed in lesson one
to determine the distribution functions of both discrete and continuous
random variables.
2.2: Lesson Learning Outcome
By the end of this lesson learner will be able to determine the probability
distributions of discrete and continuous random variables
1
(𝑥 + 1), 𝑥 = 1,2,3,4,5
𝑓(𝑥) = {20
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Solution
(i)
x 1 2 3 4 5
f(x) 0.1 0.15 0.2 0.25 0.3
Graph of 𝑓(𝑥)
Since 𝑥 is any real number it could lie in any one of the following six mutually
disjoint intervals
−∞ < 𝑥 < 1, 1 ≤ 𝑥 < 2, 2 ≤ 𝑥 < 3, 3 ≤ 𝑥 < 4, 4 ≤ 𝑥 < 5 𝑎𝑛𝑑 5 ≤x< ∞.
Thus
COURTESY OF MICHELLE OWINO
0 , 𝑥<1
1
, 1≤𝑥<2
10
1
, 2≤𝑥<3
𝐹(𝑥) = 4
9
, 3≤𝑥<4
20
7
, 4≤𝑥<5
10
{ 1 , 𝑥≥5
To see how 𝐹(𝑥) is obtained, note that if for instance 3 ≤ 𝑥 < 4, then 𝐹(𝑥) =
1 9
∑3𝑥=1 (𝑥 + 1) = since the value of 𝑥 = 4 is excluded.
20 20
Graph of 𝐹(𝑥)
(i) 𝐹(𝑥) is a step function,
(ii) 𝐹(𝑥) is everywhere continuous to the right of any point.
2.3.2: Distribution of a continuous random variable
If X is a continuous random variable with density function 𝑓(𝑥), then the
distribution function of X is given by
𝑥
𝐹(𝑥) = ∫−∞ 𝑓(𝑡) 𝑑𝑡.
Example 2
Let X be a continuous random variable with probability density function (p.d.f)
given by
1
𝑥, 0 < 𝑥 < 2
𝑓(𝑥) = {2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain the cumulative distribution function (c.d.f) of X and sketch its graph.
Solution
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥)
𝑥
= ∫−∞ 𝑓(𝑡)𝑑𝑡
COURTESY OF MICHELLE OWINO
0 , 𝑥≤0
𝑥1
= { ∫0 2 𝑡 𝑑𝑡 , 0 < 𝑥 < 2
1, 𝑥≥2
0, 𝑥≤0
1
= {4 𝑥 2 , 0 < 𝑥 < 2
1, 𝑥≥2
Graph of 𝐹(𝑥)
In the above example 𝐹(𝑥) is a continuous function for all real numbers 𝑥. In
particular 𝐹(𝑥) is everywhere continuous to the right of any point. Moreover,
the derivative of 𝐹(𝑥) with respect to 𝑥 exists at all points in the interval [0,2].
𝑑𝐹(𝑥)
That is, in the interval 𝑓(𝑥) = 𝐹 / (𝑥) = .
𝑑𝑥
𝐹(𝑥2 ) ≥ 𝐹(𝑥1 ) .
𝑑𝐹(𝑥)
𝑓(𝑥) =
𝑑𝑥
3
, 𝑥=0
5
𝑓(𝑥) = {2 , 0<𝑥≤5
25
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Alternatively
𝑃(−3 ≤ 𝑋 ≤ 3) = 𝑃(0) + 𝑃(0 < 𝑋 ≤ 3)
3
= + 𝐹(3) − 𝐹(0)
5
3 6 3 3 21
= + + − =
5 25 5 5 25
Example 2.4
A continuous random variable X has probability density function (p.d.f) given
by
1
, −2 ≤ 𝑥 ≤ 2
𝑓(𝑥) = {4
0, 𝑒𝑠𝑙𝑒𝑤ℎ𝑒𝑟𝑒
Define a new random variable Y by Y=X2 . Obtain the cumulative distribution
function (c.d.f) of Y and hence determine its p.d.f.
Solution
The limits for y are follows:
0≤𝑦≤4
Let the cumulative distribution function (c.d.f) be 𝐺(𝑦). Therefore
𝐺(𝑦) = 𝑃(𝑌 ≤ 𝑦) satisfies
𝐺(𝑦) = 0 if 𝑦 < 0 and for 0 ≤ 𝑦 ≤ 4
𝐺(𝑦) = 𝑃(𝑋 2 ≤ 𝑦)
= 𝑃(−√𝑦 ≤ 𝑋 ≤ √𝑦)
𝑦 1 1
= ∫−√ 𝑑𝑡 = √𝑦
√𝑦 4 2
Therefore
COURTESY OF MICHELLE OWINO
0 , 𝑦<0
1
𝐺(𝑦) = {2 √𝑦 , 0 ≤ 𝑦 ≤ 4
1 , 𝑦>4
𝐺(𝑦) is differentiable in the interval [0,4]. Hence the p.d.f of Y is given by
𝑔(𝑦) = 𝐺 / (𝑦)
1
1−
= 𝑔(𝑦) = {4 𝑦 , 0 ≤ 𝑦 ≤ 4
2
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Assessment
1. Let X be a discrete random variable with probability distribution function
1
, 𝑥 = 1,2,3,4
𝑓(𝑥) = {4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Determine the c.d.f of X and hence sketch its graph.
References
1. Introduction to the Theory of Statistics by A.M. Mood, F.A. Graybill and D.C.
Boes.
2. Probability and Statistics by Rao V. Dukkip
LESSON THREE
COURTESY OF MICHELLE OWINO
Example 3.1
Find the mode of each of the following distributions:
3 1 𝑥−1
(i) 𝑓(𝑥) = {4 (4) , 𝑥 = 1,2,3, . . .
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
3
𝑥 2 (𝑥 − 1), 0 ≤ 𝑥 ≤ 2
(ii) 𝑓(𝑥) = {4
0 , 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Solutions
2
𝑥 = 0 or = .
3
𝑑 2 𝑓(𝑥) 3
Thus the mode of 𝑓(𝑥) is 0 since at 𝑥 = 0 is − <
𝑑𝑥 2 2
0.
3.2: MEDIAN
The median of 𝑓(𝑥) is a value 𝜆 of the random variable X which satisfies
𝑃(𝑋 < 𝜆) ≤ 0.5 and (𝑋 ≤ 𝜆) ≥ 0.5 ,
when 𝑋 is a discrete random variable.
If X is a continuous random variable, then the median satisfies
𝜆 𝑢𝑝𝑝𝑒𝑟 𝑙𝑖𝑚𝑖𝑡
𝐹(𝜆) = 0.5 or ∫𝑙𝑜𝑤𝑒𝑟 𝑙𝑖𝑚𝑖𝑡 𝑓(𝑥)𝑑𝑥 = 0.5 or ∫𝜆 𝑓(𝑥) 𝑑𝑥 = 0.5.
Example 3.2
Obtain the median of each of the following distributions
4 1 𝑥 3 4−𝑥
(i) 𝑓(𝑥) = {(𝑥) (4) (4) , 𝑥 = 0,1,2,3,4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Solution
∑𝜆−1 𝜆
𝑥=0 𝑓(𝑥) ≤ 0.5 and ∑𝑥=0 𝑓(𝑥) ≥ 0.5
4 1 0 3 4−0 81
𝑓(0) = ( ) ( ) ( ) =
0 4 4 256
COURTESY OF MICHELLE OWINO
1 1 3 4−1 27
𝑓(1) = (41) ( ) ( ) =
4 4 64
189
𝑃(𝑋 ≤ 1) = 𝑃(𝑋 = 0) + 𝑃(𝑋 = 1) = 𝑓(0) + 𝑓(1) = > 0.5
256
3.5: Assessment
1. Let X be a continuous random variable with p.d.f given by
2𝑒 −2𝑥 , 𝑥 ≥ 0
𝑓(𝑥) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain the median of X.
2. The c.d.f of a continuous random variable U if given by
0 , 𝑢<0
𝜋
𝐹(𝑢) = {1 − cos 𝑢 , 0 ≤ 𝑢 ≤ 2
𝜋
1 , 𝑢>
2
LESSON FOUR
EXPECTATION OF A RANDOM VARIABLE
4.1: Introduction
In this lesson will discuss expectation of a random variable. The
properties will be discussed this forum.
𝐸(𝑋) = ∑∞
𝑥=−∞ 𝑥 𝑓(𝑥)
Example 4.1
Let X be a discrete random variable with probability distribution given
by
1
, 𝑥 = 1,2,3,4,5,6
𝑓(𝑥) = {6
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain 𝐸(𝑋).
Solution
𝐸(𝑋) = ∑∞
𝑥=−∞ 𝑥 𝑓(𝑥)
1
= ∑6𝑥=1 𝑥 ( ) = 3.5
6
COURTESY OF MICHELLE OWINO
𝐸[𝑔(𝑋)] = ∑∞
𝑥=−∞ 𝑔(𝑥)𝑓(𝑥)
Example 4.2
The following table shows the probability distribution of a discrete
random variable X.
X 0 1 2 3
f(x) 1 1 1 1
4 3 4 6
Solution
(i) 𝐸(𝑋) = ∑∞
𝑥=−∞ 𝑥𝑓(𝑥)
4
= ∑3𝑥=0 𝑥𝑓(𝑥)=
3
4 2
(ii) Therefore g(X)=[𝑋 − ] .
3
Hence
𝐸[𝑔(𝑋)] = ∑∞
−∞ 𝑔(𝑥)𝑓(𝑥)
4 2
= ∑3𝑥=0 (𝑥 − ) 𝑓(𝑥)
3
4 2 1 2 2 2
= (− ) 𝑓(0) + (− ) 𝑓(1) + ( ) 𝑓(2) +
3 3 3
5 2 57
(3) 𝑓(3) = 54 .
∞
𝐸(𝑋) = ∫−∞ 𝑥𝑓(𝑥) 𝑑𝑥.
∞
𝐸[𝑔(𝑋)] = ∫−∞ 𝑔(𝑥) 𝑓(𝑥)𝑑𝑥.
Example 4.3
Let X be a continuous random variable with p.d.f
1
(𝑥 + 3), −3 < 𝑥 < 3
𝑓(𝑥) = {18
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
∞
𝐸(𝑋) = ∫−∞ 𝑥𝑓(𝑥) 𝑑𝑥.
3 1
= ∫−3 𝑥(𝑥 + 3)𝑑𝑥 = 1
18
and
∞
𝐸(𝑋) = ∫−∞ 𝑥 2 𝑓(𝑥) 𝑑𝑥.
3 1
= ∫−3 𝑥 2 (𝑥 + 3)𝑑𝑥 = 3.
18
NB: If 𝐸 (𝑋) exists then 𝐸 |𝑋| also exists. If 𝐸 |𝑋| does not exist, then
𝐸|𝑋| = ∞.
Example 4.4
Let X be a continuous random variable with p.d.f given by
1
, −∞ < 𝑥 < ∞
𝑓(𝑥) = {𝜋(1+𝑥 2)
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
COURTESY OF MICHELLE OWINO
∞ ∞ 𝑥
𝐸(𝑋) = ∫−∞ 𝑥𝑓(𝑥) 𝑑𝑥=∫−∞ 𝑑𝑥.
𝜋(1+𝑥 2 )
∞ ∞ 𝑥
But ∫0 𝑥𝑓(𝑥) 𝑑𝑥 = ∫0 𝑑𝑥
𝜋(1+𝑥 2 )
1 ∞
=[ 𝑙𝑛(1 + 𝑥 2 )] = ∞
2𝜋 0
∞
𝐸[𝑔(𝑋)] = ∫−∞ 𝑔(𝑥) 𝑓(𝑥)𝑑𝑥.
∞
= ∫−∞(𝑎𝑥 + 𝑏) 𝑓(𝑥)𝑑𝑥.
∞ ∞
= 𝑎 ∫−∞𝑥 𝑓(𝑥)𝑑𝑥 + 𝑏 ∫−∞ 𝑓(𝑥) 𝑑𝑥
= 𝑎𝐸(𝑋) + 𝑏 ……………………………………..
(1)
Let g(X) and ℎ(𝑋) be any two real valued functions of X. Then for any
constants a and
∞
𝐸[𝑎 𝑔(𝑋) + 𝑏 ℎ(𝑋)] = ∫−∞(𝑎 𝑔(𝑥) + 𝑏 ℎ(𝑥)) 𝑓(𝑥)𝑑𝑥.
∞ ∞
= 𝑎 ∫−∞ 𝑔(𝑥) 𝑓(𝑥)𝑑𝑥 + 𝑏 ∫−∞ ℎ(𝑥)𝑓(𝑥) 𝑑𝑥
COURTESY OF MICHELLE OWINO
Example 4.5
Let X be a discrete random variable with probability distribution
𝑥
, 𝑥 = 1,2,3,4
𝑓(𝑥) = {10
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
3 2 ].
Compute 𝐸[5𝑋 − 2𝑋
Solution
𝐸[5𝑋 − 2𝑋 = 5𝐸(𝑋 3 ) − 2𝐸(𝑋 2 )
3 2]
𝑥3
But 𝐸(𝑋 2 ) = ∑4𝑥=1 𝑥 2 𝑓(𝑥) = ∑4𝑥=1 = 10 and
10
4 4
3) 3
𝑥4
𝐸(𝑋 = ∑ 𝑥 𝑓(𝑥) = ∑ = 35.4
10
𝑥=1 𝑥=1
Therefore
𝐸[5𝑋 3 − 2𝑋 2 ] = 5(35.4) − 2(10) = 157.
4.5 Assessment
1. Let X be a discrete random variable with probability distribution given by
1
, 𝑥 = 1,2,3, … , 𝑛
𝑓(𝑥) = {𝑛
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑛+1
Show that (𝑋) = .
2
f(x) 1 1 0 1
3 2 6
1
, 𝑎<𝑥<𝑏
𝑓(𝑥) = {𝑏−𝑎
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Where a and b are real numbers. Show that
𝑎+𝑏 1
𝐸(𝑋) = and 𝐸(𝑋 2 ) = (𝑏 2 + 𝑎𝑏 + 𝑎2 ).
2 3
LESSON FIVE
MOMENTS
5.1: Introduction
In this lesson we consider moments about a point. Hence we will discuss
central moments like variance. The properties of variance will be discussed.
5.2: Lesson Learning outcomes
By the end of this lesson the learner will be able to:
i. Determine the moment of a random variable about a point
ii. Find the mean and variance of a distribution
iii. State the properties of variance
5.2: Moments
Let X be a random variable with a probability distribution 𝑓(𝑥). Then the
expected value of X, if it exists, is called the mean of the random variable X or
the mean of the probability distribution 𝑓(𝑥). It is usually denoted by 𝜇. That is
1 n
𝜇 = 𝐸(𝑋)= Xi = X
n i 1
n i 1
Where
∕
𝜇1 = 𝜇.
𝐸[(𝑋 − 𝑎)𝑘 ] is called the kth moment of the random variable X about the
point 𝑥 = 𝑎 (if it exists).
𝜇𝑘 = 𝐸[(𝑋 − 𝜇)𝑘 ] is the kth moment of the rand variable X about 𝜇, and is
also called central moment.
𝜇1 = 𝐸(𝑋 − 𝜇) = 𝐸(𝑋) − 𝜇 = 𝜇 − 𝜇 = 0 .This shows that the first moment
about the mean is always zero.
COURTESY OF MICHELLE OWINO
1
(3 − |𝑥|), −3 < 𝑥 < 3
𝑓(𝑥) = {9
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
3𝑥 0 𝑥
= ∫0 (3 − 𝑥) 𝑑𝑥 + ∫−3 (3 + 𝑥) 𝑑𝑥 = 0
9 9
= 𝐸[(𝑋 − 0)2 ]
= 𝐸(𝑋 2 )
3 𝑥2 0 𝑥2
= ∫0 (3 − 𝑥) 𝑑𝑥 + ∫−3 (3 + 𝑥) 𝑑𝑥 = 1.5
9 9
= 𝐸(𝑋 2 ) − 2𝜇2 + 𝜇2
COURTESY OF MICHELLE OWINO
Example 5.2
The probability distribution of a discrete random variable X is given by
𝑥
, 𝑥 = 1,2,3,4,5,6
𝑓(𝑥) = {21
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑥2 13
𝜇 = 𝐸(𝑋) = ∑6𝑥=1 𝑥𝑓(𝑥) = ∑6𝑥=1 = .
21 3
𝑥3
𝐸(𝑋 2 ) = ∑6𝑥=1 𝑥 2 𝑓(𝑥) = ∑6𝑥=1 = 21
21
Therefore
2 2) 2 13 2 20
𝑉𝑎𝑟(𝑋) = 𝜎 = 𝐸(𝑋 − (𝐸(𝑋)) = 21 − ( ) = .
3 9
5.2.1 : Properties of Variance
𝑉𝑎𝑟(𝑋) = 𝐸[(𝑋 − 𝜇)2 ]
(𝑋 − 𝜇)2 = 𝑋 2 − 2𝜇𝑋 + 𝜇2 ≥ 0 since (𝑋 − 𝜇)2 is the square of a real
quantity. Therefore
𝐸(𝑋 2 ) − 2𝜇𝐸(𝑋) + 𝜇2 ≥ 0
𝐸(𝑋 2 ) − 𝜇2 ≥ 0
Thus
𝑉𝑎𝑟(𝑋) ≥ 0 (1)
𝐸(𝑋 + 𝑏) = 𝐸(𝑋) + 𝑏 = 𝜇 + 𝑏
COURTESY OF MICHELLE OWINO
𝐸(𝑎𝑋 + 𝑏) = 𝑎𝐸(𝑋) + 𝑏 = 𝑎𝜇 + 𝑏.
1
(𝑥 + 1), −1 < 𝑥 < 1
𝑓(𝑥) = {2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1 1 𝑥 1
𝜇 = 𝐸(𝑋) = ∫−1 𝑥𝑓(𝑥)𝑑𝑥 = ∫−1 (𝑥 + 1)𝑑𝑥 = and
2 3
1 1 𝑥2 1
𝐸(𝑋 2 ) = ∫−1 𝑥 2 𝑓(𝑥)𝑑𝑥 = ∫−1 (𝑥 + 1)𝑑𝑥 = . Therefore
2 3
1 1 2
𝑉𝑎𝑟(𝑋) = 𝜎 2 = 𝐸(𝑋 2 ) − 𝜇2 = − = . Hence
3 9 9
2
𝑉𝑎𝑟(6𝑋 + 11) = 36 ( ) = 8.
9
Example 5.4
𝑋−𝜇
Obtain the mean and variance of the random variable 𝑌 = , where
𝜎
𝜇 and 𝜎 are the mean and variance of a random variable X.
Solution
𝑋−𝜇 1
𝐸(𝑌) = 𝐸 ( ) = 𝐸(𝑋 − 𝜇) = 0
𝜎 𝜎
𝑋−𝜇 1 1
𝑉𝑎𝑟(𝑌) = 𝑉𝑎𝑟 (
𝜎
) = 𝜎2 𝑉𝑎𝑟(𝑋) = 𝜎2 × 𝜎 2 = 1 .
NB: Thus, the random variable Y has mean 0 and standard deviation one.
𝑋−𝜇
The linear transformation 𝑦 = is called a standardizing
𝜎
transformation and Y is called a standardized random variable.
5.4: Assessment
COURTESY OF MICHELLE OWINO
1
, 𝑥 = 1,2,3, … , 𝑛
𝑓(𝑥) = {𝑛
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑛2 −1
Show that 𝜎 2 = .
12
1
, 𝑎<𝑥<𝑏
𝑓(𝑥) = {𝑏−𝑎
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Where a and b are real numbers. Show that
1
𝜎2 = (𝑏 − 𝑎)2 .
12
4 4
If 𝐸(𝑋) = and (𝑋) = , determine the values of the constants a,b
3 45
and c.
COURTESY OF MICHELLE OWINO
LESSON SIX
MOMENT GENERATING FUNCTION
6.1: Introduction
In this lesson we will consider moment generating functions of various random
variables, and hence use them to determine the mean and variance of random
variables. We will use the concept of expectation which we discussed in lesson
four.
𝑡𝑘
= ∑∞
𝑘=0 𝑋
𝑘
and
𝑘!
𝑡𝑘
𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 ) = ∑∞ 𝑘
𝑘=0(𝑋 ) .
𝑘!
COURTESY OF MICHELLE OWINO
𝑥
, 𝑥 = 1,2,3
𝑓(𝑥) = {6
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain the m.g.f of X and use it to compute the mean and variance of X.
Solution
𝑥
𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 ) = ∑6𝑥=0 𝑒 𝑡𝑋
6
1 2 3
= + 𝑒 2𝑡 + 𝑒 3𝑡
6 6 6
∕ 1 4 9
𝑀𝑋 (𝑡) = + 𝑒 2𝑡 + 𝑒 3𝑡 and therefore
6 6 6
∕ 1 4 9 7
𝐸(𝑋) = 𝑀𝑋 (0) = + 𝑒 0 + 𝑒 0 = .
6 6 6 3
∕∕ 1 8 27
𝑀𝑋 (𝑡) = + 𝑒 2𝑡 + 𝑒 3𝑡 .
6 6 6
∕∕ 1 8 27
𝐸(𝑋 2 )=𝑀𝑋 (0) = + + = 6. Hence
6 6 6
7 2 5
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − [𝐸(𝑋)]2 = 6 − ( ) = .
3 9
Example 6.2
A continuous random variable X has the standardized normal density
COURTESY OF MICHELLE OWINO
𝑥2
1 −
𝑓(𝑥) = {√2𝜋 𝑒 , −∞ < 𝑥 < ∞
2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Obtain the m.g.f of 𝑓(𝑥) and use it to compute the mean and variance of X.
Solution
The m.g.f of X is given by
𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 )
∞
= ∫𝑥=−∞ 𝑒 𝑡𝑥 𝑓(𝑥)𝑑𝑥
𝑥 2
1 ∞ 𝑡𝑥 − 2
= ∫ 𝑒 𝑒 𝑑𝑥
√2𝜋 𝑥=−∞
𝑡2
=𝑒 2
∕
𝐸(𝑋) = 𝜇 = 𝑀𝑋 (0) = 0
𝑡2 𝑡2
∕∕ 2
𝑀𝑋 (𝑡) =𝑒 +𝑡 𝑒 2 2
∕∕
𝐸(𝑋 2 )=𝑀𝑋 (0) = 1 . Therefore
LESSON SEVEN
BERNUOLLI, BINOMIAL AND HYPERGEOMETRIC
DISTRIBUTIONS
7.1: Introduction
In this lesson some special discrete distributions namely Bernoulli, Binomial
and Hypergeometric distributions. The binomial distribution is also known as
Bernoulli distribution. It has been used to describe a wide variety of processes
in business and social sciences. We determine moments of each these
distributions.
7.2: Lesson Learning outcomes
By the end of this lesson the learner will be able to:
i. Define Bernoulli, Binomial and Hypergeometric distributions
ii. Determine means and variances of these distributions
𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥)
𝑥=0
= ∑1𝑥=0 𝑥 𝑝 𝑥 (1 − 𝑝)1−𝑥 = 𝑝.
The variance of X is given by
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − [𝐸(𝑋)]2
COURTESY OF MICHELLE OWINO
Geometric Distribution
p1 p x , x 0,1,2,
f x
0, elsewhere
M x t E e tx
e tx f x
x 0
e tx p1 p
x
x 0
p e t 1 p
x
p 1 e t 1 p e t 1 p 2
p
1 e 1 p
t
p
, where q 1 p
1 qet
pqet
M t
'
x
1 qe t 2
E x M x' 0
pq q
1 q 2 p
2 pq 2 e 2t pqet
M t
''
x
1 qe 1 qe
t 3 t 2
M x'' 0
2 pq 2 pq
1 q 1 q 2
3
2q 2 q
2
p p
COURTESY OF MICHELLE OWINO
Varx M x'' 0 M x' 0 2
2
2q 2 q q
2
p p p
q2 q
p2 p
q 2 pq
p2
q p q
p2
q
2
p
𝑀 𝑥(𝑀−1 𝑁−𝑀
𝑥−1 )( 𝑛−𝑥 ) 𝑛𝑀
= 𝑛 ( ) ∑𝒏𝒙=𝟏 = .
𝑁 (𝑁−1
𝑛−1 )
𝑁
(𝑀 𝑁−𝑀
𝑥 )( 𝑛−𝑥 )
𝐸[𝑋(𝑋 − 1)] = ∑𝑛𝑥=1 𝑥(𝑥 − 1)
(𝑁
𝑛)
𝑛𝑀 (𝑁−𝑀)(𝑁−𝑛
= [ ].
𝑁 𝑁(𝑁−1)
Example 7.3
A committee of 4 people is to be selected at random from among 10 people of
whom 3 are women and 7 are men. Let X denote the number of women
selected. Obtain
(i) the probability distribution of X,
(ii) the mean and the variance of X.
Solution
The random experiment described here would give rise to the hypergeometric
probability model. Thus,
7.4: Assessment
1. A batch of 20 manufactured items contains 6 defective items, 5 items
are chosen at random from this batch. If X is the number of defective
items in the sample, find the probability distribution of X.
2. A study has shown that 80% of all families living in a certain residential
estate in Nakuru own a TV set. If 20 families are randomly selected from
this estate, compute the probability that
COURTESY OF MICHELLE OWINO
LESSON EIGHT
POISSON DISTRIBUTION
8.1: Introduction
In this lesson we will discuss Poisson distribution. It is applied to experiments
with random and independent occurrences. Some practical situations where
Poisson distribution can be used are:
i. In quality control statistics to count the number of defects of an item,
ii. In biology to count the number of bacteria,
iii. In physics to count the number of particles emitted from a radio-active
substance,
iv. In insurance problems to count the of causalities.
8.2: Lesson Learning outcomes
By the end of this lesson the learner will be able to:
i. define a Poisson distribution,
ii. obtain the mean, variance and moment generating function of a
Poisson random variable,
iii. State some of the uses of Poisson distribution in everyday life.
8.2: Poisson distribution
A random variable X is defined to have a Poisson distribution if its density is
given by
𝑒 −𝜆 𝜆𝑥
𝑃(𝑋 = 𝑥) = 𝑓(𝑥) = { , 𝑥 = 0,1,2, …
𝑥!
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒0
Where the parameter 𝜆 satisfies 𝜆 > 0.
The mean of Poisson random variable X is given by
COURTESY OF MICHELLE OWINO
𝐸(𝑋) = ∑∞
𝑥=0 𝑥𝑓(𝑥)
𝑒 −𝜆 𝜆𝑥
= ∑∞
𝑥=0 𝑥 𝑥!
𝜆𝑥−1
= 𝑒 −𝜆 𝜆 ∑∞
𝑥=1 𝑥 𝑥(𝑥−1)!
= 𝑒 −𝜆 𝜆𝑒 𝜆 = 𝜆.
The variance of X is given by
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − [𝐸(𝑋)]2 .
But 𝐸(𝑋 2 ) = ∑∞ 2
𝑥=0 𝑥 𝑓(𝑥)
𝑒 −𝜆 𝜆𝑥
= ∑∞
𝑥=0 𝑥
2
𝑥!
𝑒 −𝜆 𝜆𝑥
= ∑∞
𝑥=1[𝑥(𝑥 − 1) + 𝑥] 𝑥!
𝑒 −𝜆 𝜆𝑥 𝑒 −𝜆 𝜆𝑥
= ∑∞
𝑥=1 𝑥(𝑥 − 1) + ∑∞
𝑥=0 𝑥
𝑥! 𝑥!
𝑒 −𝜆 𝜆𝑥
= 𝑒 −𝜆 𝜆2 ∑∞
𝑥=2 𝑥(𝑥 − 1) +
𝑥(𝑥−1)(𝑥−2)!
𝑒 −𝜆 𝜆𝑥
∑∞
𝑥=0 𝑥 𝑥!
= 𝑒 −𝜆 𝜆2 𝑒 𝜆 + 𝜆
= 𝜆2 + 𝜆.
∴ 𝑉𝑎𝑟(𝑋) = 𝜆2 + 𝜆 − 𝜆2 = 𝜆.
Example 8.1
The number of male mates of a queen bee was found to have a Poisson
distribution with parameter 𝜆 = 2.7. Find the probability that the number, X,
of male mates of a queen bee is
(i) exactly 2,
(ii) at most 2,
(iii)between 1 and 3, inclusive,
Solution
The probability distribution of X is given by
𝑒 −𝜆 𝜆𝑥
𝑃(𝑋 = 𝑥) = 𝑓(𝑥) = { , 𝑥 = 0,1,2, …
𝑥!
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒0
COURTESY OF MICHELLE OWINO
2.72
(i) 𝑃(𝑋 = 2) = 𝑓(2) = 𝑒 −2.7 = 0.2450
2!
(ii) 𝑃(𝑋 ≤ 2) = 𝑃(𝑋 = 0) + 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2)
2.70 2.71 2.72
= 𝑒 −2.7 + 𝑒 −2.7 + 𝑒 −2.7
0! 1! 2!
= 0.0672+0.1815+0.2450 = 0.4937
2.71 2.72 2.73
(iii) 𝑃(1 ≤ 𝑋 ≤ 3) = 𝑒 −2.7 + 𝑒 −2.7 + 𝑒 −2.7 = 0.6470
1! 2! 3!
𝑒 −𝜆 𝜆𝑥
= ∑∞
𝑥=0 𝑒
𝑡𝑥
𝑥!
(𝜆𝑒 𝑡 )𝑥
= 𝑒 −𝜆 𝜆 ∑∞
𝑥=0 𝑥!
𝑡
= 𝑒 −𝜆 𝑒 𝜆𝑒
𝑡 −1)
= 𝑒 𝜆(𝑒 .
The mean and variance of X can be obtained using this m.g.f as follows:
∕ 𝑡 −1)
𝑀𝑋 (𝑡) = 𝜆𝑒 𝑡 𝑒 𝜆(𝑒 .
∕
∴ 𝐸(𝑋) = 𝑀𝑋 (0) = 𝜆
∕∕ 𝑡 −1) 𝑡 −1)
𝑀𝑋 (𝑡) = 𝜆2 𝑒 2𝑡 𝑒 𝜆(𝑒 + 𝜆𝑒 𝑡 𝑒 𝜆(𝑒
∕∕ 0 −1) 0 −1)
Therefore 𝐸(𝑋 2 ) = 𝑀𝑋 (0) = 𝜆2 𝑒 0 𝑒 𝜆(𝑒 + 𝜆𝑒 0 𝑒 𝜆(𝑒 = 𝜆2 + 𝜆 .
Thus 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − [𝐸(𝑋)]2 = 𝜆2 + 𝜆 − 𝜆2 = 𝜆 .
8.2.1: Approximating Binomial Probabilities
The Poisson distribution can be used in approximating binomial probabilities
when the number of trials n becomes large, and the expected number of
successes np remains unchanged.
Consider the binomial distribution with parameters n and p. Then
COURTESY OF MICHELLE OWINO
𝑛! 𝑚 𝑥 𝑚 𝑛−𝑥
𝑓(𝑥) = ( ) (1 − 𝑛 )
𝑥!(𝑛−𝑥)! 𝑛
𝑛(𝑛−1)(𝑛−2)…(𝑛−𝑥+1)(𝑛−𝑥)! 𝑚𝑥 𝑚 𝑛 𝑚 −𝑥
= (1 − 𝑛 ) (1 − 𝑛 )
𝑥!(𝑛−𝑥)! 𝑛𝑥
1 𝑛 𝑛−1 𝑛−𝑥+1 𝑚 𝑛 𝑚 −𝑥
= ( ×
𝑥! 𝑛 𝑛
× …×
𝑛
) 𝑚 𝑥 (1 − 𝑛 ) (1 − 𝑛 )
But
𝑚 −𝑥 𝑛 𝑛−1 𝑛−𝑥+1
lim (1 − ) = 1 , lim ( × × …× ) = 1 and
𝑛→∞ 𝑛 𝑛
𝑛→∞ 𝑛 𝑛
𝑚 𝑛
lim (1 − ) = 𝑒 −𝑚 . Therefore taking limits as 𝑛 → ∞ and holding np
𝑛→∞ 𝑛
fixed,
We have
𝑚𝑥 𝑒 −𝑚
𝑓(𝑥) → . Hence
𝑥!
𝑒 −𝑛𝑝 (𝑛𝑝)𝑥
lim (𝑛𝑥)𝑝 𝑥 (1 − 𝑝)𝑛−𝑥 =
𝑛→∞ 𝑥!
for fixed np. Thus for large but finite n and small p, one can approximate the
binomial distribution with parameters n and p with the Poisson distribution
with mean 𝑚 = 𝑛𝑝 .
Example 8.2
A machine produces 1% defective items. Suppose it produces 1000 items.
What is the probability that an item selected at random is defective?
Solution
Let X be the number of defective items among the 1000 items produced by the
machine. Then X is binomially distributed with parameters
𝑛 = 1000 and 𝑝 = 0.01. Therefore
1000
𝑃(𝑋 = 1) = 𝑓(1) = ( ) (0.01)1 (0.99)999 = 0.00044
1
Using the Poisson approximation with 𝑚 = 𝑛𝑝 = 10 we have
𝑒 −1010𝑥
(1000
𝑥
)(0.01)𝑥 (0.99)1000−𝑥 ≃ 𝑥!
And
𝑒 −10101
𝑃(𝑋 = 1) ≃ = 0.0005
1!
8.4: Assessment
1. Use the Poisson approximation to compute the following probabilities
(i) 𝑃(𝑋 = 45) , where X is a binomial random variable with parameters
𝑛 = 100 and = 0.5 .
(ii) 𝑃(𝑋 ≤ 2) , where X is a binomial random variable with parameters
𝑛 = 120 and = 0.04 .
2. If X is a random variable with Poisson distribution satisfying 𝑃(𝑋 = 0) =
𝑃(𝑋 = 1), what is (𝑋) ?
1
3. If X has a Poisson distribution and 𝑃(𝑋 = 0) = , what is (𝑋) ?
2
COURTESY OF MICHELLE OWINO
LESSON NINE
NORMAL DISTRIBUTION
9.1: Introduction
In this lesson we consider the normal distribution which plays an important
role in solving everyday problems. If we want to compare performance of
students in different subjects we must standardize their scores assuming marks
are approximately normal.
9.2: Lesson Learning outcomes
By the end of this lesson the learner will be able to:
i. Define a normal distribution,
ii. State properties of a normal distribution,
iii. obtain the mean, variance and moment generating function of a
normal random variable,
iv. State some of the uses of normal distribution in everyday life.
Now 𝑋 = 𝜎𝑍 + 𝜇 .Thus
𝑀𝑋 (𝑡) = 𝐸[𝑒 𝑡𝑋 ]
= 𝐸[𝑒 𝑡(𝜎𝑍+𝜇) ]
= 𝑒 𝑡𝜇 𝐸[𝑒 𝑡𝜎𝑍 ]
Putting 𝑡 ⋇ = 𝑡𝜎 we have
∗
∴ 𝑀𝑋 (𝑡) = 𝑒 𝑡𝜇 𝐸[𝑒 𝑡 𝑍 ]
2
𝑡∗
𝑡𝜇
=𝑒 𝑒 2
1 2 2
= 𝑒 𝑡𝜇+2𝜎 𝑡
∕
∴ 𝐸(𝑋) = 𝑀𝑋 (0) = 𝜇𝑒 0 = 𝜇.
1 2 2 1 2 2
∕∕
𝑀𝑋 (𝑡) = (𝜇 + 𝜎 2 𝑡)2 𝑒 𝑡𝜇+2𝜎 𝑡
+ 𝜎 2 𝑒 𝑡𝜇+2𝜎𝑡
∕∕
∴ 𝐸(𝑋 2 ) = 𝑀𝑋 (0) = 𝜇2 + 𝜎 2 , ∴ 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) −
[𝐸(𝑋)]2
𝑉𝑎𝑟(𝑋) = 𝜇2 + 𝜎 2 − 𝜇2 = 𝜎 2 .
Example 9.1
COURTESY OF MICHELLE OWINO
𝑎−𝜇 𝑏−𝜇
= 𝑃( ≤𝑍≤ )
𝜎 𝜎
𝑏−𝜇 𝑎−𝜇
= Φ( ) − Φ( )
𝜎 𝜎
Example 9.2
A random variance X is normally distributed with mean 50 and standard
deviation 10. Calculate 𝑃(45 ≤ 𝑋 ≤ 62) .
Solution
𝜇 = 50 , 𝜎 = 10 ⇒ 𝑋 ∽ 𝑁(50,10).
45−50 𝑋−50 62−50
𝑃(45 ≤ 𝑋 ≤ 62) = 𝑃( ≤ ≤ )
10 10 10
= 𝑃(−0.5 ≤ 𝑍 ≤ 1.2)
= Φ(1.2) − Φ(−0.5)
= Φ(1.2) − [1 − Φ(0.5)]
= 0.8849 − [1 − 0.6915]=0.5764.
Example 9.3
In an examination the average mark was 76.5 and the standard deviation was
9.5. If 15% of the class scored grade A and the marks are assumed to follow a
normal distribution, what is the lowest possible grade A mark and the highest
possible grade B mark?
Solution
𝑋 ∽ 𝑁(76.5 , 9.5).
Let a be the lowest possible grade A mark . Then
𝑃(𝑋 ≥ 𝑎) = 0.15
𝑎−76.5
Standardizing X we have 𝑃 (𝑍 ≥ ) = 0.15 or
9.5
𝑎−76.5
𝑃 (𝑍 ≤ ) = 0.85 .
9.5
Therefore, the lowest grade A mark is 87, and the highest grade B mark, is 86.
COURTESY OF MICHELLE OWINO
Example 9.4
If a random variable X is normally distributed with mean 𝜇 and variance 𝜇2 ,
and if 𝑃(𝑋 ≤ 8) = 0.95 , determine 𝑃(4 ≤ 𝑋 ≤ 11).
Solution
𝑋 ∽ 𝑁(𝜇, 𝜇)
8−𝜇
𝑃(𝑋 ≤ 8) = 𝑃 (𝑍 ≤ ) = 0.95
𝜇
8−𝜇 8−𝜇
i.e Φ ( ) = 0.95 ⇒ = 1.65
𝜇 𝜇
𝜇 = 3.02.
4−𝜇 11 − 𝜇
∴ 𝑃(4 ≤ 𝑋 ≤ 11) = 𝑃 ( ≤𝑍≤ )
𝜇 𝜇
= 𝑃(0.32 ≤ 𝑍 ≤ 2.64)
= Φ(2.64) − Φ(0.32)
= 0.9495 − 0.6255 = 0.3240.
Example 9.5 Let X be 𝑁(𝜇, 𝜎) so that 𝑃(𝑋 ≤ 89) = 0.90 and 𝑃(𝑋 ≤ 94)0.95.
Find 𝜇 and 𝜎 2 .
Solution
89−𝜇 89−𝜇
𝑃(𝑋 ≤ 89) = 0.90 ⇒ 𝑃 (𝑍 ≤ 𝜎 ) = 0.90 ⇒ 𝜎 = 1.28
𝜇 + 1.28𝜎 = 89 … … … … . . (1)
Similarly
94−𝜇 94−𝜇
𝑃(𝑋 ≤ 94) = 0.95 ⇒ 𝑃 (𝑍 ≤ 𝜎 ) = 0.95 ⇒ 𝜎 = 1.65
𝜇 + 1.65𝜎 = 94 … … … … . . (2)
Solving equations (1) and (2) simultaneously we have
𝜇 = 71.7 and 𝜎 2 = 182.25
COURTESY OF MICHELLE OWINO
9.5 Assessment
1. Given that X is normal with mean 10 and variance 4, compute
𝑃(|𝑋 − 10| > 1.8).
2. If 𝑋 ∽ 𝑁(10, 𝜎) and 𝑃(𝑋 > 12) = 0.1537, determine 𝑃(9 < 𝑋 < 11).
𝑋−𝜇
3. If 𝑋 ∽ 𝑁(𝜇, 𝜎), find the constant b so that 𝑃 (−𝑏 ≤ ≤ 𝑏) = 0.95.
𝜎
4. Let X be normally distributed with mean 𝜇 and variance 𝜎 2 ,and suppose
that (𝑋 ≤ 69) = 0.90 and 𝑃(𝑋 ≤ 74) = 0.95. Find 𝜇 and 𝜎 2 .
5. The time required to perform a certain job is a random variable having a
normal distribution with mean 50 minutes and a standard deviation of
10 minutes. Compute the probabilities that
(i) the job will take more than 75 minutes,
(ii) the job will take less than 60 minutes,
(iii) the job will take between 45 and 60 minutes.
LESSON TEN
GAMMA, EXPONENTIAL AND BETA
DISTRIBUTIONS
10.1: Introduction
In this lesson we will discuss gamma, exponential and beta distributions.
Their moments will be discussed.
10.2: Lesson Learning outcomes
By the end of this lesson the learner will be able to:
i. State the probability distributions of gamma, exponential and beta
random variables,
ii. Obtain the moments of gamma, exponential and beta random
variables.
𝛽𝛼 ∞
= ∫ 𝑥 𝛼+𝑘−1 𝑒 −𝛽𝑥 𝑑𝑥
Γ(𝛼) 0
𝛽𝛼 Γ(𝛼+𝑘) Γ(𝛼+𝑘)
= . =.
Γ(𝛼) 𝛽 𝛼+𝑘 𝛽 𝑘 Γ(𝛼)
Γ(𝛼+1) 𝛼Γ(𝛼) 𝛼
Thus 𝐸(𝑋) = = = which the mean of X.
𝛽 Γ(𝛼) 𝛽Γ(𝛼) 𝛽
Γ(𝛼+2) (𝛼+1)αΓ(𝛼) (𝛼+1)α
Now 𝐸(𝑋 2 ) = = =
𝛽 2 Γ(𝛼) 𝛽 2 Γ(𝛼) 𝛽2
𝛽𝛼 ∞
= ∫ 𝑒 𝑡𝑥 𝑥 𝛼−1 𝑒 −𝛽𝑥 𝑑𝑥
Γ(𝛼) 𝑥=0
𝛽𝛼 ∞
= ∫ 𝑥 𝛼−1 𝑒 −(𝛽−𝑡)𝑥 𝑑𝑥
Γ(𝛼) 𝑥=0
𝛽𝛼 Γ(𝛼) 𝛽 𝛼
= . (𝛽−𝑡)𝛼 = ( ) , 𝑡<𝛽
Γ(𝛼) 𝛽−𝑡
We can now use this m.g.f of X to determine the mean and variance of X.
∕
𝑀𝑋 (𝑡)=𝛼𝛽 𝛼 (𝛽 − 𝑡)−𝛼−1
Therefore
∕ 𝛼
𝐸(𝑋) = 𝑀𝑋 (0)=𝛼𝛽 𝛼 (𝛽)−𝛼−1 =
𝛽
∕∕
𝑀𝑋 (𝑡)=𝛼(𝛼 + 1)𝛽𝛼 (𝛽 − 𝑡)−𝛼−2
∕∕ (𝛼+1)α
𝐸(𝑋 2 ) = 𝑀𝑋 (0)=𝛼(𝛼 + 1)𝛽𝛼 (𝛽)−𝛼−2 =
𝛽2
∞ 1
= 𝜆 ∫0 𝑥𝑒 −𝜆𝑥 𝑑𝑥 =
𝜆
∞
𝐸(𝑋 2 ) = ∫0 𝑥 2 𝑓(𝑥)𝑑𝑥
∞ 2
= 𝜆 ∫0 𝑥 2 𝑒 −𝜆𝑥 𝑑𝑥 = .
𝜆2
2 1 1
= − = .
𝜆2 𝜆2 𝜆2
𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 )
∞
= ∫𝑥=0 𝑒 𝑡𝑥 𝑓(𝑥)𝑑𝑥
∞
= 𝜆 ∫𝑥=0 𝑒 𝑡𝑥 𝑒 −𝜆𝑥 𝑑𝑥
∞ 𝜆
= 𝜆 ∫𝑥=0 𝑒 −(𝜆−𝑡)𝑥 𝑑𝑥 = ,𝑡 < 𝜆 .
𝜆−𝑡
The mean and variance of X can be obtained by using the above m.g.f as
follows:
∕ 𝜆
𝑀𝑋 (𝑡) = (𝜆−𝑡)2
∕ 𝜆 1
∴ 𝐸(𝑋) = 𝑀𝑋 (0) = (𝜆−0)2 =
𝜆
∕∕ 2𝜆
𝑀𝑋 (𝑡) = (𝜆−𝑡)3
∕∕ 2𝜆 2
∴ 𝐸(𝑋 2 ) = 𝑀𝑋 (0) = (𝜆−0)3 =
𝜆2
Example 10.1
Suppose that the number of minutes required to serve a costumer at service
counter has an exponential distribution with mean 2. Compute the probability
that the time required to serve a single costumer will exceed 4 minutes.
Solution
Let X denote the number of minutes required to serve a costumer at a service
counter. Then
1 1
𝐸(𝑋) = 2 = ⇒ 𝜆 =
𝜆 2
1
1− 𝑥
𝑓(𝑥) = {2 𝑒 , 𝑥 > 0
2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
∞ 1 ∞
1 −1𝑥 − 𝑥
∴ 𝑃(𝑋 > 4) = ∫ 𝑒 2 𝑑𝑥 = [−𝑒 2 ] = 0.1353
4 2 4
1 Γ(𝛼)Γ(𝛽)
NB: ∫0 𝑥 𝛼−1 (1 − 𝑥)𝛽−1 𝑑𝑥 = = Β(𝛼, 𝛽)
Γ(𝛼+𝛽)
1
𝑘)
𝐸(𝑋 = ∫ 𝑥 𝑘 𝑓(𝑥)𝑑𝑥 , 𝑘 = 1,2, …
0
Γ(𝛼+𝛽) 1 𝑘
= ∫ 𝑥 𝑥 𝛼−1 (1 − 𝑥)𝛽−1 𝑑𝑥
Γ(𝛼)Γ(𝛽) 0
Γ(𝛼+𝛽) 1
= ∫ 𝑥 𝛼+𝑘−1 (1 − 𝑥)𝛽−1 𝑑𝑥
Γ(𝛼)Γ(𝛽) 0
Γ(𝛼+𝛽) Γ(𝛼+𝑘)Γ(𝛽)
= .
Γ(𝛼)Γ(𝛽) Γ(𝛼+𝛽+𝑘)
Γ(𝛼+𝛽) Γ(𝛼+𝑘)
= .
Γ(𝛼) Γ(𝛼+𝛽+𝑘)
Putting k=1 we have
Γ(𝛼+𝛽) Γ(𝛼+1)
𝐸(𝑋) = .
Γ(𝛼) Γ(𝛼+𝛽+1)
Γ(𝛼+𝛽) αΓ(𝛼) 𝛼
= . (𝛼+𝛽)Γ(𝛼+𝛽) = .
Γ(𝛼) 𝛼+𝛽
COURTESY OF MICHELLE OWINO
Γ(𝛼+𝛽) α(𝛼+1)Γ(𝛼)
= . (𝛼+𝛽)(𝛼+𝛽+1)Γ(𝛼+𝛽)
Γ(𝛼)
𝛼(𝛼+1)
= (𝛼+𝛽)(𝛼+𝛽+1)
𝛼(𝛼+1) 𝛼2
= (𝛼+𝛽)(𝛼+𝛽+1) − (𝛼+𝛽)2
𝛼𝛽
= (𝛼+𝛽)2 (𝛼+𝛽+1) .
10.4 : Assessment
1. Show that, if in gamma density 𝛼 = 1, then the gamma density
specializes exponential density.
2. Show that the beta distribution reduces to the uniform distribution
over (0,1) if 𝛼 = 𝛽 = 1.
LESSON ELEVEN
FUNCTIONS OF A RANDOM VARIABLE
11.1: Introduction
In this lesson we will be discussing change of variable technique. We will
consider the distribution of a function of a univariate random variable. That is,
COURTESY OF MICHELLE OWINO
for a given random variable X we seek the distribution of 𝑈 = Φ(𝑋) for some
function 𝑔(𝑢).
11.2: Lesson Learning outcome
By the end of this lesson the learner will be able to obtain the probability
distribution a new random variable which is expressed terms of a random
variable with known density.
11.3: Change of variable
4 3 √𝑢 1 4−√𝑢
𝑔(𝑢) = {(√𝑢) (4) (4) , 𝑢 = 0,1,4,9,16
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Example 11.2
Suppose that X has the discrete distribution given in the following table:
COURTESY OF MICHELLE OWINO
𝑥 -3 -2 -1 0 1 2 3
𝑓(𝑥) 4 1 1 1 1 1 4
21 6 14 7 14 6 21
Find the distribution of the random variable 𝑈 = 3𝑋 2 + 1.
Solution
The possible values of U are 1,4,13,28.
1
𝑃(𝑈 = 1) = 𝑃(𝑋 = 0) =
7
1 1 1
𝑃(𝑈 = 4) = 𝑃(𝑋 = −1 𝑜𝑟 𝑋 = 1) = 𝑃(𝑋 = −1) + 𝑃(𝑋 = 1) = + =
14 14 7
𝑃(𝑈 = 13) = 𝑃(𝑋 = −2 𝑜𝑟 𝑋 = 2) = 𝑃(𝑋 = −2) + 𝑃(𝑋 = 2)
1 1 1
= + =
6 6 3
= ∫𝑥:𝜙(𝑥)≤𝑢 𝑓(x) 𝑑𝑥
COURTESY OF MICHELLE OWINO
𝑑𝐺(𝑢) 1
∴ 𝑔(𝑢) = = (𝑢 − 3)
𝑑𝑢 2
Example 11.4
Suppose that X has a uniform distribution on the interval (−1,1). Find the p.d.f
of 𝑈 = −𝑙𝑛|𝑋|.
Solution
In this case the p.d.f of X is
COURTESY OF MICHELLE OWINO
1
, −1<𝑥 <1
𝑓(𝑥) = { 2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The cd.f of U is given by
𝐺(𝑢) = 𝑃(𝑈 ≤ 𝑢)
= 𝑃(−𝑙𝑛|𝑋| ≤ 𝑢)
= 𝑃(|𝑋| ≥ 𝑒 −𝑢 )
= 1 − 𝑃(|𝑋| ≤ 𝑒 −𝑢 )
= 1 − 𝑃(−𝑒 −𝑢 ≤ 𝑋 ≤ 𝑒 −𝑢 )
𝑒 −𝑢
= 1 − ∫−𝑒 −𝑢 𝑓(𝑥)𝑑𝑥
𝑒 −𝑢 1
= 1 − ∫−𝑒 −𝑢 𝑑𝑥 = 1 − 𝑒 −𝑢
2
𝑒 −𝑢 , 𝑢>0
𝑔(𝑢) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Similarly if Φ is continuous and strictly decreasing over the interval (𝑎, 𝑏), then
U will vary over some interval (𝛼, 𝛽) as X varies over the interval (𝑎, 𝑏) , and
the inverse function 𝜔 will be continuous and strictly decreasing over the
interval (𝛼, 𝛽) . Hence for 𝛼 < 𝑢 < 𝛽 ,
𝐺(𝑢) = 𝑃(𝑈 ≤ 𝑢)
= 𝑃(Φ(𝑋) ≤ 𝑢)
= 𝑃(𝑋 ≥ 𝜔(𝑢))
= 1 − 𝑃(𝑋 ≤ 𝜔(𝑢))
= 1 − 𝐹(𝜔(𝑢))
If 𝜔 is differentiable over the interval (𝛼, 𝛽), then
𝑑𝐺(𝑢)
𝑔(𝑢) =
𝑑𝑢
𝑑[1−𝐹(𝜔(𝑢) )]
=
𝑑𝑢
𝑑𝜔(𝑢)
= −𝑓(𝜔(𝑢) ) for 𝛼 < 𝑢 < 𝛽.
𝑑𝑢
𝑑𝜔(𝑢)
Since 𝜔 is strictly decreasing, < 0 and hence 𝑔(𝑢) can be expressed in
𝑑𝑢
the form
𝑑𝜔(𝑢)
𝑔(𝑢) = 𝑓( 𝜔(𝑢)) | |.
𝑑𝑢
Example 11.5
Let X be a random variable with p.d.f given by
1
𝑥, 0 < 𝑥 < 2
𝑓(𝑥) = {2
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
COURTESY OF MICHELLE OWINO
11.6: Assessment
1. Suppose that X has the discrete distribution given in the following table:
x 0 1 2 3
f(x) 1 1 1 1
4 3 4 6
(1+𝑥)
5. If 𝑓(𝑥) = , −1 < 𝑥 < 1 , find the density of 𝑌 = 𝑋 2 .
2
References
1. Introduction to the Theory of Statistics by A.M. Mood, F.A. Graybill and
D.C. Boes .
2. Probability and Statistics by Rao V. Dukkip.
3. Statistical Methods by S.P.Gupta