ENGR 200: Probability and Random Variables for Engineers
Fall 2021
Instructors: Lerzan Örmeci and Sinem Çöleri
TAs: N. Khan, M. Gürel, S. Kazmi, A. Mozaffari, and H. Guven
Homework 7 Solutions
Exercise 1.
An academic department offers 8 lower level courses: [L1 , L2 , ....L8 ] and 10 higher level
courses: [H1 , H2 ....H10 ]. A valid curriculum consists of 4 lower level courses and 3 higher
level courses.
(a) How many different curricula are possible?
(b) Suppose that [H1 ..., H5 ] have L1 as a prerequisite, and [H6 ..., H10 ] have L2 and L3
as prerequisites. i.e. any curricula which involve, say, one of [H1 , ..., H5 ] must also
include L1 . How many different curricula are there?
Solution:
(a) There are 84 ways to pick 4 lower level classes, and 10
3 ways to choose 3 higher level
classes, so there are 84 10
3 valid curricula.
(b) We need to consider several different cases:
Suppose we do not choose L1 . Then both L2 and L3 must be chosen; otherwise no
higher level courses would be allowed. Thus, we need to choose 2 more lower level
classes out
of the remaining 5, and 3 higher level classes from the available 5. We then
obtain 52 53 valid curricula.
If we choose L1 but choose neither L2 nor L3, we have 53 53 choices.
If we choose L1 and choose one of L2 or L3 , we have 2 52 53 choices. This is because
there are two ways of choosing between L2 and L3 , 52 ways of choosing 2 lower level
classes from [L4 , ..., L8 ] and 53 ways of choosing 3 higher level classes from [H1 , ..., H5 ].
Finally, if we choose L1 , L2 , and L3 , we have 51 10
3 choices. The total is found by
adding the above four.
Exercise 2.
Let c be a constant. Show that
(a) V ar(cX) = c2 V ar(X)
(b) V ar(c + X) = V ar(X)
Solution:
(a)
V ar(cX) = E[(cX)2 ] − (E[cX])2
= c2 E[X 2 ] − (cE[X])2
= c2 (E[X 2 ] − (E[X])2 )
= c2 V ar(X)
alternatively;
V ar(cX) = E[(cX − E[cX])2 ]
= E[c2 (X − E[X])2 ]
= c2 E[(X − E[X])2 ]
= c2 V ar(X)
(b)
V ar(c + X) = E[(c + X)2 ] − (E[c + X])2
= E[c2 + X 2 + 2cX] − (c2 + E[X]2 + 2cE[X])
= c2 + E[X 2 ] + 2cE[X] − c2 − E[X]2 − 2cE[X])
= E[X 2 ] − E[X]2
= V ar(X)
alternatively;
V ar(c + X) = E[(c + X − E[c + X])2 ]
= E[(X − E[X])2 ]
= V ar(X)
Exercise 3.
Suppose that the joint probability mass function of X and Y is:
y −2λ λy
pX,Y (x, y) = e for 0 ≤ x ≤ y
x y!
Find the probability mass function of X.
Solution:
∞
X y λy
pX (x) = e−2λ
y=x
x y!
∞
X y! λy
= e−2λ
y=x
(y − x)!x! y!
∞
1 −2λ X 1
= e λy
x! y=x
(y − x)!
∞
λx −2λ X λy−x
= e
x! y=x
(y − x)!
∞
λx −2λ X λk
= e
x! k!
k=0
λx −λ
= e
x!
Therefore, we observe that X ∼Poisson(λ)
Exercise 4.
Random variables X and Y have the following joint PMF:
(
c
if x ∈ {1, 2, 3} and y ∈ {1, 2}
pX,Y (x, y) = xy
0 otherwise
(a) Find the coefficient c.
(b) Find pX (x) and E[X].
(c) Let Z = max{X, Y }. Find the PMF of Z.
(d) Find the expected value of Z.
(e) Find the variance of Z.
Solution:
(a)
3 X 2
X c
=1
x=1 y=1
xy
c c c c c c
+ + + + + =1
1 2 2 4 3 6
11c
=1
4
4
⇒c=
11
(b)
2
X 4 4 4 6
pX (x) = = + = for x = 1, 2, 3
y=1
11xy 11x 22x 11x
3
X 6 18
E[X] = x =
x=1
11x 11
(c) The minimum value of Z is 1 and the maximum value is 3.
4
pZ (1) = pX,Y (1, 1) = 11
4 4 4 5
pZ (2) = pX,Y (1, 2) + pX,Y (2, 1) + pX,Y (2, 2) = 22 + 22 + 44 = 11
4 4 2
pZ (3) = pX,Y (3, 1) + pX,Y (3, 2) = 33 + 66 = 11
Then the PMF of Z is:
4
11 if z = 1
5
if z = 2
pZ (z) = 11
2
if z = 3
11
0 otherwise
(d)
3
X 4 5 2 20
E[Z] = z pZ (z) = 1 +2 +3 =
z=1
1 11 11 11
(e)
3
X 4 5 2 42
E[Z 2 ] = z 2 pZ (z) = 1 +4 +9 =
z=1
1 11 11 11
2
42 20
V ar(Z) = E[Z 2 ] − (E[Z])2 = − = 0.5124
11 11
Exercise 5.
A random variable X has the following probability mass function
pX (k) = C2−k , where k = 1, 2, 3, ...
Find
(a) the value of the constant C,
(b) P(X > 5),
(c) the probability that X is odd.
(a) Probability values of the discrete random variable should add up to 1.
X
pX (k) = 1
k
∞
X ∞
X
−k
C2 = 1 =⇒ C 1/2k = 1
k=1 k=1
C × (1) = 1
C=1
(b)
P (X > 5) = 1 − P (X ≤ 5)
5
X
P (X ≤ 5) = pX (k) = 1/2 + 1/4 + 1/8 + 1/16 + 1/32 = 31/32
k=1
=⇒ 1 − P (X ≤ 5) = 1 − 31/32 = 1/32
P (X > 5) = 1/32
(c)
∞
X 1
P (X is odd) = pX (1) + pX (3) + pX (5) + ... + pX (2k − 1) =
22k−1
k=1
= 1/2 + 1/8 + 1/32 + ... = (1/2) × (1 + 1/4 + 1/16 + ...)
∞
1X 1 1
= = (1/2) ×
2 4k 1 − (1/4)
k=0
= P (X is odd) = 2/3