0% found this document useful (0 votes)
2 views12 pages

Tutorial 6 Solutions

Uploaded by

Clarence
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views12 pages

Tutorial 6 Solutions

Uploaded by

Clarence
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026

Tutorial 6
Exercise 1

a) Derive the moment-generating function of a Bernoulli random variable, and use it to determine the mean, variance, and
skewness.
For convenience, let X~Ber(p). Then,
p(x) = px (1 − p)1−x for x = 0, 1.
x 0 1
p(x) 1−p p
Derive the mgf
MX (t) = 𝔼𝔼(etX ) = ∑etx p(x) = et×0 × (1 − p) + pet×1 = (pet + 1 − p)1
Expectation
d
𝔼𝔼(X) = [pet + 1 − p] = pet ⇒ 𝔼𝔼(X) = pe0 = p
dt
Find 2nd raw moment
d
𝔼𝔼(X 2 ) = [pet ] = pet ⇒ 𝔼𝔼(X 2 ) = pe0 = p
dt
Variance
𝕍𝕍ar(X) = 𝔼𝔼(X 2 ) − [𝔼𝔼(X)]2 = p − p2 = p(1 − p) = 1 × p × (1 − p)
Skewness
3 3
𝔼𝔼 ��X − 𝔼𝔼(X)� � X − 𝔼𝔼(X)
𝕊𝕊kew(X) = 3 = 𝔼𝔼 �� � �
�𝕍𝕍ar(X)
�𝕍𝕍ar(X)�2
Expand the third raw moment
𝔼𝔼((X − p)3 ) = ∑(x − p)3 p(x) ⇒ (0 − p)3 (1 − p) + (1 − p)3 p = p3 (p − 1) + p(1 − p)3

Thus, from the linearity of expectation


p3 (p − 1) + p(1 − p)3 = p(1 − p)(1 − 2p)

Hence, the third central moment of a Bernoulli random variable is


3
𝔼𝔼 ��X − 𝔼𝔼(X)� � = p(1 − p)(1 − 2p)

Finally
p(1 − p)(1 − 2p) 1 − 2p
𝕊𝕊kew(X) = 3 =
�p(1 − p)
�p(1 − p)�2
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
b) Provide the moment-generating function of a Binomial random variable, and use it to determine the mean, variance, and
skewness.
For convenience, let X~Bin(𝔫𝔫, 𝔭𝔭). Then,
MX (t) = (pet + 1 − p)n
From the mgf
𝔼𝔼(X) = np
𝔼𝔼(X 2 ) = np(1 − p) + (np)2
𝔼𝔼(X 3 ) = n(n − 1)(n − 2)p3 + 3n(n − 1)p2 + np
Hence the third central moment
𝔼𝔼((X − np)3 ) = np(1 − p)(1 − 2p)
np(1 − p)(1 − 2p) np(1 − p)(1 − 2p) 1 − 2p
𝕊𝕊kew(X) = 3 = =
�np(1 − p) �p(1 − p)
�np(1 − p)�2

c) Derive the moment-generating function of a Poisson random variable, and use it to determine the mean, variance, and
skewness.
Derivation
For convenience, let X~Poisson(λ). Then
e−λ λx
tx
p(x; λ) = � e ⋅ for x = 0, 1, 2, … where λ > 0 (parameter space)
x!
x∈D

Next the general definition of an mgf of a discrete rv is given by

MX (t) = 𝔼𝔼(etX ) = � etx p(x) where D denotes the set of all possible values of X
x∈D

Note that you must define all notation you adopt. You may use ℛ as usual, the notation in our class solutions.

But for Poisson rv

MX (t) = � etx p(x; λ) Definition of an mgf or


definition of the
x∈D
expectation of a function
of a discrete rv
= e−λ λx
� etx ⋅
x!
x∈D
= e−λ λx
� etx ⋅
x!
x∈D
= λx etx
e−λ �
x!
x∈D
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
=
−λ
(λet )x
e �
x!
x∈D
t
= e−λ eλe
t
= eλe −𝜆𝜆
t
= eλ(e −1)

Thus, the mgf of a Poisson random variable is


t
MX (t) = eλ(e −1) for all t ∈ ℝ

Most importantly, this domain includes 0.


