You are on page 1of 84

KENYATTA UNIVERSITY

DIGITAL SCHOOL OF VIRTUAL AND OPEN LEARNING


IN COLLABORATION WITH
SCHOOL OF PURE & APPLIED SCIENCES
DEPARTMENT: MATHEMATICS AND ACTUARIAL SCIENCE

SST 204: PROBABILITY AND STATISTICS I

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 ¿

X ( SNN ) =X ( NSN )=X ( NNS )=1 , X ( NNN )=0 .

Therefore, X is a random variable which takes the values 0,1,2,3.

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

A random variable is said to be discrete if it assumes only a finite or countable


number of values on the real line. e.g , the random variable described in
example 1.1
A discrete random variable assumes each of its values with a certain
probability. In example 1 if we assume that all the outcomes are equally likely
then the random variable X takes the values 0,1,2,3 with the following
probabilities:

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

NB: P(X=0) + P(X=1) + P{X=2) +P (X=3) =1.


The above table represents a probability distribution of the random variable X.
Let X be a discrete random variable, then the probability distribution of X is a
real valued function f(x) of x, defined by

2
f ( x )=P ( X =x )
and satisfying the following conditions:
( i ) f ( x ) ≥ 0 for all x

x=∞
( ii ) ∑ f ( x )=1.
x=−∞

Example 1.3: A digit is selected at random from among the digits


0,1,2,3,4,5,6,7. Let X denote the digit so selected. What is the probability
distribution of X?

Solution
1
P ( X=x )= , x=0,1,2,3,4,5,6,7
8

and P ( X=x )=0 , x ∉{0,1,2,3,4,5,6,7}


Therefore, the probability distribution of X is by

