University of Washington
Department of Mathematics
Homework 4 Solutions
MATH 394: Probability I
Instructor: Arman Jahangiri
Submission: Single PDF on Gradescope
Deadline: 10:00 PM Pacific Time on the listed due date
This homework is worth 50 points.
Across the quarter, there are eight homework assignments, worth 400 points total. Homework assignments together account for 40% of the final course grade. Further course policies can be seen in the MATH 394 syllabus.
Please:
Each student is allotted six late days for the quarter. A late day extends a homework deadline by up to 24 hours without penalty. For example, submitting an assignment anytime between 10:01 PM on the due date and 10:00 PM the following day counts as one late day.
The following rules apply:
Once all late days have been exhausted, additional late submissions will incur a penalty of 10% per day, up to a maximum deduction of 50%. Assignments submitted more than five days late, or after solutions have been released, will not be accepted.
If a serious technical issue prevents a timely Gradescope submission, students may temporarily submit their assignment by email to the instructor at armanjg@uw.edu. In such cases:
Email submissions are intended only for genuine technical emergencies and should not be used as a substitute for timely Gradescope submission.
Problem 1.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 1.
People are arriving at a party one at a time. While waiting for more people to arrive, they entertain themselves by comparing their birthdays.
Let \(X\) be the number of people needed to obtain a birthday match; that is, before person \(X\) arrives, no two people have the same birthday, but when person \(X\) arrives there is a match.
Find the PMF of \(X\).
Solution
Assume the usual birthday model with 365 equally likely birthdays and no leap day. The smallest possible value of \(X\) is 2, since one person alone cannot create a match. The largest possible value is 366, since after 365 people with distinct birthdays, the next person must match one of them.
For \(X=k\), the first \(k-1\) people must all have distinct birthdays, and the \(k\)th person must match one of those \(k-1\) birthdays. The probability that the first \(k-1\) birthdays are distinct is \[ \frac {365\cdot 364\cdots (365-k+2)}{365^{k-1}}. \] Once this has happened, the \(k\)th person has exactly \(k-1\) favorable birthdays out of 365. Therefore, for \(k=2,3,\ldots ,366\), \[ P(X=k) = \frac {365\cdot 364\cdots (365-k+2)}{365^{k-1}}\cdot \frac {k-1}{365}. \]
Final Answer
\[ P(X=k)=\frac {365\cdot 364\cdots (365-k+2)}{365^{k-1}}\cdot \frac {k-1}{365}, \qquad k=2,3,\ldots ,366. \] \[ P(X=k)=0 \qquad \text {otherwise.} \]
Problem 2.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 3.
Let \(X\) be a random variable with CDF \(F\), and let \[ Y=\mu +\sigma X, \] where \(\mu \) and \(\sigma \) are real numbers with \(\sigma >0\).
The random variable \(Y\) is called a location–scale transformation of \(X\).
Find the CDF of \(Y\) in terms of \(F\).
Solution
Let \(F_Y\) denote the CDF of \(Y\). For any real number \(y\), \[ F_Y(y)=P(Y\le y). \] Since \(Y=\mu +\sigma X\) and \(\sigma >0\), the inequality may be rearranged without reversing its direction: \[ \mu +\sigma X\le y \qquad \Longleftrightarrow \qquad X\le \frac {y-\mu }{\sigma }. \] Thus \[ F_Y(y) = P\left (X\le \frac {y-\mu }{\sigma }\right ) = F\left (\frac {y-\mu }{\sigma }\right ). \]
Problem 3.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 4.
Let \(n\) be a positive integer and define \[ F(x)=\frac {\lfloor x\rfloor }{n} \] for \(0\le x\le n\), where \(\lfloor x\rfloor \) is the greatest integer less than or equal to \(x\).
Also define \[ F(x)=0 \quad \text {for } x<0, \] and \[ F(x)=1 \quad \text {for } x>n. \]
Solution
(a) The function \(F\) is nondecreasing because \(\lfloor x\rfloor \) is nondecreasing. It also has the correct limiting behavior. For \(x<0\), \(F(x)=0\), so \[ \lim _{x\to -\infty }F(x)=0. \] For \(x>n\), \(F(x)=1\), so \[ \lim _{x\to \infty }F(x)=1. \] The only possible jumps occur at the integers. At an integer \(j\) with \(1\le j\le n\), the left-hand limit is \[ F(j^-)=\frac {j-1}{n}, \] while \[ F(j)=\frac {j}{n}. \] Thus the function is right-continuous at each jump. Away from the integers, it is constant on intervals and therefore right-continuous there as well. Hence \(F\) has the required properties of a CDF.
(b) The PMF is obtained from the jumps of the CDF. At each integer \(j=1,2,\ldots ,n\), \[ P(X=j)=F(j)-F(j^-)=\frac {j}{n}-\frac {j-1}{n}=\frac {1}{n}. \] There are no jumps elsewhere, so the probability is zero outside \(\{1,2,\ldots ,n\}\).
Problem 4.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 5.
Solution
(a) Each value \(p(n)\) is nonnegative. It remains to check that the probabilities add to 1. Using the geometric series, \[ \sum _{n=0}^{\infty }\left (\frac 12\right )^{n+1} = \frac 12+\frac 14+\frac 18+\cdots = 1. \] Therefore \(p(n)\) is a valid PMF on the nonnegative integers.
(b) Let \(X\) have this PMF. If \(x<0\), then no possible value of \(X\) is at most \(x\), so \(F(x)=0\). If \(x\ge 0\), then \[ F(x)=P(X\le x) = \sum _{n=0}^{\lfloor x\rfloor }\left (\frac 12\right )^{n+1}. \] The finite geometric sum gives \[ F(x)=1-\left (\frac 12\right )^{\lfloor x\rfloor +1}, \qquad x\ge 0. \]
Final Answer for Part (b)
\[ F(x)= \begin {cases} 0, & x<0,\\[1mm] 1-\left (\dfrac 12\right )^{\lfloor x\rfloor +1}, & x\ge 0. \end {cases} \]
Problem 5.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 8.
There are 100 prizes, with one worth $1, one worth $2, …, and one worth $100. There are 100 boxes, each containing one of the prizes.
You get 5 prizes by picking random boxes one at a time, without replacement.
Find the PMF of how much your most valuable prize is worth, as a simple expression in terms of binomial coefficients.
Solution
Let \(M\) be the value of the most valuable prize among the 5 prizes selected. The sample space consists of all 5-element subsets of the 100 prizes, so there are \[ \binom {100}{5} \] equally likely selections.
For the maximum value to be \(m\), the prize worth \(m\) dollars must be selected, and the other 4 selected prizes must all come from the prizes worth \(1,2,\ldots ,m-1\). This can be done in \[ \binom {m-1}{4} \] ways. This is possible only when \(m\ge 5\).
Therefore \[ P(M=m)=\frac {\binom {m-1}{4}}{\binom {100}{5}}, \qquad m=5,6,\ldots ,100. \] \[ P(M=m)=0 \qquad \text {otherwise.} \]
Problem 6.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 9.
Let \(F_1\) and \(F_2\) be CDFs, let \(0<p<1\), and define \[ F(x)=pF_1(x)+(1-p)F_2(x) \] for all \(x\).
Solution
(a) Since \(F_1\) and \(F_2\) are nondecreasing and \(p\) and \(1-p\) are positive weights, their weighted average is also nondecreasing. Also, \[ \lim _{x\to -\infty }F(x) = p\lim _{x\to -\infty }F_1(x)+(1-p)\lim _{x\to -\infty }F_2(x) = 0, \] and \[ \lim _{x\to \infty }F(x) = p\lim _{x\to \infty }F_1(x)+(1-p)\lim _{x\to \infty }F_2(x) = p+(1-p)=1. \] Finally, because \(F_1\) and \(F_2\) are right-continuous, for every \(x\), \[ \lim _{t\downarrow x}F(t) = p\lim _{t\downarrow x}F_1(t)+(1-p)\lim _{t\downarrow x}F_2(t) = pF_1(x)+(1-p)F_2(x) = F(x). \] Thus \(F\) is a valid CDF.
Final Answer for Part (a)
\(F=pF_1+(1-p)F_2\) is nondecreasing, right-continuous, tends to \(0\) at \(-\infty \), and tends to \(1\) at \(\infty \). Hence it is a valid CDF.
(b) Let \(C\) be the event that the coin lands Heads. The random variable is generated from \(F_1\) on \(C\) and from \(F_2\) on \(C^c\). Therefore, by the law of total probability, \[ P(X\le x) = P(X\le x\mid C)P(C)+P(X\le x\mid C^c)P(C^c). \] Since \(P(C)=p\), \(P(C^c)=1-p\), \(P(X\le x\mid C)=F_1(x)\), and \(P(X\le x\mid C^c)=F_2(x)\), we get \[ P(X\le x)=pF_1(x)+(1-p)F_2(x)=F(x). \] So the random variable constructed by this procedure has CDF \(F\).
Final Answer for Part (b)
\[ P(X\le x)=pF_1(x)+(1-p)F_2(x)=F(x). \]
Problem 7.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 22.
There are two coins, one with probability \(p_1\) of Heads and the other with probability \(p_2\) of Heads. One of the coins is randomly chosen, with equal probabilities for the two coins. It is then flipped \(n\ge 2\) times.
Let \(X\) be the number of times it lands Heads.
Solution
(a) Conditional on choosing coin 1, the number of Heads has distribution \(\operatorname {Bin}(n,p_1)\). Conditional on choosing coin 2, the number of Heads has distribution \(\operatorname {Bin}(n,p_2)\). Since the two coins are chosen with equal probabilities, \[ P(X=k) = \frac 12\binom {n}{k}p_1^k(1-p_1)^{n-k} + \frac 12\binom {n}{k}p_2^k(1-p_2)^{n-k}, \] for \(k=0,1,\ldots ,n\).
(b) If \(p_1=p_2=p\), then the two possible coins have the same Heads probability. The mixture collapses to the ordinary Binomial distribution, \[ P(X=k)=\binom {n}{k}p^k(1-p)^{n-k}. \] Thus \[ X\sim \operatorname {Bin}(n,p). \]
(c) When \(p_1\ne p_2\), the flips are not independent in the unconditional sense. Seeing many Heads early makes it more likely that the chosen coin is the one with the larger Heads probability, and that changes our prediction for later flips. For large \(n\), the number of Heads tends to cluster around \(np_1\) if coin 1 was chosen and around \(np_2\) if coin 2 was chosen. This is a mixture of two Binomial patterns rather than one Binomial pattern with a single fixed success probability.
Problem 8.
Source: Blitzstein and Hwang, Introduction to Probability, Chapter 3, Problem 30.
A certain company has \(n+m\) employees, consisting of \(n\) women and \(m\) men. The company is deciding which employees to promote.
What is the distribution of the number of women who get promoted?
Find the distributions of:
Solution
(a) Let \(W\) be the number of women promoted. Since the company chooses \(t\) employees from \(n+m\) employees without replacement, \(W\) has a Hypergeometric distribution. To have \(W=k\), the company must choose \(k\) of the \(n\) women and \(t-k\) of the \(m\) men. Thus \[ P(W=k)=\frac {\binom {n}{k}\binom {m}{t-k}}{\binom {n+m}{t}}, \] where \(k\) must satisfy \[ \max (0,t-m)\le k\le \min (n,t). \]
(b) Now each employee is promoted independently with probability \(p\).
The number of women promoted is the number of successes among \(n\) independent promotion decisions for women, so \[ W_p\sim \operatorname {Bin}(n,p). \] The number of women not promoted is the number of failures among those same \(n\) women, so \[ W_{np}\sim \operatorname {Bin}(n,1-p). \] The total number of employees promoted is the number of successes among all \(n+m\) employees, so \[ T\sim \operatorname {Bin}(n+m,p). \]
Final Answer for Part (b)
\[ W_p\sim \operatorname {Bin}(n,p), \qquad W_{np}\sim \operatorname {Bin}(n,1-p), \qquad T\sim \operatorname {Bin}(n+m,p). \]
(c) Given that exactly \(t\) employees are promoted, all sets of \(t\) promoted employees are equally likely. This brings us back to the same sampling-without-replacement structure as part (a). Therefore the conditional distribution of the number of women promoted is Hypergeometric: \[ P(W=k\mid T=t)=\frac {\binom {n}{k}\binom {m}{t-k}}{\binom {n+m}{t}}, \] for the same possible values of \(k\), i.e., \(\ \max (0,t-m)\le k\le \min (n,t).\)