To derive the skewness
3 3
𝔼𝔼 ��X − 𝔼𝔼(X)� � X − 𝔼𝔼(X)
𝕊𝕊kew(X) = 3 = 𝔼𝔼 �� � �
�𝕍𝕍ar(X)
�𝕍𝕍ar(X)�2
From the mgf
t
MX (t) = eλ(e −1)

It readily follows

𝔼𝔼(X) = λ
𝔼𝔼(X 2 ) = λ2 + λ ⟹ 𝕍𝕍ar(X) = 𝔼𝔼(X 2 ) − [𝔼𝔼(X)]2 = λ
𝔼𝔼(X 3 ) = λ3 + 3λ2 + λ

Hence, the central moment

𝔼𝔼((X − λ)3 ) = λ
λ 1
𝕊𝕊kew(X) = 3 =
(λ)2 √λ

Exercise 2
1 𝟑𝟑 1
Let X be a discrete random variable assuming the values 0, 1, and 2, with probabilities 2, 𝟖𝟖, and 8 respectively. Determine
the moment-generating function of X and use it to find 𝔼𝔼(X) and 𝔼𝔼(X 2 ).
x 0 1 2
p(x) 1/2 3/8 1/8
Find the mgf
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
1 3 1 1 3 1
MX (t) = 𝔼𝔼(etX ) = ∑etx p(x) = e0t + e1t + e2t = e2t + et +
2 8 8 8 8 2
Find the expected value
(1) d 1 2t 3 t 1 1 3 2 3
MX (t) = � e + e + � = × 2 × e2t + × 1 × et + 0 = e2t + et
dt 8 8 2 8 8 8 8
Thus
(1) 2 3 5
MX (0) = 𝔼𝔼(X) = e2(0) + e(0) =
8 8 8
Find the 2nd raw moment
(2) d 2 2t 3 t 4 3
MX (t) = � e + e � = e2t + et
dt 8 8 8 8
Hence
(2) 4 2(0) 3 (0) 7
MX (0) = 𝔼𝔼(X 2 ) = e + e =
8 8 8

Exercise 3 (done in class)


Suppose the moment generating function (mgf) of the random variable X is MX (t).
a) For any constants 𝔞𝔞 and 𝔟𝔟, show that the moment generating function (mgf) of Y = 𝔞𝔞X + 𝔟𝔟 is given by:
MY (t) = e𝔟𝔟t MX (𝔞𝔞t).
Proof

MY (t) = 𝔼𝔼(etY ) = 𝔼𝔼�et(𝔞𝔞X+𝔟𝔟) � = � et(𝔞𝔞x+𝔟𝔟) p(x) = � e𝔞𝔞tx+t𝔟𝔟 p(x) = � e𝔞𝔞tx et𝔟𝔟 p(x)
x∈D x∈D x∈D

But we are summing across the x, so t𝔟𝔟 is a constant


Then

MY (t) = � e𝔞𝔞tx p(x) = et𝔟𝔟 � e𝔞𝔞tx p(x)


x∈D x∈D

But from the definition of an expectation of a function of an discrete rv we have

� e𝔞𝔞tx p(x) = 𝔼𝔼(e𝔞𝔞tX ) ⟹ 𝔼𝔼(e𝔞𝔞tX ) = MX (𝔞𝔞t)


x∈D

Finally
MY (t) = et𝔟𝔟 MX (𝔞𝔞t)
b) Hence, prove that 𝔼𝔼(Y) = 𝔞𝔞𝔞𝔞(X) + 𝔟𝔟 and use this to show that 𝕍𝕍ar(Y) = 𝔞𝔞2 𝕍𝕍ar(X).
Proof
Note that
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
MY (t) = et𝔟𝔟 � e𝔞𝔞tx p(x)
x∈D

(1) d t𝔟𝔟
MY (t) = �e � e𝔞𝔞tx p(x)� = 𝔟𝔟et𝔟𝔟 � e𝔞𝔞tx p(x) + et𝔟𝔟 � 𝔞𝔞xe𝔞𝔞tx p(x)
dt
x∈D x∈D x∈D

Setting t = 0
(1)
MY (0) = 𝔼𝔼(Y) = 𝔟𝔟e0⋅𝔟𝔟 � e𝔞𝔞⋅0⋅x p(x) + e0⋅𝔟𝔟 � 𝔞𝔞xe𝔞𝔞⋅x p(x)
x∈D x∈D