{
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

A probability distribution given by

{
1
,∧x=1,2 ,. . . , n
f ( x )= n
0 ,∧otherwise

is known as a discrete uniform distribution.


Example 1. 4 Let X be a discrete random variable whose set of values is the set of
all non-negative integers. Show that the function f ( x ) given by

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.

Example 1.5 Let X be a discrete random variable whose probability distribution


is given by

{
f ( x )= kx ,∧x =2,3,4,5,6
0 ,∧0 therwise

Obtain the value of the constant k.


Solution
Since f ( x ) is a probability distribution, then
6

∑ 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

1.3.2 : Continuous Random Variables

A random variable is said to be continuous if it can assume any value in an


interval of the real line R . Therefore, a continuous random variable assumes
an uncountable number of values. Example 1.2 describes a continuous
random variable.

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

Example 1.7 Let X be a continuous random variable whose p.d.f is given by

5
{
1
kx + ,∧0 ≤ x ≤3
f ( x )= 30
0 ,∧eslewhere

Where k is a constant. Calculate the value of k hence compute P ( 1≤ X ≤ 2 ).


Solution

∫ f ( x ) dx=1 since f ( x ) is a p.d.f


0

∫ (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

be a p.d.f of a continuous random variable X. Find the value of the constant c.


Solution
b

∫ f ( x ) dx=1 since f ( x ) is a p.d.f of X.


a

∫ 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).

1.4 SST 204 E-TIVITY


Numbering, pacing and Week 1 , lesson 1
sequencing
Title Random variables
Purpose To obtain the probability distributions
of various random variables
Brief summary of overall task Watch the video on random variables
Spark

Individual task . Watch the above video keenly


following the examples in it
.State conditions for a function to be a
probability distribution.
Interaction begins . Attempt the tasks given and post
your solutions on discussion forum.
E-moderator interventions . Guiding group discussion
. Motiving learners to participate in

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 ).

3. A discrete random variable X can take the values 0,1,2,3,4,5,6,7,8. Its


probability distribution is given by

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

2.3: Distribution Functions

Let X be a random variable defined on a sample space S. Let us consider the


event E that satisfies −∞ < X ≤ x , where x is any real number, then
P ( E )=P ( X ∈ E )
¿ P (−∞< X ≤ x ) =P ( X ≤ x )

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.

2.3.1 : Distribution function of a discrete random variable

If X is a discrete random variable with probability distribution f ( x ) , then its


distribution function is given by

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

(i) Sketch the graph of f ( x )


(ii) Determine the distribution function of X and sketch its graph

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

To see how F ( x ) is obtained, note that if for instance 3 ≤ x < 4, then


3
1 9
F ( x )=∑ ( x +1 )= since the value of x=4 is excluded.
x=1 20 20

Graph of F ( x )
(i) F ( x ) is a step function,
(ii) F ( x ) 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 f ( x ), then the
distribution function of X is given by
x
F ( x )= ∫ f ( t ) dt .
−∞

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 )

In the above example F ( x ) is a continuous function for all real numbers x . In


particular F ( x ) is everywhere continuous to the right of any point. Moreover, the
derivative of F ( x ) with respect to x exists at all points in the interval [ 0,2 ] . That is, in
¿ dF ( x )
the interval f ( x )=F ( x )= .
dx

2.3.3: Properties of the distribution function


(1) 0 ≤ F ( X ) ≤1 since 0 ≤ P ( X ≤ x ) ≤ 1 .
(2) If a and b are any real numbers such that a ≤ b , then P ( a ≤ X ≤ b )=F ( b )−F ( a ) .
(3) F ( x ) is a non-decreasing function of x . This follows from (2) since

x 1 ≤ x 2❑ F ( x 2 )−F ( x1 ) =P ( x 1 ≤ X ≤ x 2 ) ≥ 0 . That is if x 2 ≥ x 1, then

F ( x 2 ) ≥ F ( x1 ) .

12
lim F ( x )=0 and lim F ( x ) =1 .

(4) x→−∞ x❑ ∞

(5) F ( x ) is continuous to the right at each point x . That is


lim ¿ →

+¿
x❑ a F ( x ) =F ( a ) ¿
, where x ❑ a +¿¿ means approaching a from the right.

(6) If X is a continuous random variable, then F ( x ) is everywhere continuous and


the probability density function (p.d.f) of X is given by
dF ( x )
f ( x )=
dx

for those points where F ( x ) is differentiable.


(7) If X is a discrete random variable, then F ( x ) is a step function satisfying (1),
(2), (3), (4) and (5) and
f ( x )=P ( X =x )

¿ F ( x )−F ¿

Where F ¿ denotes the limit of F at x if we approach x from the left. Thus


The probability that X¿ x is the height of the step that F has at x .
Example 2.3
A continuous random variable X has distribution function (c.d.f) given by

{
0 , x< 0
F ( x )= 2 3
x+ , 0≤ x <5
25 5
1, x ≥ 5

(i) Sketch the graph of F ( x ) and determine the probability distribution f ( x )


of X.
(ii) Compute P(−3 ≤ X ≤3).
Solution

(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

Thus, the probability distribution of X is given by

{
3
, x =0
5
f ( x )= 2
, 0< x ≤ 5
25
0 , otherwise

(ii) P (−3 ≤ X ≤ 3 )=F ( 3 )−F (−3 )


6 3 21
¿ + −0=
25 5 25

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

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

14
The limits for y are follows:
0≤ y≤4

Let the cumulative distribution function (c.d.f) be G ( y ). Therefore


G ( y )=P ( Y ≤ y ) satisfies

G ( y )=0 if y <0 and for 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 ) is differentiable in the interval [0,4]. Hence the p.d.f of Y is given by

g ( y )=G¿ ( y )

{
−1
1 2
¿ f ( x )= 4 y ,∧0 ≤ y ≤ 4
0 ,∧otherwise

2.4: SST 204 E-TIVITY


Numbering, pacing Week 2 , lesson 2
and sequencing
Title Distribution Functions
Purpose To obtain the distribution functions of various
random variables
Brief summary of Watch video 1 and Video 2
overall task

15
Spark

Individual task . Watch the above video keenly following the


examples in it
. State the properties of cumulative
distribution function of a random variable.
Interaction begins .Attempt the tasks given and post your
solutions on discussion forum 2.4.
Compare your solutions with your colleagues
E-moderator .Directing group discussion
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 Mode and median of a random variable
Assessment
1. Let X be a discrete random variable with probability distribution function

{
1
,∧x =1,2,3,4
f ( x )= 4
0 ,∧otherwise
Determine the c.d.f of X and hence sketch its graph.

2. Let X be a continuous random variable with p.d.f

{
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

By the end of this lesson the learner will be able to:


i. Determine the mode of a probability distribution
ii. Find the median of a random variable
3.3 MODE
Let X be a random variable with probability distribution f ( x ) and
corresponding c.d.f F ( x ). Then a mode of f ( x ) is defined to be that value of
the random variable X which maximizes f ( x ). That is a value µ0 of X is called
a mode of f ( x ) if it satisfies
f ( µ0 ) =max f ( x )
Where f ( x ) is maximized over all possible values of X.

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

(i) Since f ( x )is a decreasing function of x , the mode is µ0=1.


(ii) f ( x ) is a continuous function of x and so the mode corresponds
to the point of maximum of f ( x ) in the interval 0 ≤ x ≤ 2 .
Therefore
¿ 3
f ( x )= x ( 3 x−2 )
4
Mode satisfies
f ¿ ( x )=0
3
i.e 4 x ( x−2 ) =0
2
x=0 or x= .
3

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 ,

when X is a discrete random variable.


If X is a continuous random variable, then the median satisfies
λ upper limit
F ( m )=0.5 or ∫ f ( x ) dx=0.5 or ∫ f ( x ) dx=0.5 .
lower limit λ

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

(i) The median m satisfies


P ( X < λ ) ≤ 0.5 and P ( X ≤ λ ) ≥ 0.5

λ−1 λ

∑ f ( x ) ≤ 0.5 and ∑ f ( x ) ≥ 0.5


x=0 x=0

( )( ) ( )
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

Hence the median of f ( x ) is λ=1, because


81
P ( X <1 )=P ( X =0 )=f ( 0 )= <0.5 and
256

189
P ( X ≤1 ) =P ( X=0 ) + P ( X =1 )=f ( 0 )+ f ( 1 )= >0.5
256

(ii) Since f ( x )is continuous, the median λ of f ( x )satisfies


F ( λ )=0.5
x

But F ( x )=P ( X ≤ x ) =∫ f ( t ) dt =x . Therefore the median of f ( x ) is given by


2

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

Purpose To determine the mode and median


of probability distribution functions of
various random variables
Brief summary of overall task Watch the videos on mode and
median
Spark

Individual task . Watch the above video keenly


following the examples in it
. To state and find mode and median
of a random variable.
Interaction begins .Attempt the tasks given and post
your solutions on discussion forum
3.4.
Compare your solutions with your
colleagues
E-moderator interventions .Focusing group discussion
. 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 Expectation of a random variable

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

(i) Obtain the p.d.f of U.


(ii) Determine the mode and median of U.
(iii) (π
Calculate P 4 ≤ U ≤ 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

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.

4.2: Lesson Learning outcomes


By the end of this lesson the learner will be able to:
i. Obtain the expectation of a random variable
ii. State properties of expectation.

21
4.3: Expectation
4.3.1: Expectation of a discrete random variable

Let X be a discrete random variable whose probability distribution is


defined by
f ( x )=P ( X =x ).

The expected value of X, denoted by E ( X ) is defined by


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

Let us now consider a new random variable g ( X ) which depends on a


discrete random variable X. Then the expectation of g ( X )is defined by


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
.

4.3.2: Expectation of a continuous random variable

Let X be a continuous random variable with p.d.f f ( x ). Then the


expected value of X is defined by the integral


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

Therefore E ( X ) does not exist and E|X|=∞ .

4.3.3 : Properties of Expectation

Let be a continuous random variable with p.d.f f ( x ). Let g ( X )=aX +b


Where a and b are real numbers, be a function of X. Then

E [ g ( X ) ] = ∫ g ( x ) f ( x ) dx .
−∞


¿ ∫ ( ax+ b ) f ( x ) dx.
−∞

∞ ∞
¿ a ∫ x f ( x ) dx +b ∫ f ( x ) dx
−∞ −∞

¿ aE ( X )+ b …………………………………….. (1)

If a=0 , then g ( X )=b and E ( b ) =b .


This expected value of a constant is a constant.

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)

The two properties also hold for discrete random variables.

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

4.4: SST 204 E-TIVITY


Numberin Week4, lesson 4
g,
pacing and

26
sequencin
g
Title Expectation

Purpose To determine expectation of probability distribution


functions of various random variables
Brief Watch the video on expectation of a random variable
summary
of overall
task
Spark

Individual . Watch the above video keenly following the examples in it


task . State the properties of expectation of a random variable.
Interaction .Attempt the tasks given and post your solutions on
begins discussion forum 4.4.
Compare your solutions with your colleagues
E- .Focusing group discussion
moderator . Motiving learners to participate in discussion.
interventi . Providing feedback
ons . Concluding the lesson in a summary form
Schedule The lesson will last for two hours
and time
Next Moments

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 .

2. The following table shows the probability distribution function of a discrete


random variable X
x -5 -2 1 3
f(x) 1 1 0 1
3 2 6

Compute E ( X ) , E ( X 2) and E ( 4 X 2−6 X +2 ).


1. Suppose the p.d.f of a continuous random variable is defined by

{
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

2. Let X be a continuous random variable with p.d.f

{
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 )

Which is called the first moment about the point x=0.

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

Standard deviation σ =√ Var ( X )=√ E [ ( X −μ )2 ] .


Example 5.1
A continuous random variable X has a p.d.f given by

{
1
f ( x )= 9 ( 3−|x|) ,∧−3< x< 3
0 ,∧otherwise

Calculate the mean and variance of X.


Solution
3
E ( X ) =∫ f ( x ) dx
−3

30
3 0
x x
¿ ∫ (3−x ) dx+ ∫ ( 3+ x ) dx=0
0 9 −3 9

And the variance is given by

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

Calculate the mean and variance of X.


Solution

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

Thus Var (X ) ≥ 0 (1)

E ( X +b )=E ( X ) + b=μ+ b

Var ( X +b )=E { [( X+ b )− ( μ+ b ) ] }=E {[ X =μ ] }=Var ( X) .


2 2

Therefore, for any constant b

2
Var ( aX +b )=a Var ( X ) . (2)

E ( aX +b )=aE ( X )+ b=aμ+b .

Var ( aX +b )=E { [ ( aX+ b )− ( aμ+b ) ] }


2

¿ E {[ aX =aμ ] }
2

¿ a E {[ X =μ ] }=a Var ( X ) .
2 2 2

Thus, for any constants a and b


Var ( aX +b )=a2 Var ( X ) . (3)
Example 5.3

33
1. Let X be a continuous random variable with p.d.f

{
1
f ( x )= 2
( x+ 1 ) ,∧−1< x< 1
0 ,∧otherwise

Compute variance of 6 X +11.


Solution
Var ( 6 X +11 )=6 Var { X } .
2

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

Var ( 6 X +11 )=36 ( 29 )=8.


Example 5.4

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.

5.3: SST 204 E-TIVITY


Numberi Week5 , lesson 5
ng,
pacing
and
sequenci
ng
Title Moments

Purpose To determine moments of probability distribution functions


of various random variables
Brief Watch the video
summary
of overall
task
Spark

Individual . Watch the above video keenly following the examples in it


task . State the properties of variance of a 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. Let X be a discrete random variable with probability distribution given by

{
1
,∧x=1,2,3 , … , n
f ( x )= n
0 ,∧otherwise

n2−1
Show that σ 2= .
12

2. Suppose the p.d.f of a continuous random variable is defined by

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

3. Let X be a continuous random variable with p.d.f

{
1
f ( x )= 2
( x+ 1 ) ,∧−1< x< 1
0 ,∧otherwise

Find the mean and variance of X.

4. Let X be a continuous random variable with p.d.f

{
1
,∧0< x< 4
f ( x )= 4
0 ,∧eslehwhere

Obtain the standardized random variable.

5. Let X be a discrete random variance with probability distribution given


by

{
x
,∧x=0,1,2,3
f ( x )= 6
0 ,∧otherwise

Compute E ( X ) , Var ( X ) , E ( 6 X 2+7 X 3 ) ,Var ( 3 X + 4 ) .

6. A continuous random variable X has p.d.f

{
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.

6.2: Lesson Learning outcomes

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

but for other values of t, the existence of M X ( t ) depends on the distribution f ( x ) .


( tX )2 ( tX )3
e =1+tX +
tX
+ +…
2! 3!

∞ k
t
¿∑ X k
and
k=0 k!

∞ k
t
M X ( t )=E ( e tX ) =∑ ( X ¿¿ k ) ¿ .
k=0 k!

Therefore, the kth moment of a distribution can be obtained simply as the


k
t
coefficient of in the expansion of M X ( t ).
k!

Alternatively, we can differentiate M X ( t ) k times and obtain


k
d
E ( e )=E ( X e ) .
(k ) tX k tX
M X ( t )= k
dt

Putting t=0 , in M (Xk ) ( t ) yields

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

and it exists for t, −∞<t <∞ .


2
t

M ( t )=t e
X
2


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

6.4: Probability Generating Function


Suppose that X is a random variable which assumes non-negative integral values

0,1,2,… and that Pr . ( X =k ) =p k such that ∑ p k =1 then the probability generating


k=0

function, P ( s ), of the sequence of probabilities { pk } is given by


P ( s )= p0 + p1 s + p k s 2+ …+ p k s 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

E ( X ) =E [ X ( X−1 ) ] + E ( X )=P (1 ) + P ( 1 ). Thus


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

Therefore, the p.g.f of X is given by



P( s)=∑ p k s k
k=0

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 .

6.5: SST 204 E-TIVITY


Numbering, Week6 , lesson 6
pacing and
sequencing
Title Moment and probability generating functions

Purpose To determine moment and probability generating


functions of various random variables
Brief summary of Watch video 1 and Video 2
overall task
Spark

Individual task . Watch the above video keenly following the


examples in it
. Find the moment and probability generating
functions of the following distributions:

{
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 ) ,

Compute its mean and variance.


2. A continuous random variance X has p.d.f

{
f ( x )= 1 ,∧0< x<1
0 ,∧otherwise
Determine the m.g.f of X and hence compute E ( X ) and Var ( X ).

3. A random variable X has a binomial distribution with parameters n and p i.e.

{( )
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.

4. Let Y have the distribution of the geometric form (modified geometric or


decapitated geometric) given by
Pr , {Y =k }=q
k−1
p ,k =1,2,3 , … , q=1− p
ps
Show that the p.g.f of Y is 1−qs , and that
1 q
E ( Y )= and Var ( Y )= 2 .
p p

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 ).

Verify that P ( 1 )=∑ pk =1; show that E ( X ) =a e a / ( e a−1 ) .


−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

7.3: Special discrete probability 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

The mean of X is given by


1
E ( X ) =∑ x f ( x )
x=0

1
¿ ∑ x p x ( 1− p )
1−x
=p.
x=0

The variance of X is given by


2
Var ( X )=E ( X )−[ E ( X ) ]
2

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

is a Bernoulli random variable. The probability of selecting a good fruit is the


proportion of good fruits in the box. Hence
4 2
p=P ( X =1 )= = .Thus
10 5

46
2
E ( X ) =p= and Var ( X )= pq=
5
2
5
2
1− =
6
5 25
. ( )( )

The moment generating function of a Bernoulli random variable is given by


1
M X ( t )=E ( e tX ) =¿ ∑ etx f (x )
x=0

1
¿ ∑ etx p x ( 1− p )
1− x

x=0

t
¿ ( 1− p ) + p e

Which exists for all real numbers t.


We can obtain the mean and variance of X by using the above m.g.f as follows:
M X∕ ( t )= p et .Therefore

E ( X ) =M X ( 0 )= p .
∕ ∕ t
M X ( t )= p e . Thus

M X∕ ∕ ( 0 )= p=E ( X 2 ). Hence
2
Var ( X )=E ( X )−[ E ( X ) ] =p− p = pq .
2 2

7.2.2: BINOMIAL DISTRIBUTION


A random variable X is defined to have a binomial distribution if the discrete
density is given by

{( )
x
n n−x
f ( x )= x p (1− p ) ,∧x=0,1, … , n , q=1− p
0 ,∧otherwise

The parameters of the above distribution are n and p, where 0 ≤ p ≤ 1.


The mean of X is given by
n
E ( X ) =∑ x f ( x )
x=0

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

Therefore the variance of X is given by


2
Var ( X )=E ( X )−[ E ( X ) ] =n ( n−1 ) p +np−n p =npq .
2 2 2 2

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

(i) Prob ( 6 males )=P( X=10−6)

¿ P( X =4 )
4

( )
¿ 10 ( 0.3 ) ( 0.7 )10− 4=0.2001
4

(ii) E ( X ) =np=10× 0.3=3

The moment generating function of the binomial random variable X with


parameters n and p is given by

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

E ( X 2) =M ¿X ∕ ( 0 )=n ( n−1 ) p 2 ( p+q )


n−2 n−1
+ np ( p+ q )

¿ n ( n−1 ) p2 +np
2
Var ( X )=E ( X )−[ E ( X ) ] =n ( n−1 ) p +np−n p =npq .
2 2 2 2

7.2.3: Hypergeometric Distribution


Suppose that a box contains N bulbs, of which M are defective, n bulbs are
selected at random without replacement from the box. Let X be the number of
defective bulbs in the sample. Then X is called a hypergeometric random variable.
Therefore the probability distribution of X is given by

{
( Mx )( Nn−x ) ,∧x=0,1,2 , … , n
−M

f ( x )=P( X=x )=
( Nn )
0 ,∧otherwise

Where N is a positive integer, M is a non-negative integer that is at most N, and n


is a positive integer that is at most N.
The mean of X is given by

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

{ (3x)( 4−x ) ,∧x=0,1,2,3


7

(i) f ( x )=P( X=x )=


(104)
0 ,∧otherwise

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 .

7.3: SST 204 E-TIVITY


Numbering, Week7 , lesson 7
pacing and
sequencing
Title Bernoulli, Binomial, and Hypergeometric distributi0ns

Purpose To determine moments of Bernoulli, binomial and


Hypergeometric distributions
Brief Watch video 1 and Video 2
summary of
overall task

51
Spark

Individual . Watch the above video keenly following the examples


task in them

Interaction .Attempt the tasks given and post your solutions on


begins discussion forum 7.3.
Compare your solutions with your colleagues
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 Poisson distribution

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

Where the parameter λ satisfies λ> 0.


The mean of Poisson random variable X is given by

E ( X ) =∑ xf ( x )
x=0

54

e−λ λ x
¿∑ x
x=0 x!

λ x−1
¿ e− λ λ ∑ x
x=1 x (x−1)!

¿ e− λ λ e λ =λ .

The variance of X is given by


2
Var ( X )=E ( X 2 )−[ E ( X ) ] .

E ( X ) =∑ x f ( x )
2 2
But
x=0

∞ −λ 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!

The moment generating function of the Poisson random variable X with


parameter λ given by
M X ( t )=E ( e )
tX


¿ ∑ 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 ) =λ

M X∕ ∕ ( t )=λ 2 e2 t e λ (e −1) +¿ λ e t e λ (e −1)


t t

Therefore E ( X 2) =M X∕ ∕ ( 0 )=λ2 e 0 e λ ( e −1 )+ ¿ λ e 0 e λ (e −1)=λ 2+ λ.


0 0

56
2
Thus Var ( X )=E ( X )−[ E ( X ) ] =λ + λ−λ =λ .
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

{( )
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 ( n−1 ) ( n−2 ) … (n−x +1)(n−x)! mx


( )( )
n −x
m m
¿ 1− 1−
x !(n−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

Using the Poisson approximation with m=np=10 we have


x −10 x

( )
1000 (0.01) ( 0.99 )1000− x ≃ e 10
x x!
And

−10 1
e 10
P ( X=1 ) ≃ =0.0005
1!

8.3: SST 204 E-TIVITY


Numbering, pacing Week 8, lesson 8
and sequencing
Title Poisson distribution
Purpose To define a Poisson distribution, find its mean and
variance
Brief summary of Watch the video
overall task

58
Spark

Individual task . Watch the above video keenly following the


examples in it
. Solve some of problems given
Interaction begins .Attempt the tasks given and post your solutions
on discussion forum.
E-moderator . Guiding group discussion
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 Normal distribution

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

f ( x )= e ,∧−∞< x< ∞ ,−∞< μ< ∞, σ > 0


√2 π σ 2
0 ,∧otherwise

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 (μ , σ )

9.3.1 : Moments of Normal Distribution


Suppose that a random variable X is normally distributed with mean μ and
standard deviation σ . Then the moment generating function of X can be obtained
as follows:
M X ( t )=E ( e tX )

Standardizing X we have
X−μ
Z=
σ

So that Z ∽ N ( 0,1 ). But the moment generating function (m.g.f) is given by


2
t
M Z ( t ) =E ( e ) =e ,−∞<t <∞ .
tZ 2

Now X =σZ + μ .Thus


tX
M X ( t )=E[e ]

¿ 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

and it exists for all real numbers t.


We can compute the mean and variance of X by using the above m.g.f.
1 2 2
tμ + σ t
M ( t )=( μ+σ t ) e
∕ 2 2
X

∕ 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

E ( Y 2 )= E ( e2 X )=M X ( 2 )=e2 μ+2 σ


2

But
2 2

Therefore Var ( Y )=e 2 μ +2 σ −e2 μ+σ .

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=
σ

Where Z ∽ N ( 0,1 ). The p.d.f of Z is given by

{
−1
1
2
z

f ( z )= √ 2 π e ,∧−∞ < z <∞


2

0 ,∧otherwise

The standardized normal curve is symmetrical about z=0. Thus


P ( Z ≤−a )=P ( Z ≥ a )=1−P (Z ≤ a)

For any real number a (see the figure below)


Graph of f(z)
z −1 2
1 y
Φ ( z )= ∫ e 2
dy . Therefore
−∞ √2 π
Φ (−a )=1−Φ ( a ) or more generally

Φ (−z )=1−Φ ( z ) for all real z.

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)

¿ Φ ( 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
X ∽ N ( 76.5 ,9.5 ).

Let a be the lowest possible grade A mark . Then


P ( X ≥ a )=0.15

(
a−76.5
Standardizing X we have P Z ≥ 9.5 =0.15 or )
P(Z ≤
9.5 )
a−76.5
=0.85 .

Using the normal tables we have


a−76.5
=1.04 ⇒ a=86.4
9.5

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 ( 4 ≤ X ≤11 )=P ( 4−μ


μ
≤Z ≤
μ )
11−μ

¿ P ( 0.32≤ Z ≤ 2.64 )

¿ Φ ( 2.64 )−Φ ( 0.32 )

¿ 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 ¿

μ+1.65 σ =94 … … … ….. ( 2 )

Solving equations (1) and (2) simultaneously we have


μ=71.7 and σ 2=182.25

9.4: SST 204 E-TIVITY


Numbering, Week 9, lesson 9
pacing and
sequencing

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

Individual . Watch the above video keenly following the examples


task in it
. Solve some of problems given
Interaction .Attempt the tasks given and post your solutions on
begins discussion forum 9.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 Gamma, Exponential and Beta distributions

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.

10.3: Gamma, Exponential and Beta Distributions

10.3.1: Gamma Distributions


A continuous random variable X is said to have the gamma distribution
with parameters α and β ( α >0 , β >0 ) if its p.d.f is of the form

{
α
β α−1 −βx
f ( x )= Γ ( α ) x e ,∧x> 0
0 ,∧otherwise

Therefore, we write X ∽ Γ ( α , β ) to mean that X has the gamma


distribution with parameters α and β .
10.3.1.1: Moments of the Gamma Random variable
The kth moment of a gamma random variable X about the point x=0 is given by

E ( X )=∫ x f ( x ) dx
k k

α ∞
β
= ∫ 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 β β

The m.g.f of X is given by


M X ( t )=E ( e tX )

¿ ∫ e f ( x ) dx
tx

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 )=α β ( β )

=
β

M X∕ ∕ ( t )=α (α+ 1) β α ( β−t )−α −2

α −α −2 ( α +1 ) α
E ( X ) =¿ M X ( 0 )=α ( α +1 ) β ( β ) =
2 ∕ ∕

β2
2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]
( α+1 ) α α 2 α
¿ − 2= 2.
β2 β β

10.3.2: Exponential Distribution


If a random variance X has density given by

69
{
− λx
f ( x )= λ e ,∧x >0 , λ>0
0 ,∧otherwise

Then X is defined to have an exponential distribution.



E( X)=∫ xf ( x ) dx
0


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 .
λ λ λ

The moment generating function of an exponential random variable is given by

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

Hence the p.d.f of X is given by

{
−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

10.3.3 : Beta Distribution


A continuous random variable X is said to have the beta distribution
with parameters α and β ( α >0 , β >0 ) if its p.d.f is of the form

71
{
Γ ( α + β ) α −1 β −1
x ( 1−x ) ,∧0< x <1
f ( x )= Γ ( α ) Γ ( β )
0 ,∧otherwise

1
Γ (α) Γ ( β )
NB: ∫ x α −1 ( 1−x )β−1 dx= Γ ( α+β)
=Β ( α , β )
0

10.3.3.1 : Moments of Beta Random variable


The moments of the beta distribution are computed as follows:
1
E ( X )=∫ x f ( x ) dx , k=1,2 , …
k k

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 )

Γ (α+β ) αΓ ( α ) α
¿ . = .
Γ (α ) (α +β ) Γ (α+β ) α+β

For k=2 we have


Γ ( α + β ) Γ (α + 2)
E ( X 2) = .
Γ ( α ) Γ ( α + β +2 )

Γ (α+β ) α ( α +1 ) Γ ( α )
¿ .
Γ ( α ) ( α + β ) ( α + β +1 ) Γ ( α+ β )

72
α ( α +1 )
¿
( α + β ) ( α + β +1 )

2
Therefore Var ( X )=E ( X 2 )−[ E ( X ) ]

α ( α +1 ) α
2
¿ −
( α+ β ) ( α + β +1 ) ( α + β )2

αβ
¿ 2 .
( α + β ) ( α+ β +1 )

10.4: SST 204 E-TIVITY


Numbering, Week 10, lesson 10
pacing and
sequencing
Title Gamma, Exponential and Beta Distributions
Purpose To enable the learner compute moments of gamma,
exponential and beta random variables
Brief Watch the video 1, Video 2 and article 3
summary of
overall task
Spark

Individual . Watch the above video keenly following the examples


task

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

11.3.1: Variables with Discrete Distributions


Suppose that a random variable X has a discrete distribution for which the
probability function is f ( x ) . Let U =Φ ( X ) be another random variable defined as a
function of X.
∴ g ( u )=P (U =u )

¿ 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

Find the distribution of U =X 2.


Solution
The possible values of U are 0,1,4,9,16
∴ g ( u )=P (U =u )

¿ 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

Find the distribution of the random variable U =3 X 2+ 1.


Solution
The possible values of U are 1,4,13,28.
1
P ( U=1 )=P ( X =0 ) =
7
1 1 1
P ( U=4 ) =P ( X =−1∨ X=1 ) =P ( X =−1 ) + P ( X=1 ) = + =
14 14 7
1 1 1
P ( U=13 ) =P ( X=−2∨X=2 )=P ( X=−2 )+ P ( X =2 ) ¿ + =
6 6 3

76
P ( U=28 )=P ( X=−3∨X =3 )=P ( X =−3 ) + P( X =3)
4 4 8
¿ + = .
21 21 21

Hence the probability distribution of U is


u 1 4 13 28
g(u) 1 1 1 8
7 7 3 21

11.3.2: Variables with Continuous Distributions


Suppose X is a random variable with p.d.f f ( x) . Let U =Φ ( X )be another random
variable. Then for any real number u, the cumulative distribution function G(u) of
U is
G ( u )=P(U ≤ u)

¿ P(Φ ( X ) ≤ u)

¿ ∫ f ¿ ¿x) dx
x : ϕ (x)≤u

If G(u) is a continuous function of u, then at any point u at which G is


differentiable the p.d.f of u will be given by
dG (u)
g ( u )=
du

Example 11.3 Let X have a p.d.f given by

{
f ( x )= 2 x ,∧0< x< 1
0 ,∧otherwise

Find the p.d.f of U =2 X+ 3.


Solution
The cumulative distribution of U is given by

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

The range of u is 3<u<5 . Hence

{
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

The cd.f of U is given by


G ( u )=P(U ≤ u)

¿ 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

Therefore, the p.d.f of U is


dG (u)
g ( u )=
du

{
−u
g ( u )= e ,∧u>0
0 ,∧otherwise

11.4: Direct derivation of the density function for a Continuous Random


Variable
Suppose X is a random variable and U =Φ ( X ). If a< x<b andα <u< β . Let x=ω ( u ), then
the function ω is the inverse of Φ.
If we assumed that the function Φis continuous and strictly increasing over the
interval ( a , b ) ,the inverse function ω is also continuous and strictly increasing over
the interval ( α , β ). Hence for any value u such that α <u< β ,
G ( u )=P(U ≤ u)

¿ P(Φ ( X ) ≤ u)

¿ P(X ≤ ω ( u ) )

¿ F ( ω (u ) )

Where F is the distribution function of X.


If we now assume in addition that ωis a differentiable function over the interval
( α , β ) , then the distribution of U is continuous and its p.d.f is given by

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 ) )

If ωis differentiable over the interval ( α , β ), then


dG(u)
g ( u )=
du
d [1−F ( ω ( u ) ) ]
¿
du
dω ( u )
¿−f ( ω ( u ) ) for α <u< β .
du
dω ( u )
Since ωis strictly decreasing, < 0 and hence g ( u )can be expressed in the
du
form

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

Find the p.d.f of a new random variable U =1−X 2 .


Solution
−3<u< 1

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

11.5: SST 204 E-TIVITY


Numbering, Week 11, lesson 11
pacing and
sequencing
Title Functions of a random variable
Purpose To enable the learner find the distribution of a new
random variable which is a function of another
random variable with known density
Brief summary Watch video 1 and Video 2 and video 3

81
of overall task
Spark

Individual task . Watch the above video keenly following the


examples in it
. Solve some of problems given
Interaction . Attempt the tasks given and post your solutions on
begins discussion forum 11.5
. 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 Revision and Examination

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

Find the distribution of the random variable Y =4 X 2+1.


2. If the density of a random variable X is

{
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

You might also like