Mit18 05s22 Practice Ex1 Qa
Mit18 05s22 Practice Ex1 Qa
Problem 1. In a ballroom dancing class the students are divided into group 𝐴 and group
𝐵. There are six people in group 𝐴 and seven in group 𝐵. If four 𝐴s and four 𝐵s are
chosen and paired off, how many pairings are possible?
Solution: Build the pairings in stages and count the ways to build each stage:
6
Stage 1: Choose the 4 from group 𝐴: ( ).
4
7
Stage 2: Choose the 4 from group 𝐵: ( )
4
We need to be careful because we don’t want to build the same 4 couples in multiple ways.
Line up the 4 𝐴’s 𝐴1 , 𝐴2 , 𝐴3 , 𝐴4
Stage 3: Choose a partner from the 4 𝐵s for 𝐴1 : 4.
Stage 4: Choose a partner from the remaining 3 𝐵s for 𝐴2 : 3
Stage 5: Choose a partner from the remaining 2 𝐵s for 𝐴3 : 2
Stage 6: Pair the last 𝐵 with 𝐴4 : 1
6 7
Number of possible pairings: ( )( )4!.
4 4
Note: we could have done stages 3-6 in one go as: Stages 3-6: Arrange the 4 𝐵s opposite
the 4 𝐴s: 4! ways.
Problem 2. Let 𝐴 and 𝐵 be two events. Suppose the probability that neither 𝐴 or 𝐵 occurs
is 2/3. What is the probability that one or both occur?
Solution: We are given 𝑃 (𝐴𝑐 ∩ 𝐵𝑐 ) = 2/3 and asked to find 𝑃 (𝐴 ∪ 𝐵).
𝐴𝑐 ∩ 𝐵𝑐 = (𝐴 ∪ 𝐵)𝑐 ⇒ 𝑃 (𝐴 ∪ 𝐵) = 1 − 𝑃 (𝐴𝑐 ∩ 𝐵𝑐 ) = 1/3.
Problem 3. Suppose you are taking a multiple-choice test with 𝑐 choices for each question.
In answering a question on this test, the probability that you know the answer is 𝑝. If you
don’t know the answer, you choose one at random. What is the probability that you knew
the answer to a question, given that you answered it correctly?
Solution: The following tree shows the setting
𝑝 1−𝑝
Know Guess
1 0 1/𝑐 1 − 1/𝑐
Let 𝐶 be the event that you answer the question correctly. Let 𝐾 be the event that you
actually know the answer. The left circled node shows 𝑃 (𝐾 ∩ 𝐶) = 𝑝. Both circled nodes
1
Exam 1 Practice I, Spring 2022 2
𝑃 (𝐾 ∩ 𝐶) 𝑝
𝑃 (𝐾|𝐶) = =
𝑃 (𝐶) 𝑝 + (1 − 𝑝)/𝑐
Or we could use the algebraic form of Bayes’ theorem and the law of total probability: Let
𝐺 stand for the event that you’re guessing. Then we have,
𝑃 (𝐶|𝐾) = 1, 𝑃 (𝐾) = 𝑝, 𝑃 (𝐶) = 𝑃 (𝐶|𝐾)𝑃 (𝐾) + 𝑃 (𝐶|𝐺)𝑃 (𝐺) = 𝑝 + (1 − 𝑝)/𝑐. So,
𝑃 (𝐶|𝐾)𝑃 (𝐾) 𝑝
𝑃 (𝐾|𝐶) = =
𝑃 (𝐶) 𝑝 + (1 − 𝑝)/𝑐
Problem 5. Suppose that 𝑃 (𝐴) = 0.4, 𝑃 (𝐵) = 0.3 and 𝑃 ((𝐴 ∪ 𝐵)𝐶 ) = 0.42. Are 𝐴 and 𝐵
independent?
Solution: We have 𝑃 (𝐴 ∪ 𝐵) = 1 − 0.42 = 0.58 and we know because of the inclusion-
exclusion principle that
Thus,
Problem 6. Suppose that 𝑋 takes values between 0 and 1 and has probability density
function 2𝑥. Compute Var(𝑋) and Var(𝑋 2 ).
Solution: We will make use of the formula Var(𝑌 ) = 𝐸[𝑌 2 ] − 𝐸[𝑌 ]2 . First we compute
1
2
𝐸[𝑋] = ∫ 𝑥 ⋅ 2𝑥𝑑𝑥 =
0 3
1
1
𝐸[𝑋 2 ] = ∫ 𝑥2 ⋅ 2𝑥𝑑𝑥 =
0 2
1
1
𝐸[𝑋 4 ] = ∫ 𝑥4 ⋅ 2𝑥𝑑𝑥 = .
0 3
Thus,
2 1 4 1
Var(𝑋) = 𝐸[𝑋 2 ] − (𝐸[𝑋]) = − =
2 9 18
and
2 1 1 1
Var(𝑋 2 ) = 𝐸[𝑋 4 ] − (𝐸[𝑋 2 ]) = − = .
3 4 12
Problem 7. Suppose 100 people all toss a hat into a box and then proceed to randomly
pick out of a hat. What is the expected number of people to get their own hat back.
Hint: express the number of people who get their own hat as a sum of random variables
whose expected value is easy to compute.
Solution: Let 𝑋 be the number of people who get their own hat.
Following the hint: let 𝑋𝑗 represent whether person 𝑗 gets their own hat. That is, 𝑋𝑗 = 1
if person 𝑗 gets their hat and 0 if not.
100 100
We have, 𝑋 = ∑ 𝑋𝑗 , so 𝐸[𝑋] = ∑ 𝐸[𝑋𝑗 ].
𝑗=1 𝑗=1
Since person 𝑗 is equally likely to get any hat, we have 𝑃 (𝑋𝑗 = 1) = 1/100. Thus, 𝑋𝑗 ∼
Bernoulli(1/100) ⇒ 𝐸[𝑋𝑗 ] = 1/100 ⇒ 𝐸[𝑋] = 1.
Problem 8. Let 𝑇 be the waiting time for customers in a queue. Suppose that 𝑇 is
exponential with pdf 𝑓(𝑡) = 2e−2𝑡 on [0, ∞).
Find the pdf of the rate at which customers are served 𝑅 = 1/𝑇 .
Solution: The CDF for 𝑇 is
𝑡
𝑡
𝐹𝑇 (𝑡) = 𝑃 (𝑇 ≤ 𝑡) = ∫ 2e−2𝑢 𝑑𝑢 = −e−2𝑢 ∣0 = 1 − e−2𝑡 .
0
𝑑 −2/𝑟 2
We differentiate to get 𝑓𝑅 (𝑟) = (e ) = 2 e−2/𝑟 .
𝑑𝑟 𝑟
⎧ 0 for 𝑎<0
{
{ 1
5 for 0≤𝑎<2
𝐹 (𝑎) =
⎨ 25 for 2≤𝑎<4
{
{ 1
⎩ for 𝑎 ≥ 4.
(b) Suppose that you have already waiting for 10 minutes. Compute the probability that you
have to wait an additional five minutes or more.
Solution: We want 𝑃 (𝑋 ≥ 15|𝑋 ≥ 10). First observe that 𝑃 (𝑋 ≥ 15, 𝑋 ≥ 10) = 𝑃 (𝑋 ≥
15). From similar computations in (a), we know
Problem 11. Let 𝑋 and 𝑌 be two continuous random variables with joint pdf
(a) (i) 𝑃 (𝑍 ≤ 1.5) (ii) 𝑃 (−1.5 < 𝑍 < 1.5) 𝑃 (𝑍 > −0.75).
(b) Suppose 𝑋 ∼ N(2, (0.5)2 ). Find (i) 𝑃 (𝑋 ≤ 2) (ii) 𝑃 (1 < 𝑋 ≤ 1.75).
Solution: (a) (i) 0.9332 (ii) 0.9332 - 0.0668 = 0.8664
(iii) By symmetry = 𝑃 (𝑍 < 0.75) = 0.7734. (Or we could have used 1 − 𝑃 (𝑍 > −0.75.))
(b) (i) Since 2 is the mean of the normal distribution, 𝑃 (𝑋 ≤ 2) = 0.5.
(ii) Standardizing,
1−2 1.75 − 2
𝑃 (1 < 𝑋 ≤ 1.75) = 𝑃 ( <𝑍≤ ) = 𝑃 (−2 < 𝑍 < −0.5) = 0.3085−0.0228 = 0.2857 .
0.5 0.5
Standardizing we have
𝑇 − 405 369 − 405
𝑃 (𝑇 > 369) = 𝑃 ( > )
18 18
≈ 𝑃 (𝑍 > −2)
≈ 0.975
The value of 0.975 comes from the rule-of-thumb that 𝑃 (|𝑍| < 2) ≈ 0.95. A more exact
value (using R) is 𝑃 (𝑍 > −2) ≈ 0.9772.
More problems
Problem 14. There are 3 arrangements of the word DAD, namely DAD, ADD, and DDA.
How many arrangements are there of the word PROBABILITY?
Solution: Sort the letters: A BB II L O P R T Y. There are 11 letters in all. We build
arrangements by starting with 11 ‘slots’ and placing the letters in these slots, e.g
A B I B I L O P R T Y
Create an arrangement in stages and count the number of possibilities at each stage:
11
Stage 1: Choose one of the 11 slots to put the A: ( )
1
10
Stage 2: Choose two of the remaining 10 slots to put the B’s: ( )
2
8
Stage 3: Choose two of the remaining 8 slots to put the I’s: ( )
2
6
Stage 4: Choose one of the remaining 6 slots to put the L: ( )
1
Exam 1 Practice I, Spring 2022 7
5
Stage 5: Choose one of the remaining 5 slots to put the O: ( )
1
4
Stage 6: Choose one of the remaining 4 slots to put the P: ( )
1
3
Stage 7: Choose one of the remaining 3 slots to put the R: ( )
1
2
Stage 8: Choose one of the remaining 2 slots to put the T: ( )
1
1
Stage 9: Use the last slot for the Y: ( )
1
Number of arrangements:
11 10 8 6 5 4 3 2 1 10 ⋅ 9 8 ⋅ 7
( )( )( )( )( )( )( )( )( ) = 11 ⋅ ⋅ ⋅ 6 ⋅ 5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1 = 9979200
1 2 2 1 1 1 1 1 1 2 2
Problem 15. A multiple choice exam has 4 choices for each question. A student has
studied enough so that the probability they will know the answer to a question is 0.5, the
probability that they will be able to eliminate one choice is 0.25, otherwise all 4 choices seem
equally plausible. If they know the answer they will get the question right. If not they have
to guess from the 3 or 4 choices.
As the teacher you want the test to measure what the student knows. If the student answers
a question correctly what’s the probability they knew the answer?
Solution: We show the probabilities in a tree:
For a given problem let 𝐶 be the event the student gets the problem correct and 𝐾 the
event the student knows the answer.
The question asks for 𝑃 (𝐾|𝐶).
We’ll compute this using Bayes’ rule:
Problem 16. Compute the expectation and variance of a Bernoulli(𝑝) random variable.
Solution: Make a table:
Exam 1 Practice I, Spring 2022 8
𝑋: 0 1
prob: (1-p) p
𝑋2 0 1.
From the table, 𝐸[𝑋] = 0 ⋅ (1 − 𝑝) + 1 ⋅ 𝑝 = 𝑝.
Since 𝑋 and 𝑋 2 have the same table 𝐸[𝑋 2 ] = 𝐸[𝑋] = 𝑝.
Therefore, Var(𝑋) = 𝑝 − 𝑝2 = 𝑝(1 − 𝑝).
𝑑 𝑑 1 1 2
𝑓𝑦 (𝑎) = 𝐹 (𝑎) = Φ(ln(𝑎)) = 𝜙(ln(𝑎)) = √ e−(ln(𝑎)) /2 .
𝑑𝑎 𝑌 𝑑𝑎 𝑎 2𝜋 𝑎
(b) We don’t have a formula for Φ(𝑧) so we don’t have a formula for quantiles. So we have
to write quantiles in terms of Φ−1 .
(i) Write the 0.33 quantile of 𝑍 in terms of Φ−1
(ii) Write the 0.9 quantile of 𝑌 in terms of Φ−1 .
(iii) Find the median of 𝑌 .
Solution: (i) The 0.33 quantile for 𝑍 is the value 𝑞0.33 such that 𝑃 (𝑍 ≤ 𝑞0.33 ) = 0.33.
That is, we want
Φ(𝑞0.33 ) = 0.33 ⇔ 𝑞0.33 = Φ−1 (0.33) .
−1
𝐹𝑌 (𝑞0.9 ) = 0.9 ⇔ Φ(ln(𝑞0.9 )) = 0.9 ⇔ 𝑞0.9 = eΦ (0.9)
.
−1
(iii) As in (ii) 𝑞0.5 = eΦ (0.5)
= e0 = 1 .
Problem 18. Suppose that 𝑋 ∼ Bin(𝑛, 0.5). Find the probability mass function of 𝑌 = 2𝑋.
Solution: For 𝑦 = 0, 2, 4, … , 2𝑛,
𝑦 𝑛 1 𝑛
𝑃 (𝑌 = 𝑦) = 𝑃 (𝑋 = ) = ( )( ) .
2 𝑦/2 2
MIT OpenCourseWare
https://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.