Moments of Random Variables
Moments of Random Variables
Harold C Banda
Phone(s): +265 999 77 33 78 / 882 16 77 72.
Email : hbanda@cunima.ac.mw/ harold.chimutu@gmail.com
Moments of Random Variables
Moments of Random Variables
Moments of Random Variables
The nth moment about the origin of a random variable X , as
denoted by E (X n ), is defined to be
(P
x n f (x) if X is discrete ,
E (X n ) = R ∞x∈Rxn
−∞ x f (x)dx if X is continuous.
for n = 0, 1, 2, 3, · · · , provided the right side converges
absolutely.
If n = 1, then E (X ) is called the first moment about the
origin.
If n = 2, then E (X 2 ) is called the second moment of X about
the origin.
In general, these moments may or may not exist for a given
random variable.
Moments of Random Variables
Moment Generating Functions
Moment Generating Functions
A moment generating function is a real valued function from
which one can generate all the moments of a given random
variable.
In many cases, it is easier to compute various moments of X
using the moment generating function.
Let X be a random variable whose probability density function
is f (x). A real valued function M : R −→ R defined by
M(t) = E (e tx )
is called the moment generating function of X if this
expected value exists for all t in the interval −h < t < h for
some h > 0.
In general, not every random variable has a moment
generating function.
But if the moment generating function of a random variable
exists, then it is unique.
Moments of Random Variables
Moment Generating Functions
Moment Generating Functions...cont’d
Using the definition of expected value of a random variable,
we obtain the explicit representation for M(t) as
(P
e tx f (x) if X is discrete ,
M(t) = R ∞x∈Rxtx
−∞ e f (x)dx if X is continuous.
Example:
Let X be a random variable whose moment generating
function is M(t) and n be any natural number. What is the
nth derivative of M(t) at t = 0?
Moments of Random Variables
Moment Generating Functions
Example...cont’d
Solution:
d d
M(t) = E (e tx )
dt dt
d tx
=E e
dt
= E (Xe tx )
Similarly,
d2 d2
2
M(t) = 2 E (e tx )
dt dt
d 2 tx
=E e
dt 2
= E (X 2 e tx )
Moments of Random Variables
Moment Generating Functions
Solution...cont’d
Hence, in general we get
dn dn
M(t) = E (e tx )
dt n dtn
d n tx
=E e
dt n
= E (X n e tx )
If we set t = 0 in the nt h derivative, we get
dn
M(t)|t=0 = E (X n e tx )|t=0
dt n
= E (X n )
Hence the nth derivative of the moment generating function of
X evaluated at t = 0 is the nth moment of X about the origin.
Moments of Random Variables
Moment Generating Functions
Example
What is the moment generating function of the random
variable X whose probability density function is given by
(
e −x forx > 0,
f (t) =
0 otherwise.
What are the mean and variance of X ?
Moments of Random Variables
Moment Generating Functions
Moment Generating Functions
Example...cont’d
Solution: The moment generating function of X is
M(t) = E (e tx )
Z ∞
= e tx f (x)dx
Z0 ∞
= e tx e −x dx
Z0 ∞
= e −(1−t)x dx
0
1 h −(1−t)x i∞
= −e
1−t 0
1
= , if 1 − t > 0
1−t
Moments of Random Variables
Moment Generating Functions
Moment Generating Functions
Example...cont’d
Solution cont’d:
The expected value of X can be computed from M(t) as
d
E (X ) = M(t)|t=0
dt
d
= (1 − t)−1 |t=0
dt
= (1 − t)−2 |t=0
1
= |t=0
(1 − t)2
= 1.
Moments of Random Variables
Moment Generating Functions
Moment Generating Functions
Solution...cont’d
Similarly,
d2
E (X 2 ) = M(t)|t=0
dt 2
d2
= 2 (1 − t)−2 |t=0
dt
= 2(1 − t)−3 |t=0
2
= |t=0
(1 − t)3
=2
Therefore, the variance of X is
Var (X ) = E (X 2 ) − (µ)2 = 2 − 1 = 1.