Final Study Solutions
Final Study Solutions
Fall 2019
Instructors: Lerzan Örmeci and Zafer Doğan
TFs: O. Demiray, M. Gurel, S. Kazmi, İ. Pehlivan, and F. Tunçalp
Final Review Solutions
Dec 20, 2019
1 Practice Problems
Problem 1.
Let discrete random variables X and Y have the following joint probability mass function:
pX,Y (1, 1) = 2/8, pX,Y (−1, −1) = 2/8, pX,Y (0, 0) = 2/8, pX,Y (1, −1) = 1/8, pX,Y (−1, 1) =
1/8.
1. Find P (XY > 0).
2. Find E[X].
Problem 2.
Let X and Y be jointly distributed random variables whose joint probability density function
is given by:
x(y + 1), 0 < x < 1, −1 < y < 1,
fX,Y (x, y) =
0, otherwise.
1
2
Z
E[X] = x(2x) dx =
0 3
4. Find V ar[X].
Problem 3.
The download time of large file (for example 1 GB) is an exponential random variable that
depends on the congestion level on the local network. Assume that the congestion level on
the local network is a continuous uniform random variable Y in the interval (0,0.9) (i.e.
fY (y) = 1/0.9 for 0 < y < 0.9 and fY (y) = 0 otherwise). For instance y = 0.8 denotes a
network congestion level of 80%. Now, assume that the probability density function of the
download time (in minutes) given Y = y is given by:
1. Assume that Y = 1/2. What is the probability that the download time is over 2
minutes (P (T > 2|Y = 1/2))?
∞
e−t/2
Z
P (T > 2|Y = 1/2) = dt = e−1 .
2 2
2. What is the probability that the download time is over 2 minutes(P (T > 2))?
To find P (T > 2), we condition to find P (T > 2|Y = y) and use the total law of
probability.
P (T > 2|Y = y) = e−(1−y)2 = 0.368.
Then: Z 0.9
P (T > 2) = (1/0.9)e−(1−y)2 dy = 0.380.
0
3. What is the probability density function of the download time (fT (t))?
Let’s first obtain the cumulative distribution FT (t) using the above argument.
0.9
(1/0.9)(e−0.1t − e−t
Z
−(1−y)t
FT (t) = P (T ≤ t) = P (T ≤ 4) = 1− (1/0.9)e =1− dy for t > 0.
0 t
Then:
(0.1)e−0.1t e−0.1t e−t e−t
dFT (t)
fT (t) = = (1/0.9) + − − for t > 0.
dt t t2 t t2
2
4. What is the probability that the network congestion level was over 1/2 given that the
download time is over 2 minutes (P (Y > 1/2|T > 2))?
fT |Y (t)fY (y)
fY |T (y) = .
fT (t)
Problem 4.
A small business has daily profits that are random and independent. Assume that the daily
profit X is a continuous random variable between 500 and 1500 TL. The business is open
for
p sale for 200 days in a year. Note that E[X] = 1000 TL and V ar(X) = 83, 333.33
( V ar(X) = 288.675).
1. Use the normal approximation to compute the probability that the yearly profit is over
220,000 TL.
Let Π be the profit. Note that
200
X
Π= Xi
i=1
Because Π is the sum of a large number of i.i.d. random variables, P i must have a
normal distribution.
3
Problem 5.
Short questions (provide full explanations of your answers).
1. The Sariyer Storm and the Kilyos Thunder are playing the regional basketball play-off
finals. Each team has an equal probability of winning any game (ties are not allowed)
and the first team to reach 3 wins, wins the series. Assume that Sariyer has won the
first two games. What is the probability that Sariyer wins the series (i.e. reaches three
wins before Kilyos)?
Sariyer wins in the following ways: win game 3, lose game 3 and win game 4 and lose
game 4 and win game 5. The total probability is then: 1/2+1/4+1/8=7/8.
2. There are two coins (blue and red). The blue coin is unbiased and the red one is biased
and has P (Heads) = 3/4. You select a coin randomly and give it your friend without
looking at its color. Your friend tosses it and tells you that the outcome is Heads.
What is the probability that you chose the red coin?
Problem 6.
Alice and Bob take turns tossing a biased coin that turns up heads with probability p. If
Alice tosses a head, she wins the game. If Bob tosses a tail, he wins the game. The coin
tossings continue until one of the two players wins. Alice tosses first.
Useful formula: For any real number a such that |a| < 1, we have
1
1 + a + a2 + a3 + . . . = .
1−a
(a) Find the probability that Alice wins the game. (Hint: the answer is not p)
Solution:
The scenarios from Alice to win the game are
H
THH
THTHH
THTHTHH
......
Thus, we get
p
P[Alice wins] = p 1 + p(1 − p) + p2 (1 − p)2 + p3 (1 − p3 )3 + . . . =
.
1 − p(1 − p)
4
(b) Now, find the probability that Bob wins the game from first principles, that is, do
not just write down P(Bob wins) = 1 − P(Alice wins) = 1 − {answer from part (a)}.
Solution:
For Bob, he wins if
TT
THTT
THTHTT
THTHTHTT
Thus, we get
(1 − p)2
P[Bob wins] = (1 − p)2 1 + p(1 − p) + p2 (1 − p)2 + . . . =
.
1 − p(1 − p)
(c) Show that your answers to parts (a) and (b) add up to 1.
Solution:
p (1 − p)2 p + 1 − 2p + p2
+ = = 1.
1 − p(1 − p) 1 − p(1 − p) 1 − p(1 − p)
(d) For what value(s) of p is this a fair game (that is, a game that both Alice and Bob
have equal probability 1/2 of winning)?
Solution: √
p 1 2 3− 5
We know 1−p+p 2 = 2 . It implies p − p3 + 1 = 0, which yields p = 2 .
(e) Now consider once again the general game (with arbitrary value of p), and let X denote
the total number of coin tosses in the game. Thus, X is a discrete random variable
taking on values 1, 2, 3, ... Find the probability mass function PX (m) of the random
variable X.
Solution:
An odd X implies Alice wining, while an even X implies Bob wining.
( m−1
[p(1 − p)] 2 p, m = 1, 3, 5, . . .
PX (m) = m−2
2
[p(1 − p)] 2 (1 − p) , m = 2, 4, 6, . . . .
∞
X
EX = mPX (m)
m=1
∞
X ∞
X
k
= (2k + 1)[p(1 − p)] p + (2k + 2)[p(1 − p)]k (1 − p)2
k=0 k=0
∞
p + 2(1 − p)2 X
= + [2p + 2(1 − p)2 ] + k[p(1 − p)]k
1 − p(1 − p)
k=0
p + 2(1 − p)2 p(1 − p)
= + [2p + 2(1 − p)2 ] .
1 − p(1 − p) [1 − p(1 − p)]2
5
Problem 7.
Check the appropriate box for each of the statements below. No justification is required.
(a) Answer “TRUE” if the statement below is true for ALL events A and B with 0 <
P(A) < 1 and 0 < P(B) < 1. Otherwise answer “FALSE”.
TRUE FALSE
(b) X is a continuous random variables with finite mean and variance. The functions
FX (x) and fX (x) denote the cumulative distribution function and the probability
density function of X, respectively. Answer “TRUE” if the statement is true for all
such random variables X, otherwise answer “FALSE”.
TRUE FALSE
(c) X and Y are random variables such that var(X) = var(Y ) = σ 2 < ∞. In addition, we
have that var(2X + 3Y + 4) = var(3X − 2Y + 1). Answer “TRUE” if the statement is
true for all such random variables X, Y , otherwise answer “FALSE”.
6
TRUE FALSE
2 E[X 2 ] = E[Y 2 ]
2 var(2X + 3Y + 4) = var(2X − 3Y + 1)
2 cov(X + Y, X − Y ) = 0
2 var(X + Y ) = 2σ 2
Yn = X1 + X2 + . . . Xn ,
Zn = |X1 | + |X2 | + . . . |Xn |,
TRUE FALSE
2 var(|Xn |) = σ 2 + µ2 − τ 2 .
Problem 8.
Check the appropriate box for each of the statements below. No justification is required.
(a) Answer “TRUE” if the statement below is true for ALL events A and B with 0 <
P(A), P(B) < 1. Otherwise answer “FALSE”.
7
TRUE FALSE
2 P(A|B) ≤ 1
2 P(A|B) + P(A|B c ) = 1
2 P(A|B)
P(B) ≤1
2 P(A|B) = P(B|A)P(A)/P(B)
(b) Answer “TRUE” if the statement is true for all continuous random variables X with
finite mean and variance, otherwise answer “FALSE”.
TRUE FALSE
2 (E[X])2 ≤ E[X 2 ]
(c) Let X and Y be independent Gaussian random variables with parameters E[X] =
2
µX , E[Y ] = µY and var(X) = σX , var(Y ) = σY2 . Indicate whether each of the following
statements is true or false.
Notation: fXY (x, y), fX (x), fY (y) denote the joint and marginal PDFs of X and Y ,
respectively; Φ(x) is the CDF of a standard Gaussian random variable with zero mean
and unit variance, that is,
Z x
1 2
Φ(x) = √ e−t /2 dt.
2π −∞
8
TRUE FALSE
2 E[XY ] = 0
2 2
var(X + Y ) = σX + σY2
2 P(X + Y < z) = Φ √ 2X −µ2Y
z−µ
σX +σY
2 cov(X, Y ) = 0
Yn = X1 + X2 + . . . Xn .
Assume that the random variables X1 , X2 , . . . , Xn have finite mean µ and finite vari-
ance σ 2 .
TRUE FALSE
2 If X bn ) = σ 2 /n.
bn = Yn /n, then var(X
√
2 For sufficiently large n, we have P(Yn ≤ nµ + σ n) ≈ Φ(1).
Problem 9.
The random point (X, Y ) is uniformly distributed on the shaded region shown below.
9
Y
1
05
05 1 X
(b) Find the marginal PDF fX (x) of the random variable X. In order to obtain full credit,
you must specify the value of fX (x) for all real numbers x.
Solution:
n
2
fX (x) = 3 , if 0 < x < 0.5, 43 , if 0.5 < x < 1, 0, otherwise.
(d) Find the PDF of the random variable Z = Y /X. In order to obtain full credit, you
must specify the value of fZ (z) for all real numbers z.
Solution:
We know that
Y
FZ (z) = P( ≤ z) = P(Y ≤ zX).
X
10
z
4 2 +z 1 z
If z ≤ 1 (see the figure above), we get FZ (z) = 3 · 2 · 2 = 2.
1 1
4 2z + z 1 1
If z > 1 (see the figure below), we get FZ (z) = 1 − 3 · 2 · 2 = 1− 2z , which yields
1
2,
0<z<1
1 −2
fZ (z) = 2 z , z ≥ 1
0 otherwise.
Problem 10.
On any given flight, an airline’s goal is to fill the plane as much as possible without over-
booking. If, on average, 10% of customers cancel their tickets, all independently of each
other, what is the probability that a particular flight will be overbooked if the airline sells
320 tickets for a plane that has a maximum capacity of 300 people? What is the probabil-
ity that a plane with maximum capacity 150 people will be overbooked if the airline sells
160 tickets? Express the answers in terms of the standard normal cumulative distribution
function, Φ(x). (Hint. Consider the probability p of a success to be the probability that a
given person actually shows up for the flight. From this, deduce what the effective mean
and standard deviation are for the number of successes in the case when n = 320 or when
n = 160, respectively.)
Solution:
Let N be the number of people that actually show up for the flight. The flight will be
overbooked if N > 300. We can use the normal approximation to the binomial to calculate
this probability. Note that n = 320 and p = 0.9 where p is the probability of a success
(a customer does show up for √ the flight). So the effective mean is 0.9 · 320 = 288 and the
effective standard deviation is 320 · 0.9 · 0.1 = 5.367. Then we have,
320 − 288 301 − 288
P (301 ≤ N ≤ 320) = Φ −Φ = 1 − Φ(2.4181) = 0.0078.
5.367 5.367
A similar computation for the smaller plane shows that the effective mean and standard
deviation are 144 and 3.794, respectively, and that the probability of overbooking in that
case is:
151 − 144
P (151 ≤ N ≤ 160) = 1 − Φ = 1 − Φ(1.8450) = 0.0329.
3.794
Problem 11.
Two coins, one fair and one coming up heads with probability 1/3, are in a pocket. Other
than this difference in their bias, the coins are indistinguishable. One coin is drawn from
the pocket, with each of the two coins equally likely to be chosen. We want to know which
coin we actually picked by flipping it multiple times and observing the results.
(a) Suppose the coin drawn is flipped three times. What is the probability that heads
show up on all three flips?
Solution:
1 1 3 1 1 3
P[HHH] = ·( ) + ( ) .
2 2 2 3
11
(b) Given that a total of two heads show up on the three flips, what is the probability
that the coin is fair?
Solution:
1 3 1 3
P[fair]P[2H|fair] 2 2 (2)
P[fair|2H] = = 1 31 3
1 3 1 22
2 2 2) + 2 2 (3) 3
(
P[2H]
Solution:
Problem 12.
1 2 x
12
(a) What is the value of the constant c?
Solution:
1
c= = 1.
Area
13
From the figure above, we get
0,
z < −1
FZ (z) = P(Y − X ≤ z) = P(Y ≤ X + z) = 1, z>0
1 + z. −1 < z < 0
14