Thus
(1)
MY (0) = 𝔼𝔼(Y) = 𝔟𝔟 � p(x) + � 𝔞𝔞xp(x) = 𝔟𝔟 � p(x) + 𝔞𝔞 � xp(x) =
x∈D x∈D x∈D x∈D

Condition 2 of a valid pmf tells us that

� p(x) = 1
x∈D

Furthermore, the definition of an expectation of an discrete rv we have

� xp(x) = 𝔼𝔼(X)
x∈D

Putting this together


𝔼𝔼(Y) = 𝔟𝔟(𝟏𝟏) + 𝔞𝔞�𝔼𝔼(X)� = 𝔞𝔞𝔞𝔞(X) + 𝔟𝔟

Exercise 4
The moment generating function (mgf) for X is
MX (t) = 𝔠𝔠 + 0.4et + 0.3et + 0.2e𝔞𝔞t .
Here 𝔠𝔠 is a constant. Futhermore it is established that 𝔼𝔼(X) = 2.
Determine the value of 𝔞𝔞.
Find 𝔠𝔠 first
Use the identity
MX (0) = 1 ⟹ 1 = 𝔠𝔠 + 0.4 + 0.3 + 0.2 ⟹ 𝔠𝔠 = 0.1

Note that
(1) d
MX (t) = (0.1 + 0.4et + 0.3et + 0.2e𝔞𝔞t ) = 0.4et + 0.3et + 2𝔞𝔞e𝔞𝔞t
dt
Then
1.3 13
2 = 0.4 + 0.3 + 2𝔞𝔞 ⟹ 𝔞𝔞 = = ≅ 0.65
2 20
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026

Exercise 5
Consider a discrete random variable X with probability mass function (pmf) given by:

c2𝐱𝐱
p(x) = for x = 2, 3, 4, 5, …
x!

a) Find the moment-generating function (mgf) of X. For which values of t does it exists?

Find c first
Condition 2 of a valid pmf justifies the next step
∞ ∞
2x 2x
�c = 1 ⟹ c� = 1
x! x!
x=2 x=2

Recall the Maclaurin series we have been applying thus far, it is expressed as follows (for our purpose and familiarity)

λ
λx
e =� with λ > 0
x!
x=0

It starts from 0, not 1 or 2 or any other index. Hence, lets manipulate the above expression

2x

x!
x=2
∞ ∞ ∞
2
2x 20 21 2x 2x
e =� = + +� ⟺ � = e2 − 3
x! 0! 1! x! x!
x=0 x=2 x=2

Next
1
c(e2 − 3) = 1 ⟺ c=
e2 −3
Similarly, we can derive the mgf
Start with the definition
∞ ∞
tX )
c2𝐱𝐱 tx
(𝟐𝟐𝐞𝐞𝐭𝐭 )x
MX (t) = 𝔼𝔼(e = �e = c�
x! x!
𝑥𝑥=2 x=2

Apply the same trick again


∞ ∞ ∞
𝟐𝟐𝐞𝐞𝐭𝐭
(2et )x (2et )0 (2et )1 (2et )x 2x t
e =� = + +� ⟺ � = e2e − 1 − 2et
x! 0! 1! x! x!
x=0 x=2 x=2

Then
t
MX (t) = (e2 − 3)�e2e − 1 − 2et �
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
Simplify and find the domain
b) Hence, find the mean of X.
Additional exercise
Exercise 6
The moment-generating function of X is given by
t
MX (t) = e2e −1 for all t ∈ ℝ
and that of Y by
3 1 10
MY (t) = �4 et + 4� for all t ∈ ℝ

Suppose that X and Y are independent and determine the following probabilities.
a) ℙ(X + Y = 2).
Note that by inspection,
3
X~Poisson(2) and Y~Bin �10, �
4
Hence the desired event can be decomposed as follows
{X + Y = 2} ⟺ {X = 0, Y = 2} ∪ {X = 1, Y = 1} ∪ {X = 2, Y = 0}
But all the three are disjoint, hence the extended addition law (in fact Axiom 3 of probability) tells that
ℙ({X = 0, Y = 2} ∪ {X = 1, Y = 1} ∪ {X = 0, Y = 2})
= ℙ(X = 0, Y = 2) + ℙ(X = 1, Y = 1) + ℙ(X = 0, Y = 2)
𝑒𝑒 −2 20 10 3 2 1 8
ℙ(X = 0, Y = 2) = � � �� � � � � � �
0! 2 4 4

