MIT18 05S14 Class26-Sol
MIT18 05S14 Class26-Sol
MIT18 05S14 Class26-Sol
52
Problem 2. (a) .
5
4 13 4 12
(b) Number of ways to get a full-house:
2 1 3 1
4 13 4 12
2 1 3 1
(c)
52
5
Problem 3. There are several ways to think about this. Here is one.
The 11 letters are p, r, o, b,b, a, i,i, l, t, y. We use the following steps to create a
sequence of these letters.
Step 1: Choose a position for the letter p: 11 ways to do this.
Step 2: Choose a position for the letter r: 10 ways to do this.
Step 3: Choose a position for the letter o: 9 ways to do this.
Step 4: Choose two positions for the two b’s: 8 choose 2 ways to do this.
Step 5: Choose a position for the letter a: 6 ways to do this.
Step 6: Choose two positions for the two i’s: 5 choose 2 ways to do this.
Step 7: Choose a position for the letter l: 3 ways to do this.
Step 8: Choose a position for the letter t: 2 ways to do this.
Step 9: Choose a position for the letter y: 1 ways to do this.
Multiply these all together we get:
8 5 11!
11 · 10 · 9 · ·6· ·3·2·1 =
2 2 2! · 2!
1
Problem 5. D is the disjoint union of D ∩ C and D ∩ C c .
So, P (D ∩ C) + P (D ∩ C c ) = P (D)
⇒ P (D ∩ C c ) = P (D) − P (D ∩ C) = .4 − .2 = .2.
Problem 8. Let Hi be the event that the ith hand has one king. We have the
conditional probabilities
4 48 3 36 2 24
1 12 1 12 1 12
P (H1 ) = ; P (H2 |H1 ) = ; P (H3 |H1 ∩ H2 ) =
52 39 26
13 13 13
P (H4 |H1 ∩ H2 ∩ H3 ) = 1
Problem 9. Sample space = Ω = {(1, 1), (1, 2), (1, 3), . . . , (6, 6) } = {(i, j) | i, j =
1, 2, 3, 4, 5, 6 }.
(Each outcome is equally likely, with probability 1/36.)
2
A = {(1, 3), (2, 2), (3, 1)},
B = {(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (1, 3), (2, 3), (4, 3), (5, 3), (6, 3) }
P (A ∩ B) 2/36 2
P (A|B) = = = ..
P (B) 11/36 11
(b) P (A) = 3/36 = P (A|B), so they are not independent.
Problem 10. We compute all the pieces needed to apply Bayes’ rule.
We’re given P (T |B) = .7 ⇒ P (T c |B) = .3, P (T |B c ) = .1 ⇒ P (T c |B c ) = .9.
P (B) = 1.3 × 10−5 ⇒ P (B c ) = 1 − P (B) = 1 − 1.3 × 10−5 .
We use the law of total probability to compute P (T ):
P (T ) = P (T |B) P (B) + P (T |B c ) P (B c ) = .1000078.
Now we can use Bayes’ rule to answer the question:
P (T |B) P (B) P (T c |B) P (B)
P (B|T ) = = 9.10 × 10−5 , P (B|T c ) = c
= 4.33 × 10−6 ,
P (T ) P (T )
Problem 11. For a given problem let C be the event the student gets the problem
correct and K the event the student knows the answer.
The question asks for P (K|C).
P (C|K) P (K)
We’ll compute this using Bayes’ rule: P (K|C) = .
P (C)
We’re given: P (C|K) = 1, P (K) = 0.6.
Law of total prob.:
P (C) = P (C|K) P (K) + P (C|K c ) P (K c ) = 1 · 0.6 + 0.25 · 0.4 = 0.7.
0.6
Therefore P (K|C) = = .857 = 85.7%.
0.7
Problem 12.
Here is the game tree, R1 means red on the first draw etc.
7/10 3/10
R1 B1
6/9 3/9 7/10 3/10
R2 B2 R2 B2
5/8 3/8 6/9 3/9 6/9 3/9 7/10 3/10
R3 B3 R3 B3 R3 B3 R3 B3
3
Problem 13. We have P (A ∪ B) = 1 − 0.42 = 0.58 and we know
Thus,
P (A ∩ B ∩ C) = 0.06 P (A ∩ B) = 0.12
P (A ∩ C) = 0.15 P (B ∩ C) = 0.2
P (A ∩ B ∩ C c ) = 0.06
P (A ∩ B c ∩ C) = 0.09
P (Ac ∩ B ∩ C) = 0.14
Problem 15. (a) E = even numbered = {Feb, Apr, Jun, Aug, Oct, Dec}.
F = first half = {Jan, Feb, Mar, Apr, May, Jun}.
S = summer = {Jun, Jul, Aug}.
(a) E ∩ F = {Feb, Apr, Jun} ⇒ P (E|F ) = 3/6 = P (E). So, they are independent.
6 P (E). So, they are not independent.
(b) E ∩ S = {Jun, Aug} ⇒ P (E|S) = 2/3 =
Problem 16. 6
To show A and B are not independent we need to show P (A ∩ B) =
P (A) · P (B).
6 P (A) · P (B).
(a) No, they cannot be independent: A ∩ B = ∅ ⇒ P (A ∩ B) = 0 =
(b) No, they cannot be independent: same reason as in part (a).
(c) No, they cannot be independent: A ⊂ B ⇒ A ∩ B = A
⇒ P (A ∩ B) = P (A) > P (A) · P (B). The last inequality follows because P (B) < 1.
(d) No, they cannot be independent: (This one is a little tricky.)
To ease notation, write P (A) = a, P (B) = b.
A and B are independent implies P (A ∩ B) = ab.
We know P (A ∪ B) = P (A) + P (B) − P (A ∩ B) = a + b − ab.
Here’s the trickiness:
a + b − ab = a + b(1 − a) < a + (1 − a) = 1, so P (A ∪ B) < 1.
4
The final bit of the proof is to show that if we assume A ∪ B and A are independent
we are lead to a contradiction. This is easy, since if they are independent then
P (A ∪ B|A) = P (A ∪ B),
but it is clear that P (A ∪ B|A) = 1.
Since we can’t have both P (A ∪ B) < 1 and P (A ∪ B) = 1 the assumption of
independence must be false.
5
(d) Var(X) = E(X 2 ) − E(X)2 = 3/5 − 1/25 = 14/25.
Problem 22. Let X be the number of people who get their own hat.
Following the hint: let Xj represent whether person j gets their own hat. That is,
Xj = 1 if person j gets their hat and 0 if not.
100
1 100
1
We have, X = Xj , so E(X) = E(Xj ).
j=1 j=1
Since person j is equally likely to get any hat, we have P (Xj = 1) = 1/100. Thus,
Xj ∼ Bernoulli(1/100) ⇒ E(Xj ) = 1/100 ⇒ E(X) = 1.
n 1n
y
P (Y = y) = P (X = ) = .
2 y/2 2
6
Problem 25. We have cdf of X,
Z x
FX (x) = λe−λx dx = 1 − e−λx .
0
λ − 1 −λ√y
fY (y) = y 2e .
2
E(X) = 3 E(textbinomial(25, 1/6)) = 3·25/6 = 75/6, and Var(X) = 9 Var(textbinomial(25, 1/6)) = 9·25(
(c) E(X + Y ) = E(X) + E(Y ) = 150/6 = 25., E(2X) = 2E(X) = 150/6 = 25.
Var(X + Y ) = Var(X) + Var(Y ) = 250/4. Var(2X) = 4Var(X) = 500/4.
The means of X + Y and 2X are the same, but Var(2X) > Var(X + Y ).
This makes sense because in X +Y sometimes X and Y will be on opposite sides from
the mean so distances to the mean will tend to cancel, However in 2X the distance
to the mean is always doubled.
7
Problem 28. First we find the value of a:
Z 1 Z 1
1 a
f (x) dx = 1 = x + ax2 dx = + ⇒ a = 3/2.
0 0 2 3
The CDF is FX (x) = P (X ≤ x). We break this into cases:
(i) b < 0 ⇒ FX (b) = 0.
Z b
3 b2 b3
(ii) 0 ≤ b ≤ 1 ⇒ FX (b) = x + x2 dx = + .
0 2 2 2
(iii) 1 < x ⇒ FX (b) = 1.
Using FX we get
.52 + .53
13
P (.5 < X < 1) = FX (1) − FX (.5) = 1 − = .
2 16
Problem 31. The jumps in the distribution function are at 0, 1/2, 3/4. The value
of p(a) at at a jump is the height of the jump:
a: 0 1/2 3/4
p(a): 1/3 1/6 1/2
Problem 32. (i) yes, discrete, (ii) no, (iii) no, (iv) no, (v) yes, continuous
(vi) no (vii) yes, continuous, (viii) yes, continuous.
8
(b) f (x) = F ' (x) = 4x − 4x3 in [0,1].
9
Problem 37. (a) Note, Y follows what is called a log-normal distribution.
FY (a) = P (Y ≤ a) = P (eZ ≤ a) = P (Z ≤ ln(a)) = Φ(ln(a)).
Differentiating using the chain rule:
d d 1 1 2
fy (a) = FY (a) = Φ(ln(a)) = φ(ln(a)) = √ e−(ln(a)) /2 .
da da a 2π a
(b) (i) We want to find q.33 such that P (Z ≤ q.33 ) = .33. That is, we want
Problem 39.
(a) We did this in class. Let φ(z) and Φ(z) be the PDF and CDF of Z.
FY (y) = P (Y ≤ y) = P (aZ + b ≤ y) = P (Z ≤ (y − b)/a) = Φ((y − b)/a).
Differentiating:
d d 1 1 2 2
fY (y) = FY (y) = Φ((y − b)/a) = φ((y − b)/a) = √ e−(y−b) /2a .
dy dy a 2π a
10
Since this is the density for N(b, a2 ) we have shown Y ∼ N(b, a2 ).
(b) By part (a), Y ∼ N(µ, σ 2 ) ⇒ Y = σZ + µ.
But, this implies (Y − µ)/σ = Z ∼ N(0, 1). QED
b b b
x2 b2 − a 2
Z Z
1 a+b
E(X) = xf (x) dx = x dx = = = .
a b−a a 2(b − a) a 2(b − a) 2
b b 3 b
b3 − a3
Z Z
1 x
E(X 2 ) = x2 f (x) dx = x2 dx = = .
a b−a a 3(b − a) a 3(b − a)
2 b3 − a3 (b + a)2
2
Var(X) = E(X ) − E(X) = −
3(b − a) 4
4(b3 − a3 ) − 3(b − a)(b + a)2 b3 − 3ab2 + 3a2 b − a3 (b − a)3 (b − a)2
= = = = .
12(b − a) 12(b − a) 12(b − a) 12
Method 2
There is an easier way to find E(X) and Var(X).
Let U ∼ U(a, b). Then the calculations above show E(U ) = 1/2 and (E(U 2 ) = 1/3
⇒ Var(U ) = 1/3 − 1/4 = 1/12.
Now, we know X = (b−a)U +a, so E(X) = (b−a)E(U )+a = (b−a)/2+a = (b+a)/2
and Var(X) = (b − a)2 Var(U ) = (b − a)2 /12.
11
(c) (c) Sn + Tm ∼ Binomial(n + m, p), since it is the number of successes in n + m
independent Bernoulli trials.
(d) (d) Yes, Sn and Tm are independent. We haven’t given a formal definition of
independent random variables yet. But, we know it means that knowing Sn gives no
information about Tm . This is clear since the first n trials are independent of the last
m.
Problem 43. Compute the median for the exponential distribution with parameter
λ. The density for this distribution is f (x) = λ e−λx . We know (or can compute)
that the distribution function is F (a) = 1 − e−λa . The median is the value of a such
that F (a) = .5. Thus, 1 − e−λa = 0.5 ⇒ 0.5 = e−λa ⇒ log(0.5) = −λa ⇒
a = log(2)/λ.
Problem 44. Let X = the number of heads on the first 2 flips and Y the number
in the last 2. Considering all 8 possibe tosses: HHH, HHT etc we get the following
joint pmf for X and Y
Y /X 0 1 2
0 1/8 1/8 0 1/4
1 1/8 1/4 1/8 1/2
2 0 1/8 1/8 1/4
1/4 1/2 1/4 1
Using the table we find
1 1 1 1 5
E(XY ) = +2 +2 +4 = .
4 8 8 8 4
We know E(X) = 1 = E(Y ) so
5 1
Cov(X, Y ) = E(XY ) − E(X)E(Y ) = −1= .
4 4
�
Since X is the sum of 2 independent Bernoulli(.5) we have σX = 2/4
Cov(X, Y ) 1/4 1
Cor(X, Y ) = = = .
σ X σY (2)/4 2
Problem 45. As usual let Xi = the number of heads on the ith flip, i.e. 0 or 1.
Let X = X1 + X2 + X3 the sum of the first 3 flips and Y = X3 + X4 + X5 the sum
of the last 3. Using the algebraic properties of covariance we have
Cov(X, Y ) = Cov(X1 + X2 + X3 , X3 + X4 + X5 )
= Cov(X1 , X3 ) + Cov(X1 , X4 ) + Cov(X1 , X5 )
+ Cov(X2 , X3 ) + Cov(X2 , X4 ) + Cov(X2 , X5 )
+ Cov(X3 , X3 ) + Cov(X3 , X4 ) + Cov(X3 , X5 )
12
1
Because the Xi are independent the only non-zero term in the above sum is Cov(X3 X3 ) = Var(X3 ) =
4
Therefore, Cov(X, Y ) = 14 .
We get the correlation by dividing by the standard
�
p deviations. Since X is the sum of
3 independent Bernoulli(.5) we have σX = 3/4
Cov(X, Y ) 1/4 1
Cor(X, Y ) = = = .
σ X σY (3)/4 3
Problem 46.
answer: U = X + Y takes values 0, 1, 2 and V = |X − Y | takes values 0, 1.
The table is computed as follows:
P (U = 0, V = 0) = P (X = 0, Y = 0) = 1/4,
P (U = 1, V = 0) = 0,
P (U = 2, V = 0) = P (X = 1, Y = 1) = 1/4.
P (U = 0, V = 1) = 0,
P (U = 1, V = 1) = P (X = 1, Y = 0) + P (X = 0, Y = 1) = 1/2,
P (U = 2, V = 1) = 0.
V \U 0 1 2 PV
0 1/4 0 1/4 1/2
1 0 1/2 0 1/2
PU 1/4 1/2 1/4 1
Problem 48. (a) Here we have two continuous random variables X and Y with
going potability density function
12
f (x, y) = xy(1 + y) for 0 ≤ x ≤ 1 and 0 ≤ y ≤ 1,
5
13
and f (x, y) = 0 otherwise. So
Z 1 Z 2
1 1 1 2 2 3 41
P( ≤ X ≤ , ≤ Y ≤ ) = f (x, y)dy dx = .
4 2 3 3 1
4
1
3
720
a b
(b) F (a, b) = 0 0
f (x, y)dy dx = 53 a2 b2 + 52 a2 b3 for 0 ≤ a ≤ 1 and 0 ≤ b ≤ 1.
(c) Since f (x, y) = 0 for y > 1, we have
d
This is consistent with (c) because dx
(x2 ) = 2x.
(e) We first compute fY (y) for 0 ≤ y ≤ 1 as
Z 1
6
fY (y) = f (x, y)dx = y(y + 1).
0 5
(b) For practice, here we’ll use the formula (see problem 11)
Cov(X, Y ) = E(XY ) − E(X)E(Y ).
(c) We have
14
where the first equality is by (a) and the second equality is by (b).
Y \X 0 1 PY
X and Y are independent, so the table is computed from 0 1/8 1/8 1/4
Problem 53. (a) the product of the known marginal probabilities. Since 1 1/4 1/4 1/2
they are independent, Cov(X, Y ) = 0. 2 1/8 1/8 1/4
PX 1/2 1/2 1
(b) The sample space is Ω = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}.
P (X = 0, Z = 0) = P ({T T H, T T T }) = 1/4.
P (X = 0, Z = 1) = P ({T HH, T HT }) = 1/4. Z\X 0 1 PZ
P (X = 0, Z = 2) = 0. 0 1/4 0 1/4
P (X = 1, Z = 0) = 0. 1 1/4 1/4 1/2
P (X = 1, Z = 1) = P ({HT H, HT T }) = 1/4. 2 0 1/4 1/4
PX 1/2 1/2 1
P (X = 1, Z = 2) = P ({HHH, HHT }) = 1/4.
15
Cov(X, Z) = E(XZ) − E(X)E(Z).
E(X) = 1/2, E(Z) = 1, E(XZ) = xi yj p(xi , yj ) = 3/4.
⇒ Cov(X, Z) = 3/4 − 1/2 = 1/4.
Z a Z b
Problem 55. (a) F (a, b) = P (X ≤ a, Y ≤ b) = (x + y) dy dx.
0 0
b a
y2 b2 x2 b2 a2 b + ab2
Inner integral: xy + = xb + . Outer integral: b+ x = .
2 0 2 2 2 0 2
2 2
x y + xy
So F (x, y) = and F (1, 1) = 1.
2
Z 1 Z 1 1
y2 1
(b) fX (x) = f (x, y) dy = (x + y) dy = xy + = x+ .
0 0 2 0 2
By symmetry, fY (y) = y + 1/2.
(c) To see if they are independent we check if the joint density is the product of the
marginal densities.
f (x, y) = x + y, fX (x) · fY (y) = (x + 1/2)(y + 1/2).
Since these are not equal, X and Y are not independent.
16
" #
1 1 1 1 1
y2
Z Z Z Z
x 7
(d) E(X) = x(x + y) dy dx = x2 y + x dx = x2 + dx = .
0 0 0 2 0 0 2 12
Z 1 Z 1
(Or, using (b), E(X) = xfX (x) dx = x(x + 1/2) dx = 7/12.)
0 0
By symmetry E(Y ) = 7/12.
Z 1Z 1
2 2 5
E(X + Y ) = (x2 + y 2 )(x + y) dy dx = .
0 0 6
Z 1Z 1
1
E(XY ) = xy(x + y) dy dx = .
0 0 3
1 49 1
Cov(X, Y ) = E(XY ) − E(X)E(Y ) = − = − .
3 144 144
Problem 56.
Standardize:
! 1P
Xi − µ
X
n 30/n − µ
P Xi < 30 =P √ < √
i
σ/ n σ/ n
30/100 − 1/5
≈P Z< (by the central limit theorem)
1/30
= P (Z < 3)
= 1 − .0013 = .9987 (from the table)
X1 + . . . + X144
Problem 58. Let X = ⇒ E(X) = 2, and σX = 2/12 = 1/6.
√ 144
( n = 12)
264
A chain of algebra gives P (X1 + . . . + X144 ) + P X > = P X > 1.8333 .
144
X −2 1.8333 − 2 X −2
Standardization gives P (X > 1.8333) = P > =P > −1.0
1/6 1/6 1/6
X −2
Now, the Central limit theorem says P > −1.0 ≈ P (Z > −1) = .84
1/6
17
�
p
We know E(X) = np and Var(X) = np(1 − p), σX = np(1 − p).
Since X is a sum of i.i.d. random variables, the CLT theorem says X ≈ N(np, np(1 − p)).
X − np|
Standardization then gives p � ≈ N(0, 1).
np(1 − p)
Problem 60. (a) When this question was asked in a study, the number of
undergraduates who chose each option was 21, 21, and 55, respectively. This shows
a lack of intuition for the relevance of sample size on deviation from the true mean
(i.e., variance).
(b) The random variable XL , giving the number of boys born in the larger hospital
on day i, is governed by a Bin(45, .5) distribution. So Li has a Ber(pL ) distribution
with
45
1
X 45
pL = P (X > 27) = .545 ≈ .068
k
k=28
Similarly, the random variable XS , giving the number of boys born in the smaller
hospital on day i, is governed by a Bin(15, .5) distribution. So Si has a Ber(pS )
distribution with
15
1
X 15
pS = P (XS > 9) = .515 ≈ .151
k
k=10
E(L) = 365pL ≈ 25
E(S) = 365pS ≈ 55
Var(L) = 365pL (1 − pL ) ≈ 23
Var(S) = 365pS (1 − pS ) ≈ 47
18
Thus
364 1
1 365
P (L > S) = p(i, j) ≈ .0000916
i=0 j=i+1
19
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.