SST 204 Module
SST 204 Module
SST 204 Module
0
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
X : S→R
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
S= { SSS , SSN , SNS , NSS , SNN , NSN , NNS , NNN }
Let X denote the number of smokers among three chosen boys. Then
X ( SSS )=3 , X ¿
1
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 x , 0 ≤ x ≤ 2.
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
2
f ( x )=P ( X =x )
and satisfying the following conditions:
( i ) f ( x ) ≥ 0 for all x
x=∞
( ii ) ∑ f ( x )=1.
x=−∞
Solution
1
P ( X=x )= , x=0,1,2,3,4,5,6,7
8
{
1
f ( x )= 8 ,∧x=0,1,2,3,4,5,6,7
0 ,∧otherwise
¿9
Obviously f ( x ) ≥0 and ∑ f ( x )=1.
x=0
{
1
,∧x=1,2 ,. . . , n
f ( x )= n
0 ,∧otherwise
3
{
1
,∧x=0,1,2 , . ..
f ( x )= 2x+1
0 ,∧otherwise
is a probability distribution.
Solution
∞ ∞
1 1 1 1
f ( x ) ≥0 , for all x and ∑ f ( x )=∑ 2
x+1
= + + + .. .=1. Hence f ( x ) is a probability
2 4 8
x=0 x=0
distribution.
{
f ( x )= kx ,∧x =2,3,4,5,6
0 ,∧0 therwise
∑ f ( x )=1
x=2
∑ kx=1
x=2
2 k +3 k + 4 k + 5 k +6 k =1
20 k =1
1
k=
20
4
Let X be a continuous random variable assuming values in R . A continuous
real valued function f ( x ) is said to be a probability density function (p.d.f) or
simply a probability distribution, of the random variable X if it satisfies the
following conditions:
( i ) f ( x ) ≥ 0 for all real x
∞
( ii ) ∫ f ( x ) dx=1 .
−∞
NB: P ( a ≤ X ≤ b )=∫ f ( x ) .
a
Example 1.6 Let X be a continuous random variable. Show that the function
{
1
f ( x )= 2 x ,∧0 ≤ x ≤ 2
0 ,∧otherwise
1
(
is a p.d.f of X. Hence calculate P 2 ≤ X ≤1 and P (−1≤ X ≤ 1 ). )
Solution
2 2
1
Clearly f ( x ) ≥0 , for all real x and ∫ f ( x ) =∫ x dx=1, Hence f ( x ) is a p.d.f.
0 0 2
1
P ( 12 ≤ X ≤1)=∫ 12 x dx= 163
1
and
2
0 1
1 1
P (−1≤ X ≤ 1 )=∫ f ( x ) dx +∫ f ( x ) dx=0+ = .
−1 0 4 4
5
{
1
kx + ,∧0 ≤ x ≤3
f ( x )= 30
0 ,∧eslewhere
∫ (kx + 30
1
) dx=1
0
1
k= .
5
{
1 1
x + ,∧0 ≤ x ≤ 3
Therefore f ( x )= 5 30 and hence
0 ,∧eslewhere
2
P ( 1≤ X ≤ 2 )=∫
1
( 15 x + 301 ) dx= 13
{
c ,∧a< x <b
Example 1.8 Let f ( x )= 0 ,∧otherwise
∫ c dx=1
a
1
c=
b−a
{
1
f ( x ) = ,∧a< x <b
Therefore b−a
0 ,∧otherwise
6
And such a distribution is known as rectangular density function on the interval
(a,b). If a=0 and b=1, then we have
{
f ( x )= 1 ,∧0< x<1
0 ,∧otherwise
as the
uniform density function on the unit interval (0,1).
7
discussion.
. Providing feedback
. Concluding the lesson in a summary
form
Schedule and time The lesson will last for two hours
Next Cumulative distribution functions
1.6 : Assessment
{
2
f ( x ) =
( 1+ x ) ,∧4 ≤ x ≤7
1. If 39
0 ,∧otherwise
is a p.d.f of a continuous random variable X calculate P ( X <5 ) and
P ( 5≤ X ≤ 6.5 ) .
{
−x
2. Let f ( x )= kx0e,∧x,∧x >0
≤0
be a p.d.f of X. Find the value of the constant k. Hence determine P ( X <5 )
and P ( X ≥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 P ( X <5 ) and P ( 3≤ X ≤ 7 ).
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
8
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
9
Thus, we may write
F ( x )=P ( X ≤ x )
The function F ( x ) is called the distribution function or cumulative distribution
function (c.d.f) of the random variable X.
F ( x ) =∑ f ( t )
t≤x
Example 2.1
Let X be a discrete random variable with probability distribution
{
1
f ( x )= 20
( x +1 ) ,∧x=1,2,3,4,5
0 ,∧otherwise
Solution
(i)
x 1 2 3 4 5
f(x) 0.1 0.15 0.2 0.25 0.3
Graph of f ( x )
(ii) F ( x )=P ( X ≤ x )
x
¿ ∑ f (t )
t=1
10
Since x is any real number it could lie in any one of the following
six mutually disjoint intervals
−∞ < x <1 ,1 ≤ x<2 , 2 ≤ x <3 , 3≤ x <4 , 4 ≤ x<5∧5 ≤x¿ ∞ . Thus
{
0 , x <1
1
,1 ≤ x<2
10
1
, 2≤ x <3
F ( x )= 4
9
, 3 ≤ x <4
20
7
, 4 ≤ x <5
10
1, x ≥ 5
Graph of F ( x )
(i) F ( x ) is a step function,
(ii) F ( x ) is everywhere continuous to the right of any point.
Example 2
Let X be a continuous random variable with probability density function (p.d.f)
given by
{
1
f ( x )= 2 x ,∧0< x <2
0 ,∧otherwise
Obtain the cumulative distribution function (c.d.f) of X and sketch its graph.
11
Solution
F ( x )=P ( X ≤ x )
x
¿ ∫ f ( t ) dt
−∞
{
0, x≤0
x
1
¿ ∫ 2 t dt , 0< x <2
0
1, x ≥ 2
{
0, x≤0
1 2
¿ x , 0< x< 2
4
1, x≥2
Graph of F ( x )
F ( x 2 ) ≥ F ( x1 ) .
12
lim F ( x )=0 and lim F ( x ) =1 .
❑
(4) x→−∞ x❑ ∞
→
¿ F ( x )−F ¿
{
0 , x< 0
F ( x )= 2 3
x+ , 0≤ x <5
25 5
1, x ≥ 5
(i) Graph of F ( x )
13
F ( x ) is discontinuous at x=0 . At this point we have
P ( X=0 )=F ( 0 )−F ¿ .
However, F ( x ) is differentiable in the interval 0< x ≤5 and so
¿
f ( x )=F ( x )
2
¿ , 0< x ≤5
25
{
3
, x =0
5
f ( x )= 2
, 0< x ≤ 5
25
0 , otherwise
Alternatively
P (−3 ≤ X ≤ 3 )=P ( 0 )+ P ( 0< X ≤ 3 )
3
¿ + F (3 )−F ( 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≤ x ≤ 2
f ( x )= 4
0 ,∧eslewhere
14
The limits for y are follows:
0≤ y≤4
G ( y )=P ( X ≤ y )
2
¿ P (− √ y ≤ X ≤ √ y )
√y
1 1
¿ ∫ 4
dt= √ y
2
−√ y
Therefore
{
0 , y <0
1
G ( y )= √ y , 0 ≤ y ≤ 4
2
1, y>4
g ( y )=G¿ ( y )
{
−1
1 2
¿ f ( x )= 4 y ,∧0 ≤ y ≤ 4
0 ,∧otherwise
15
Spark
{
1
,∧x =1,2,3,4
f ( x )= 4
0 ,∧otherwise
Determine the c.d.f of X and hence sketch its graph.
{
f ( x )= 2 x ,∧0< x <1
0 ,∧elsehwere
Find the c.d.f X and sketch its graph.
References
16
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
MODE AND MEDIAN OF DISTRIBUTION
3.1 : Introduction
In this lesson we discuss the mode and median of a probability
distribution.
3.2 : Lesson Learning Outcomes
Example 3.1
Find the mode of each of the following distributions:
{ ()
x−1
3 1
f ( x )= 4 4 ,∧x=1,2,3 ,. . .
(i)
0 ,∧otherwise
17
{
3 2
x ( x−1 ) ,∧0 ≤ x ≤ 2
(ii) f ( x )= 4
0 ,∧elsewhere
Solutions
d2 f ( x ) −3
Thus the mode of f ( x ) is 0 since 2 at
x=0 is < 0.
2
dx
3.2: MEDIAN
The median of f ( x ) is a value λ of the random variable X which satisfies
P ( X < λ ) ≤ 0.5 and P ( X ≤ λ ) ≥ 0.5 ,
Example 3.2
Obtain the median of each of the following distributions
18
{( )( ) ( )
x
4 1 3 4− x
,∧x =0,1,2,3,4
(i) f ( x )= x 4 4
0 ,∧otherwise
(ii) {
f ( x )= 2 x ,∧0< x< 1
0 ,∧otherwise
Solution
λ−1 λ
( )( ) ( )
0 4−0
1 3 81
f ( 0 )= 4 =
0 4 4 256
( )( ) ( )
1 4−1
1 3 27
f (1)= 4 =
1 4 4 64
189
P ( X ≤1 ) =P ( X=0 ) + P ( X =1 )=f ( 0 )+ f ( 1 )= >0.5
256
0
λ 1
∫ f ( x ) dx=0.5 or ∫ f ( x ) dx=0.5
0 λ
2
λ =0.5
λ=√ 0.5 .
19
3.4: SST 204 E-TIVITY
Numbering, pacing and Week3 , lesson 3
sequencing
Title Mode and Mean
20
3.5: Assessment
1. Let X be a continuous random variable with p.d.f given by
{
−2 x
f ( x )= 2 e ,∧x ≥ 0
0 , otherwise
Obtain the median of X.
2. The c.d.f of a continuous random variable U if given by
{
0 , u<0
π
F ( u ) = 1−cos u , 0 ≤u ≤ 2
π
1 ,u>
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.
21
4.3: Expectation
4.3.1: Expectation of a discrete random variable
∞
E ( X )= ∑ x f ( x )
x=−∞
Example 4.1
Let X be a discrete random variable with probability distribution given by
{
1
f ( x )= 6 ,∧x=1,2,3,4,5,6
0 ,∧otherwise
Obtain E ( x ).
Solution
∞
E ( X )= ∑ x f ( x )
x=−∞
( 16 )=3.5
6
¿∑ x
x=1
∞
E [ g ( X ) ]= ∑ g ( x ) f (x )
x=−∞
Example 4.2
The following table shows the probability distribution of a discrete
random variable X.
22
x 0 1 2 3
f(x) 1 1 1 1
4 3 4 6
2
Find the expected values of X and g ( X )= [ X−E ( X ) ] .
Solution
∞
(i) E ( X ) = ∑ xf ( x )
x=−∞
3
4
¿ ∑ xf ( x )=
x=0 3
[ ]
2
4
(ii) Therefore g(X)= X− .
3
Hence
∞
E [ g ( X ) ] =∑ g ( x ) f ( x )
−∞
( )
3
4 2
¿ ∑ x− f (x)
x=0 3
¿ ( )
−4 2
3
f ( 0 )+
−1 2
3 ( )
f ( 1 )+
2 2
3 ()
f ( 2) +
3 ()
5 2
f ( 3 )=
57
54
.
∞
E ( X ) =∫ xf ( x ) dx.
−∞
23
More generally, if g ( X ) is a function of X, then
∞
E [ g ( X ) ] = ∫ g ( x ) f ( x ) dx .
−∞
Example 4.3
Let X be a continuous random variable with p.d.f
{
1
f ( x )= 18
( x+ 3 ) ,∧−3< x <3
0 , otherwise
Compute E ( X ) and E ( X 2) .
Solution
∞
E ( X ) =∫ xf ( x ) dx.
−∞
3
1
¿∫ x ( x +3 ) dx=1
−3 18
and
∞
E ( X ) =∫ x f ( x ) dx .
2
−∞
3
1 2
¿∫ x ( x +3 ) dx=3 .
−3 18
NB: If E ( X ) exists then E|X| also exists. If E|X| does not exist, then
E|X|=∞.
Example 4.4
Let X be a continuous random variable with p.d.f given by
{
1
,∧−∞ < x <∞
f ( x )= π ( 1+ x 2 )
0 ,∧otherwise
24
Prove that E ( X ) does not exist.
Proof
∞ ∞
x
E ( X ) =∫ xf ( x ) dx= ∫ dx.
π ( 1+x )
2
−∞ −∞
∞ ∞
x
But ∫ xf ( x ) dx=∫ dx
π ( 1+ x )
2
0 0
[ ]
∞
1
¿ ln ( 1+ x2 ) =∞
2π 0
∞
¿ ∫ ( ax+ b ) f ( x ) dx.
−∞
∞ ∞
¿ a ∫ x f ( x ) dx +b ∫ f ( x ) dx
−∞ −∞
¿ aE ( X )+ b …………………………………….. (1)
25
Let g(X) and h( X ) be any two real valued functions of X. Then for any
constants a and
∞
E [ a g ( X ) +b h (X ) ] ¿ ∫ ( a g ( x ) +b h( x) ) f ( x ) dx .
−∞
∞ ∞
¿ a ∫ g ( x ) f ( x ) dx+ b ∫ h( x)f ( x ) dx
−∞ −∞
¿ aE [ g ( X ) ] +b [ h( X ) ]……………………… (2)
Example 4.5
Let X be a discrete random variable with probability distribution
{
x
f ( x )= 10 ,∧x=1,2,3,4
0 ,∧otherwise
Compute E [ 5 X 3−2 X 2 ].
Solution
E [ 5 X −2 X ] =5 E ( X )−2 E ( X )
3 2 3 2
4 4 3
x
But E X =∑ x f ( x ) =∑ =10 and
( 2
) 2
x=1 x=1 10
4 4 4
x
E ( X ) =∑ x f ( x ) =∑
3 3
=35.4
x=1 x=1 10
Therefore
E [ 5 X −2 X ]=5 ( 35.4 )−2 ( 10 )=157.
3 2
26
sequencin
g
Title Expectation
4.5 Assessment
1. Let X be a discrete random variable with probability distribution given by
27
{
1
f ( x )= n ,∧x=1,2,3 , … , n
0 ,∧otherwise
n+ 1
Show that E ( X ) = 2 .
{
1
f ( x )= b−a ,∧a< x <b
0 ,∧otherwise
Where a and b are real numbers. Show that
a+b 1 2
E ( X ) = ( b + ab+a ) .
2 2
E ( X )= and
2 3
{
1
f ( x )= 2
( x+ 1 ) ,∧−1< x< 1
0 ,∧otherwise
Compute E ( X ) , E ( X 2) ∧E ( X 3 ) .
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.
28
3. Statistical Methods by S.P. Gupta
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 f ( x ). 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 f ( x ) . It is usually denoted by μ . That is
μ= E ( X )
29
The kth moment about x=0 is defined by
μk∕ =E ( X k ) , k >0
Where
∕
μ1 =μ .
E [ ( X −a )k ] is called the kth moment of the random variable X about the point x=a
(if it exists).
μk =E [ ( X−μ ) ] is the kth moment of the rand variable X about μ, and is also called
k
central moment.
μ1=E ( X−μ )=E ( X )−μ=μ−μ=0 .This shows that the first moment about the mean
is always zero.
μ2=E [ ( X−μ )2 ] is the second central moment of a distribution commonly used as a
measure of dispersion or spread of the distribution. This is called the variance of
the distribution and is usually denoted by σ 2.
σ =Var ( X )=E [ ( X −μ ) ]
2 2
{
1
f ( x )= 9 ( 3−|x|) ,∧−3< x< 3
0 ,∧otherwise
30
3 0
x x
¿ ∫ (3−x ) dx+ ∫ ( 3+ x ) dx=0
0 9 −3 9
Var ( X )=σ =E [ ( X −μ ) ]
2 2
¿ E [ ( X −0 )2 ]
¿ E ( X2)
3 0
x2 x2
¿∫ ( 3−x ) dx +∫ ( 3+ x ) dx=1.5
0 9 −3 9
NB: E [ ( X −μ )2 ]=E [ X 2 −2 μX + μ2 ]
¿ E ( X ) −2 μE ( X )+ E ( μ )
2 2
¿ E ( X ) =2 μ + μ
2 2 2
¿ E ( X 2 ) −μ2=σ 2=Var ( X )
Example 5.2
The probability distribution of a discrete random variable X is given by
{
x
f ( x )= 21 ,∧x =1,2,3,4,5,6
0 ,∧otherwise
6 6
x 2 13
μ= E ( X )=∑ xf ( x )=¿ ∑ = ¿.
x=1 x=1 21 3
31
6 6
x3
E X =∑ x f ( x ) =¿ ∑ =21 ¿
( 2
) 2
x=1 x=1 21
Therefore
Var ( X )=σ =E ( X )−μ =21−
2 2 2
( )
13 2 20
3
= .
9
5.2.1 : Properties of Variance
Var ( X )=E [ ( X−μ )2 ]
32
( X −μ )2=X 2−2 μX + μ2 ≥ 0 since ( X −μ )2 is the square of a real quantity. Therefore
E ( X ) −2 μE ( X )+ μ ≥ 0
2 2
E ( X 2) −μ2 ≥ 0
E ( X +b )=E ( X ) + b=μ+ b
2
Var ( aX +b )=a Var ( X ) . (2)
E ( aX +b )=aE ( X )+ b=aμ+b .
¿ E {[ aX =aμ ] }
2
¿ a E {[ X =μ ] }=a Var ( X ) .
2 2 2
33
1. Let X be a continuous random variable with p.d.f
{
1
f ( x )= 2
( x+ 1 ) ,∧−1< x< 1
0 ,∧otherwise
But
Var ( X )=σ =E ( X )−μ
2 2 2
1 1
x 1
μ= E ( X )=∫ xf ( x ) dx=∫ ( x+1 ) dx= and
−1 −1 2 3
1 1 2
x 1
E ( X ) =∫ x f ( x ) dx=∫ ( x+ 1 ) dx = . Therefore
2 2
−1 −1 2 3
1 1 2
Var ( X )=σ =E ( X )−μ = − = . Hence
2 2 2
3 9 9
X −μ
Obtain the mean and variance of the random variable Y = σ , where μ
and σ are the mean and variance of a random variable X.
Solution
E ( Y )=E ( X−μ
σ ) 1
= E ( X −μ )=0
σ
34
Var ( Y )=Var ( X −μ
σ ) σ
1 1 2
= Var ( X )= × σ =1 .
2 2
σ
NB: Thus, the random variable Y has mean and standard deviation one. The
X −μ
linear transformation y= σ is called a standardizing transformation and
Y is called a standardized random variable.
35
Interactio .Attempt the tasks given and post your solutions on
n begins discussion forum 4.4.
Compare your solutions with your colleagues
E- .Focusing group discussion
moderato . Motiving learners to participate in discussion.
r . Providing feedback
interventi . Concluding the lesson in a summary form
ons
Schedule The lesson will last for two hours
and time
Next Moment generating functions and probability generating
function
5.4: Assessment
{
1
,∧x=1,2,3 , … , n
f ( x )= n
0 ,∧otherwise
n2−1
Show that σ 2= .
12
36
{
1
,∧a< x <b
f ( x )= b−a
0 ,∧otherwise
Where a and b are real numbers. Show that
1
σ 2= ( b−a )2 .
12
{
1
f ( x )= 2
( x+ 1 ) ,∧−1< x< 1
0 ,∧otherwise
{
1
,∧0< x< 4
f ( x )= 4
0 ,∧eslehwhere
{
x
,∧x=0,1,2,3
f ( x )= 6
0 ,∧otherwise
{
2
f ( x )= a+ bx+ c x ,∧0 ≤ x ≤ 1
o ,∧eslehwhere
37
4 4
If E ( X ) = 3 and ar ( X )= 45 , determine the values of the constants a,b
and c.
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
LESSON SIX
MOMENT AND PROBABILITY GENERATING FUNCTIONS.
6.1: Introduction
In this lesson we will consider moment and probability 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.
38
By the end of this lesson the learner will be able to:
i. Determine the moment generating function of a random variable
ii. Determine the probability generating function of a random variable
iii. Find the mean and variance of a distribution using moment and
probability generating function
6.3: Moment Generating Function
Let X be a random variable with probability distribution f (x). Then the moment
generating function (m.g.f) of f ( x) is defined by
M X ( t )=E ( e )
tX
where t is any real number. When it exists, this expectation depends on the
choice of t, and so it defines a function of t. For t=0, it always exists since
M X ( o )=E ( e )=E ( 1 )=1,
0
∞ k
t
¿∑ X k
and
k=0 k!
∞ k
t
M X ( t )=E ( e tX ) =∑ ( X ¿¿ k ) ¿ .
k=0 k!
39
M (Xk ) ( 0 )=E ( X k ) , k=1,2,3,…
Example 6.1
Let X be a discrete random variable with probability distribution given by
{
x
,∧x=1,2,3
f ( x )= 6
0 ,∧otherwise
Obtain the m.g.f of X and use it to compute the mean and variance of X.
Solution
3
x tX
M X ( t )=E ( e )=∑
❑ tX
e
x=0 6
1 2 2t 3 3 t
¿ + e + e
6 6 6
∕ 1 4 2t 9 3t
M X ( t )= + e + e and therefore
6 6 6
∕ 1 4 0 9 0 7
E ( X ) =M X ( 0 )= + e + e = .
6 6 6 3
∕ ∕ 1 8 2 t 27 3 t
M X ( t )= + e + e .
6 6 6
∕ ∕ 1 8 27
E ( X 2) = M X ( 0 )= + + =6 . Hence
6 6 6
()
2
2 7 5
Var X =E X −[ E X ] =6−
( ) = .
2
( ) ( )
3 9
Example 6.2
A continuous random variable X has the standardized normal density
{
2
−x
1 2
f ( x )= 2 π e ,∧−∞ < x< ∞
√
0 ,∧otherwise
Obtain the m.g.f of f ( x ) and use it to compute the mean and variance of X.
Solution
40
The m.g.f of X is given by
M X ( t )=E ( e tX )
∞
¿ ∫ tx
e f ( x ) dx
x=−∞
2
∞ −x
1
¿
√2 π
∫ e e tx 2
dx
x=−∞
2
t
2
¿e
∕
E( X)=μ=M X ( 0 )=0
2 2
t t
∕ ∕ 2
M ( t )=e +t e
X
2 2
E ( X 2) = M X ( 0 )=1 . Therefore
∕ ∕
2
Var ( X )=E ( X )−[ E ( X ) ] =1−0=1.
2
41
∞
¿ ∑ pk sk
k=0
We can use this probability generating function (p.g.f) to determine the mean and
variance of a distribution. S o we proceed as follows:
∞
P ∕ ( s )=∑ kp k s k−1
k=1
∞
∴ E ( X )=P ( 1 )=∑ kp k and
∕
k=1
∞
P ∕ ∕ ( s )=∑ k ( k −1 ) p k s k−2 .Therefore
k=2
∞
E [ X ( X −1 ) ]=P ∕ ∕ ( 1 ) =∑ k ( k −1 ) pk . But
k=2
2
Var ( X )=E ( X )−[ E ( X ) ] =P ( 1 ) + P (1 ) −[ P ( 1 ) ] .
2 2 ∕ ∕ ∕ ∕
Example 6.4
Let X have a Bernoulli distribution with parameter p . That is
k 1−k
Pr . ( X =k ) =p k = p q , q=1− p , k =0,1
1
¿ ∑ pk q 1−k sk =q+ ps .
k=0
∴ P ( s ) =p .
∕
∴ E ( X )=P ( 1 )= p.
∕
∴ P ∕ ∕ ( s )=0
∴ P ( 1 )=0 . Thus
∕ ∕
2
Var ( X )=E ( X 2 )−[ E ( X ) ] =P ∕ ∕ ( 1 ) + P ∕ (1 ) −[ P ∕ ( 1 ) ]
2
42
¿ 0+ p−p 2= p ( 1− p )= pq .
{
1
,∧x=1,2
1. f ( x )= 2
0 ,∧otherwise
{
1
f ( x ) = ,∧0< x <2
2. 2
0 ,∧otherwise
Interaction begins .Attempt the tasks given and post your solutions on
discussion forum 6.4.
Compare your solutions with your colleagues
E-moderator .Focusing group discussion
43
interventions . Motiving learners to participate in discussion.
. Providing feedback
. Concluding the lesson in a summary form
Schedule and time The lesson will last for two hours
Next Bernoulli, Binomial and Hypergeometric
distributions
6.6: Assessment
1. A random variable X has m.g.f
2 −1
M X ( t )=( 1−t ) ,
{
f ( x )= 1 ,∧0< x<1
0 ,∧otherwise
Determine the m.g.f of X and hence compute E ( X ) and Var ( X ).
{( )
x
n ( )n−x ,∧x=0,1, … , n , q=1− p
f ( x )= x p 1− p
0 ,∧otherwise
Obtain the p.g.f. of X , hence determine its mean and variance.
44
5. Let X have a zero-truncated (or decapitated) Poisson distribution with zero
class missing, i.e.
−1
( e a−1 ) a k
pk =Pr . { X=k }= , k =1,2,3 ,…
k!
−1
Show that the p.g.f. of X is given by P ( s )=( ea −1 ) ( e as −1 ).
∞
k=1
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
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
45
7.3.1: Bernoulli distribution
A random variable X is defined to have a Bernoulli distribution if the discrete
density function of X is given by
{
x 1− x
f ( x )= p ( 1− p ) ,∧x=0,1 , q=1−p
0 ,∧otherwise
1
¿ ∑ x p x ( 1− p )
1−x
=p.
x=0
1
But E ( X 2) =∑ x 2 f ( x )
x=0
1
¿ ∑ x 2 p x (1− p )
1−x
=p
x=0
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ] =p− p2= pq .
Example 7.1
A box contains 4 good fruits and 6 bad ones. If a fruit is selected at random from
the box, it can either be good or bad. The random variable
{
X = 1 ,if the fruit is bad
0 ,if the fruit is good
46
2
E ( X ) =p= and Var ( X )= pq=
5
2
5
2
1− =
6
5 25
. ( )( )
1
¿ ∑ etx p x ( 1− p )
1− x
x=0
t
¿ ( 1− p ) + p e
M X∕ ∕ ( 0 )= p=E ( X 2 ). Hence
2
Var ( X )=E ( X )−[ E ( X ) ] =p− p = pq .
2 2
{( )
x
n n−x
f ( x )= x p (1− p ) ,∧x=0,1, … , n , q=1− p
0 ,∧otherwise
47
n x
x=0 x ()
¿ ∑ x n p ( 1− p ) =np .
n−x
n
E ( X ) =∑ x 2 f ( x )
2
x=0
n x
X =0 x ()
¿ ∑ x2 n p ( 1− p ) =n ( n−1 ) p 2+ np.
n−x
Example 7.2
In a certain community, the probability of a female birth is 0.3 . If ten individuals
are randomly selected from this community, calculate
(i) the probability that exactly six of them are males,
(ii) the average number of females in the sample. Assume that the rate of
survival is the same for both sexes.
Solution
Let X denote the number of females in the sample. Then assuming the binomial
distribution, we have
{( )
x
10 ( ) ( )10−x ,∧x=0,1 , … , 10
P ( X )=f ( x )= x 0.3 0.7
0 ,∧otherwise
¿ P( X =4 )
4
( )
¿ 10 ( 0.3 ) ( 0.7 )10− 4=0.2001
4
48
n
M X ( t )=E ( e ) =¿ tX
∑ etx f (x )
x=0
x=0 x ()
¿ ∑ etx n p x ( 1− p )
n− x
()
¿ ∑ n ( p e ) ( 1− p ) =( p e +q )
t x n−x t n
x=0 x
The mean and variance of a binomial random variable X are determined by using
its m.g.f as follows:
n−1
M X ( t )=np e ( p e +q ) . Therefore
∕ t t
E ( X ) =M X∕ ( 0 )=np ( p+ q )n−1.
¿ np , since p+q=1.
t 2 n−2 n−1
M X ( t ) =n ( n−1 ) ( p e ) ( p e + q ) +np e ( p e + q ) .
¿∕ t t t
¿ n ( n−1 ) p2 +np
2
Var ( X )=E ( X )−[ E ( X ) ] =n ( n−1 ) p +np−n p =npq .
2 2 2 2
{
( Mx )( Nn−x ) ,∧x=0,1,2 , … , n
−M
f ( x )=P( X=x )=
( Nn )
0 ,∧otherwise
49
n
E ( X ) =∑ x f ( x )
x=0
¿∑❑
x M N −M
n
x n−x ( )( )
x=0 N
n ( )
(
x M −1 N −M )( ) ¿ nM .
( )
n
M x−1 n−x
¿n ∑❑
N x=1
(
N−1
n−1 ) N
n
E [ X ( X −1 ) ]=∑ x ( x−1)
( x )( n−x )
M N −M
x=1
( Nn )
¿ n ( n−1 )
M ( M −1 )
∑
( x −2 )( n−x )
M −2 N−M
n
=n ( n−1 )
M ( M −1 )
.
N ( N −1 ) x=2
( n−2 )
N−2 N ( N −1 )
2
Var ( X )=E [ X ( X−1) ] + E ( X ) −[ E (X ) ]
M ( M −1 ) nM −n2 M 2
¿ n ( n−1 ) +
N ( N −1 ) N N
2
nM
¿ ¿.
N
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,
50
X is a hypergeometric random variable with parameters N=10, M=3, n=4. Hence
3
(ii) E ( X ) =∑ xf ( x )=1.2 and
x=0
3
E ( X 2) =∑ x 2 f ( x )=2 . Therefore
x=0
2
Var ( X )=E ( X 2 )−[ E ( X ) ] =2−1.22=0.56 .
51
Spark
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
(i) all will have TV sets,
(ii) between 8 and 10, inclusive will have TV sets,
(iii) at most 10 will have TV sets,
(iv) at least 15 will own TV sets.
3. Suppose X is binomially distributed with parameters n and p; further
suppose that E(X)=5 and Var(X)=4. Find the values of n and p.
52
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
53
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
{e− λ λ x
P ( X=x )=f ( x )= x ! ,∧x =0,1,2 ,…
0 ,∧otherwise 0
54
∞
e−λ λ x
¿∑ x
x=0 x!
∞
λ x−1
¿ e− λ λ ∑ x
x=1 x (x−1)!
¿ e− λ λ e λ =λ .
∞ −λ x
e λ
¿ ∑ x2
x=0 x!
∞
e− λ λ x
¿ ∑ [x ( x−1 ) + x ]
x=1 x!
∞ −λ x ∞ −λ x
e λ e λ
¿ ∑ x ( x −1 ) +∑ x
x=1 x ! x=0 x!
∞ −λ x ∞ −λ x
e λ e λ
¿ e− λ λ2 ∑ x ( x−1 ) +∑ x
x=2 x(x −1)( x−2) ! x=0 x!
−λ 2 λ
¿e λ e + λ
¿ λ + λ.
2
∴ Var ( X )= λ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
55
e− λ λ x
{
P ( X=x )=f ( x )= x ! ,∧x =0,1,2 ,…
0 ,∧otherwise 0
2
2.7
(i) P ( X=2 )=f ( 2 )=e−2.7 =0.2450
2!
(ii) P ( X ≤2 ) =P ( X=0 )+ P ( X =1 ) + P(X =2)
2.70 −2.7 2.71 −2.7 2.7 2
¿ e−2.7 +e +e
0! 1! 2!
= 0.0672+0.1815+0.2450 = 0.4937
1 2 3
2.7 2.7 2.7
(iii) P ( 1≤ X ≤ 3 )=e−2.7 + e−2.7 +e−2.7 =0.6470
1! 2! 3!
∞
¿ ∑ e f (x)
tx
x=0
∞ −λ x
e λ
¿ ∑ etx
x=0 x!
∞
( λ et )x
λ∑
−λ
¿e
x=0 x!
t
¿ e− λ e λ e
¿ e λ (e −1).
t
The mean and variance of X can be obtained using this m.g.f as follows:
M X∕ ( t )=λ e t e λ (e −1).
t
∴ E( X) = M X∕ ( 0 ) =λ
56
2
Thus Var ( X )=E ( X )−[ E ( X ) ] =λ + λ−λ =λ .
2 2 2
{( )
x
n ( )n−x ,∧x=0,1, … , n , q=1− p
f ( x )= x p 1− p
0 ,∧otherwise
m
Let m=np (constant) ⇒ p= n . Then
( )( )
x n− x
n! m m
f ( x )= 1−
x ! (n−x)! n n
( ) ( )( )
n −x
1 n n−1 n−x +1 x m m
¿ × ×…× m 1− 1−
x! n n n n n
But
( ) ( ) ( )
−x ❑ n
m n n−1 n−x+1 m −m
lim 1− =1 , lim
× ×…× =1 and lim 1− =e .
n→∞ n n→∞ n n n n→∞ n
Therefore taking limits as n → ∞ and holding np fixed,
We have
mx e−m
f (x) → . Hence
x!
−np x
e ( np )
n→∞ x()
lim n p ( 1−p ) =
x n−x
x!
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 m=np .
57
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
n=1000 and p=0.01. Therefore
{(
x
f ( x )= x )
1000 ( 0.01) ( 0.99 )1000−x ,∧x=0,1 , … , 1000
0 ,∧otherwise
1
( )
P ( X=1 ) =f ( 1 )= 1000 (0.01) ( 0.99 )999 =0.00044
1
( )
1000 (0.01) ( 0.99 )1000− x ≃ e 10
x x!
And
−10 1
e 10
P ( X=1 ) ≃ =0.0005
1!
58
Spark
8.4: Assessment
1. Use the Poisson approximation to compute the following probabilities
(i) P ( X=45 ) , where X is a binomial random variable with parameters n=100
and p=0.5 .
(ii) P ( X ≤2 ) , where X is a binomial random variable with parameters n=120
and p=0.04 .
2. If X is a random variable with Poisson distribution satisfying P ( X=0 )=P ( X =1 ) ,
what is E( X) ?
1
3. If X has a Poisson distribution and P ( X=0 )= 2 , what is E( X) ?
References
59
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
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.
60
9.3: Normal Distribution
A continuous random variable X is defined to be normally distributed if its density
is given by
{
−1 2
( x−μ )
1 2σ
2
The graph of the normal distribution, called the normal curve, is a belled-shaped
curve that extends indefinitely in both directions, with the horizontal axis as its
asymptote.
If a random variable X is normally distributed with mean μ and standard deviation
σ , then it is usual to write
X ∽ N (μ , σ )
Standardizing X we have
X−μ
Z=
σ
¿ E[e t ( σZ +μ ) ]
¿ e tμ E [ e tσZ ]
61
Putting t ⋇=tσ we have
∴ M X ( t )=e tμ E [ e t Z ]
¿
¿2
t
tμ 2
¿e e
1 2 2
tμ+ σ t
2
¿e
∕ 0
∴ E ( X )=M X ( 0 )=μ e =μ.
1 2 2 1 2 2
2 tμ+ σ t tμ+ σ t
M ( t )=( μ+ σ t ) e
∕ ∕ 2 2 2 2
X +σ e
2
∴ E ( X 2 )=M X∕ ∕ ( 0 )=μ 2+ σ 2 ,∴ Var ( X )=E ( X 2) −[ E ( X ) ]
Var ( X )=μ + σ −μ =σ .
2 2 2 2
Example 9.1
A random variable X is normally distributed with mean μand variance σ 2 .
Determine the mean and variance of a new random variable Y =e X .
Solution
E ( Y )=E ( e X )=M X ( 1 )
1 2 2
tμ+ σ t
Where M X ( t )=e 2 is m.g.f of X.
1 2
μ+ σ
2
∴ E (Y )=e
2
Var ( Y )=E ( Y ) −[ E (Y ) ] .
2
But
2 2
WEEK 9 LESSON 2
9.3.2 : Computing Normal Probabilities
62
If X ∽ N ( μ , σ ). Then P ( a ≤ X ≤ b )=F ( b )−F ( a ) . Therefore to compute this probability
we need to standardize X i.e
X−μ
Z=
σ
{
−1
1
2
z
0 ,∧otherwise
a−μ X −μ b−μ
P ( a ≤ X ≤ b )=P( ≤ ≤ )
σ σ σ
a−μ b−μ
¿ P( ≤Z ≤ )
σ σ
¿Φ ( b−μ
σ ) −Φ (
σ )
a−μ
Example 9.2
A random variance X is normally distributed with mean 50 and standard deviation
10. Calculate P ( 45 ≤ X ≤62 ) .
Solution
μ=50 ,σ =10 ⇒ X ∽ N ( 50,10 ).
63
45−50 X −50 62−50
P ( 45 ≤ X ≤62 ) =P ( ≤ ≤ )
10 10 10
¿ P(−0.5 ≤ Z ≤1.2)
¿ 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
X ∽ N ( 76.5 ,9.5 ).
(
a−76.5
Standardizing X we have P Z ≥ 9.5 =0.15 or )
P(Z ≤
9.5 )
a−76.5
=0.85 .
Therefore, the lowest grade A mark is 87, and the highest grade B mark, is 86.
Example 9.4
If a random variable X is normally distributed with mean μand variance μ2, and if
P ( X ≤8 )=0.95 , determine P ( 4 ≤ X ≤ 11 ).
Solution
X ∽ N ( μ , μ)
64
(
P ( X ≤8 )=P Z ≤
8−μ
μ )=0.95
i.e Φ ( 8−μ
μ )
=0.95 ⇒
8−μ
μ
=1.65
μ=3.02.
¿ P ( 0.32≤ Z ≤ 2.64 )
¿ 0.9495−0.6255=0.3240 .
Example 9.5 Let X be N ( μ , σ ) so that P ( X ≤89 )=0.90 and P ( X ≤ 94 ) 0.95. Find μ and σ 2.
Solution
P ( X ≤89 )=0.90 ⇒ P ¿
μ+1.28 σ =89 … … … … .. ( 1 )
Similarly
P ( X ≤ 94 )=0.95 ⇒ P ¿
65
Title Normal Distribution
Purpose To enable the learner use normal distribution random
variables to solve some everyday life problems
Brief Watch the video
summary of
overall task
Spark
9.5 Assessment
66
1. Given that X is normal with mean 10 and variance 4, compute P (|X −10|>1.8 )
.
2. If X ∽ N ( 10 , σ ) and P ( X >12 )=0.1537, determine P ( 9< X <11 ) .
( X−μ
)
3. If X ∽ N ( μ , σ ), find the constant b so that P −b ≤ σ ≤ b =0.95 .
4. Let X be normally distributed with mean μand variance σ 2,and suppose that
( X ≤ 69 )=0.90 and P ( X ≤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.
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
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
67
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 −βx
f ( x )= Γ ( α ) x e ,∧x> 0
0 ,∧otherwise
α ∞
β
= ∫ x α + k−1 e− βx dx
Γ (α) 0
β
α
Γ ( α + k ) Γ ( α +k )
¿ . =. k
Γ ( α ) β α +k β Γ (α )
Γ ( α +1 ) α Γ ( α ) α
Thus E ( X )= ❑ = = which the mean of X.
β Γ (α ) β Γ (α ) β
Γ ( α+2 ) ( α +1 ) αΓ ( α ) ( α + 1 ) α
E ( X )= 2
2
Now = 2
= 2
β Γ (α ) β Γ (α ) β
68
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
( α+1 ) α α 2 α
¿ − 2= 2 .
β2 β β
x=0
α ∞
β
¿ ∫
Γ ( α ) x=0
tx α−1 −βx
e x e dx
α ∞
β
¿ ∫ x α −1 e−(β−t )x dx
Γ ( α ) x=0
Γ (α )
( )
α α
β β
¿ . = , t< β
Γ ( α ) ( β−t )α β−t
We can now use this m.g.f of X to determine the mean and variance of X.
∕
M X ( t )=α β α ( β−t )−α −1
Therefore
α −α−1 α
E ( X ) =M X ( 0 )=α β ( β )
∕
=
β
α −α −2 ( α +1 ) α
E ( X ) =¿ M X ( 0 )=α ( α +1 ) β ( β ) =
2 ∕ ∕
β2
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
( α+1 ) α α 2 α
¿ − 2= 2.
β2 β β
69
{
− λx
f ( x )= λ e ,∧x >0 , λ>0
0 ,∧otherwise
∞
1
¿ λ ∫ x e−λx dx=
0 λ
∞
E( X )=∫ x f ( x ) dx
2 2
∞
2
¿ λ∫ x e
2 −λx
2 .
dx=
0 λ
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
2 1 1
¿ 2
− 2= 2 .
λ λ λ
M X ( t )=E ( e tX )
∞
¿ ∫ e f ( x ) dx
tx
x=0
∞
¿λ ∫ e e
tx −λx
dx
x=0
∞
λ
¿λ ∫ e
−( λ−t )x
dx= ,t < λ .
x=0 λ−t
The mean and variance of X can be obtained by using the above m.g.f as follows:
∕ λ
M X ( t )=
( λ−t )2
70
λ 1
∴ E ( X )=M X∕ ( 0 )= =
( λ−0 ) λ
2
∕ ∕ 2λ
M X ( t )=
( λ−t )3
∕ ∕ 2λ 2
∴ E ( X 2 )=M X ( 0 )= 3
= 2
( λ−0 ) λ
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
2 1 1
¿ 2
− 2= 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
E ( X ) =2= ⇒ λ=
λ 2
{
−1
1 2x
f ( x )= 2 e ,∧x >0
0 ,∧otherwise
[ ] =0.1353
∞ −1 −1 ∞
1 x x
∴ P ( X > 4 )=∫ e 2
dx= −e 2
4
4 2
71
{
Γ ( α + β ) α −1 β −1
x ( 1−x ) ,∧0< x <1
f ( x )= Γ ( α ) Γ ( β )
0 ,∧otherwise
1
Γ (α) Γ ( β )
NB: ∫ x α −1 ( 1−x )β−1 dx= Γ ( α+β)
=Β ( α , β )
0
1
Γ (α +β )
¿ ∫
Γ (α) Γ ( β ) 0
k α−1 β−1
x x ( 1−x ) dx
1
Γ (α +β )
¿ ∫ ❑ x α + k−1 ( 1−x ) β−1 dx
Γ (α) Γ ( β ) 0
Γ (α + β ) Γ (α + k ) Γ ( β)
¿ .
Γ ( α ) Γ ( β ) Γ ( α + β +k )
Γ (α+ β ) Γ (α+ k )
¿ .
Γ ( α ) Γ ( α + β +k )
Putting k=1 we have
Γ ( α + β ) Γ ( α +1 )
E ( X )= .
Γ ( α ) Γ ( α + β+ 1 )
Γ (α+β ) αΓ ( α ) α
¿ . = .
Γ (α ) (α +β ) Γ (α+β ) α+β
Γ (α+β ) α ( α +1 ) Γ ( α )
¿ .
Γ ( α ) ( α + β ) ( α + β +1 ) Γ ( α+ β )
72
α ( α +1 )
¿
( α + β ) ( α + β +1 )
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
α ( α +1 ) α
2
¿ −
( α+ β ) ( α + β +1 ) ( α + β )2
αβ
¿ 2 .
( α + β ) ( α+ β +1 )
73
in it
. Solve some of problems given
Interaction .Attempt the tasks given and post your solutions on
begins discussion forum 10.4
. Read what your colleagues have posted
. In a sentence or two comment on at least two of your
colleagues have posted
E-moderator . Focusing group discussion
interventions . Motiving learners to participate in discussion.
. Providing feedback
. Concluding the lesson in a summary form
Schedule and The lesson will last for two hours
time
Next Functions of a random variable
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.
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
74
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, for a given
random variable X we seek the distribution of U =Φ ( X ) for some function g ( u ).
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
¿ P ¿ Φ ( X )=u ¿
75
¿ ∑ f ( x)
x : ϕ ( x ) =u
Example 11.1
Let X have the binomial distribution given by
{( )( ) ( )
x 4− x
4 3 1
,∧x =0,1,2,3,4
f ( x )= x 4 4
0 ,∧otherwise
¿ P ( X =u )=P ( X =√ u )
2
{( )( ) ( )
√u
4 3 1 4 −√u
g ( u )= √ u 4 ,∧u=0,1,4,9,16
4
0 ,∧otherwise
Example 11.2
Suppose that X has the discrete distribution given in the following table:
x -3 -2 -1 0 1 2 3
f ( x) 4 1 1 1 1 1 4
21 6 14 7 14 6 21
76
P ( U=28 )=P ( X=−3∨X =3 )=P ( X =−3 ) + P( X =3)
4 4 8
¿ + = .
21 21 21
¿ P(Φ ( X ) ≤ u)
❑
¿ ∫ f ¿ ¿x) dx
x : ϕ (x)≤u
{
f ( x )= 2 x ,∧0< x< 1
0 ,∧otherwise
77
G ( u )=P(U ≤ u)
¿ P(2 X +3 ≤ u)
¿P¿
1
(u−3)
2
¿ ∫ f ( x ) dx
0
1
(u−3)
2
¿ ∫ 2 x dx
0
1
(u −3 )
1
¿[x ]
2 2 2
0 = ( u−3 )
4
dG(u) 1
∴ g ( u )= = (u−3 )
du 2
{
1
g ( u )= 2
( u−3 ) ,∧3<u<5
0 ,∧otherwise
Example 11.4
Suppose that X has a uniform distribution on the interval (−1,1). Find the p.d.f of
U =−ln |X|.
Solution
In this case the p.d.f of X is
{
1
,∧−1< x <1
f ( x )= 2
0 ,∧otherwise
¿ P(−ln| X|≤u)
78
¿ P(| X|≥e )
−u
¿ 1−P (| X|≤ e )
−u
¿ 1−P (−e ≤ X ≤e )
−u −u
−u
e
¿ 1− ∫ f ( x ) dx
−u
−e
−u
e
1
¿ 1− ∫
−u
dx=1−e
−e
−u 2
{
−u
g ( u )= e ,∧u>0
0 ,∧otherwise
¿ P(Φ ( X ) ≤ u)
¿ P(X ≤ ω ( u ) )
¿ F ( ω (u ) )
79
dG (u)
g ( u )=
du
dF ( ω (u ) )
¿
du
dω ( u )
¿ f ( ω (u)) for α <u< β .
du
Similarly if Φis continuous and strictly decreasing over the interval ( a , b ), then U
will vary over some interval ( α , β ) as X varies over the interval ( a , b ), and the
inverse function ωwill be continuous and strictly decreasing over the interval ( α , β )
. Hence for α <u< β ,
G ( u )=P(U ≤ u)
¿ P(Φ ( X ) ≤ u)
¿ P(X ≥ ω ( u ) )
¿ 1−P( X ≤ ω ( u ))
¿ 1−F ( ω ( u ) )
g ( u )=f ( ω ( u ) ) | |.
dω ( u )
du
Example 11.5
Let X be a random variable with p.d.f given by
80
{
1
x ,∧0< x <2
f ( x )= 2
0 ,∧otherwise
u=1−x ⇒ x= √1−u
2
dx −1
=
du 2 √1−u
∴ g ( u )=f ( ω ( u ) ) | |
dω ( u )
du
¿ f (x) |dxdu|
1
¿ f ( √1−u )
2 √ 1−u
1 1 1
¿ √1−u . =
2 2 √ 1−u 4
{
1
¿ 4 ,∧−3< u<1
0 ,∧otherwise
81
of overall task
Spark
11.6: Assessment
1. Suppose that X has the discrete distribution given in the following table:
x 0 1 2 3
82
f(x) 1 1 1 1
4 3 4 6
{
2
−x
f ( x )= 2 x e ,∧x >0
0 ,∧otherwise
Find the density of Y = X 2.
1
3. If U =X 2 and f ( x )= θ , 0< x<θ ,θ> 0.Find the c.d.f of X and U. Find the density of
U.
4. If f ( x )=1 , 0< x <1, find the density of Y =3 X +1.
( 1+ x )
5. If f ( x )= ,−1< x <1 ,find the density of Y = X 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
83