𝑒𝑒 −2 21 10 3 1 1 1
ℙ(X = 1, Y = 1) = � � �� � � � � � �
1! 1 4 4

𝑒𝑒 −2 22 10 3 0 1 10
ℙ(X = 2, Y = 0) = � � �� � � � � � �
2! 0 4 4
b) ℙ(XY = 0).
The desired event can be decomposed as follows
{XY = 0} ⟺ {X = 0, Y ≥ 1} ∪ {X ≥ 1, Y = 0} ∪ {X = 0, Y = 0}
𝑒𝑒 −2 20 10 3 0 1 10
ℙ(X = 0, Y ≥ 1) = � � �1 − � � � � � � �
0! 0 4 4

𝑒𝑒 −2 20 10 3 0 1 10
ℙ(X ≥ 1, Y = 0) = �1 − � �� � � � � � �
0! 0 4 4

𝑒𝑒 −2 20 10 3 0 1 10
ℙ(X = 0, Y = 0) = � � �� � � � � � �
0! 0 4 4
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
Exercise 7
Consider a moment-generating for a discrete random variable Y, given by

1 t 2 2t 3 3t
MY (t) = e + e + e
6 6 6
And determine (use at least TWO methods) the following:
a) 𝔼𝔼(Y).
Method 1 (from the pmf)
y 1 2 3
p(y) 1/6 2/6 3/6

1 2 3 1 4 6 11
𝔼𝔼(Y) = ∑yp(y) = 1 � � + 2 � � + 3 � � = + + =
6 6 6 6 6 6 6
Method 2 (from differentiation the mgf)
(1) d 1 t 2 2t 3 3t 1 4 6
MY (t) = � e + e + e � = et + e2t + e3t
dt 6 6 6 6 6 6
Then
(1) 1 t 4 2t 6 3t 1 4 6 11
MY (0) = 𝔼𝔼(Y) = e + e + e = + + =
6 6 6 6 6 6 6
b) 𝕍𝕍ar(Y).
Recall the statistical proposition called (the shortcut formula of the variance of an rv)
𝕍𝕍ar(Y) = 𝔼𝔼(Y 2 ) − [𝔼𝔼(Y)]2
(2) d 1 t 4 2t 6 3t 1 8 18 3t
MY (t) = � e + e + e � = et + e2t + e
dt 6 6 6 6 6 6
1 8 18 27
𝔼𝔼(Y 2 ) = + + =
6 6 6 6
Hence
27 11 2
𝕍𝕍ar(Y) = −� �
6 6

Exercise 8
For each of the following moment-generating functions, fully describe the associated probability distribution and determine
the 2nd raw moment and the 2nd central moment (with explanations):
𝟏𝟏 2 𝟓𝟓
a) M(t) = �𝟑𝟑 et + 3� .

Note that
𝟏𝟏
X~Bin �𝟓𝟓, �
𝟑𝟑
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
et
b) M(t) = 2−et.

See the revision pamphlet (no need to recognize this)


t
c) M(t) = e𝟐𝟐(e −1) .
X~Poisson(𝟐𝟐)
λ
d) M(t) = λ−t

See the revision pamphlet (no need to recognize this)


𝛔𝛔𝟐𝟐 t2
e) M(t) = exp �𝛍𝛍t + �.
2

X~N(𝛍𝛍, 𝛔𝛔𝟐𝟐 )
pet
f) M(t) = 1−(1−p)et

See the revision pamphlet (no need to recognize this)

Exercise 9
Consider two discrete random variables X and Y, suppose the moment-generating functions are
t 4 1
MX (t) = e2e −2 and MY (t) = � et − �.
5 4
Find 𝔼𝔼[(X + Y)2 ].
Method 1
Note that
𝕍𝕍ar(X) = 𝔼𝔼(X 2 ) − [𝔼𝔼(X)]2 ⟹ 𝔼𝔼(X 2 ) = 𝕍𝕍ar(X) + [𝔼𝔼(X)]2
Adapt
𝔼𝔼((X + Y)2 ) = 𝕍𝕍ar(X + Y) + [𝔼𝔼(X + Y)]2
From independence (since this is not in our syllabus we will tell you when two rvs are independent and then you can apply
the following relationship)
𝕍𝕍ar(X + Y) = 𝕍𝕍ar(X) + 𝕍𝕍ar(Y) and 𝔼𝔼(X + Y) = 𝔼𝔼(X) + 𝔼𝔼(Y)
4 4
𝕍𝕍ar(X) = 𝔼𝔼(X) = 2 and 𝕍𝕍ar(Y) = , 𝔼𝔼(X) =
20 5

