Homework 7 Solutions
Homework 7 Solutions
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:
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 ].
Exercise 2.
Let c be a constant. Show that
(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!
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].
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
(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
Find
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
= P (X is odd) = 2/3