2)
4 42
𝔼𝔼((X + Y) = �2 + � + �2 + �
20 5

Exercise 10
Suppose that Y is a non-negative discrete random variable with a moment-generating function MY (t). Furthermore, let
X be a discrete random variable with a moment-generating function MX (t) given by
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
t
MX (t)MY (t) = e b−t for t ≠ b.
Assume that 𝔼𝔼(X) = 𝔼𝔼(Y) = b.

a) Show that b > 0.


Y is a non-negative discrete random variable
𝔼𝔼(Y) = ∑yp(y)
Note that
y≥0 ∀ y∈D (y is non − negative)
Further
p(y) ≥ 0 ∀ y ∈ D (condition 1 of a valid pmf)
Next
yp(y) ≥ 0
Lastly
∑yp(y) > 0
At least one of the summands is guaranteed to be strictly greater than 0.

b) Determine the value(s) of b.


d d t
�MX (t)MY (t)� = �eb−t �
dt dt
(1) (1) d t t
MX (t)MY (t) + MX (t)MY (t) = � � eb−t
dt b − t
d t b b
� �= =
dt b − t (b − t) 2 (b − t)2
Next
(1) (1) b t
MX (t)MY (t) + MX (t)MY (t) = e b−t
(b − t)2
Set t = 0
(1) (1) b 0 b 1
MX (0)MY (0) + MX (0)MY (0) = e b−0 = =
(b − 0) 2 b 2 b
1 1 1
2b = ⟹ 2b2 = 1 ⟹ b2 = ⟹ b=±
b 2 √2

Exercise 11

Answer the following two questions regarding moment-generating functions.


STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026

a) An instructor claims that the function


4 2 1
MX (t) = 5 + 5et − 5e2t for t ∈ ℝ.

is the mgf of some discrete random variable X. Explain in words why this function cannot be a valid moment-generating
function (mgf).
Fundamental Identity
MX (0) ⟹ valif mgf, otherwise invalid
Check
4 2 1 4 2 1
MX (0) = + 0 − 2(0) = + − = 1
5 5e 5e 5 5 5
Tricky, we need to check the implied probabilities
4 2 −t 1 −2t
MX (t) = + e − e
5 5 5
Implied pmf
x 0 -1 -2
p(x) 4/5 2/5 -1/5
Negative probability? Hence, an invalid mgf
So, for discrete rvs, we should always check the implied probabilities even if the identity is satisfied.

b) The same instructor further claims that function


t
MY (t) = 1−t for |t| < 1.

is the mgf of some discrete random variable Y. Prove that no probability distribution exists for which this is a moment-
generating function.
0
MY (0) = = 0 ≠ 1 ⟹ invalid mgf
1−0

Exercise 12
Let X be a non-negative random variable with the cumulative distribution function (cdf) given by

2x −1
F(x) = 2x
for x = 0, 1, 2, ….

Determine the set of all values for which the moment-generating function of X is defined.

Simplify
2x − 1 1
F(x) = x
= 1− x
2 2
STA2EA1 (University of Johannesburg) Distribution Theory Part 2 2026
Find the pmf
For x=0:
1
p(0) = F(0) = 1 − =0
1
For x=1, 2, 3, …
1 1
p(x) = F(x) − F(x − 1) = 1 − − �1 − �
2x 2x−1
1
p(x) = 2−(x−1) − 2−x = 2−x+1 − 2−x = 2−x (2 − 1) = for x = 1, 2, 3, ….
2x
Find mgf
∞ ∞
tX ) tx −x
MX (t) = 𝔼𝔼(e = �e × 2 = �(2et )x ⟹ a = 2et , r = 2et
x=1 x=1

a 2et
MX (t) = =
1 − r 1 − 2et
Domain
1
1 − 2et = 0 ⟹ 2et = 1 ⟹ et = ⟹ t = ln 2
2
Notation
Domain = {t ∈ ℝ: t ≠ ln 2}
************************************************************* END-OF-TUTORIAL 6 ****************************************************

You might also like