Midterm 1 Info + Prep

Midterm Information

  • The first Midterm is scheduled for in class on Friday Oct 16
  • It is 1 hour and 20 minutes
  • Your midterm will cover materials from Lectures 1 - 9
  • You may bring in one (1) “cheat sheet”:
    • Must be HAND WRITTEN with pen/pencil on said sheet of paper (not typed, not photo copied, not printed, not written on an iPad)
    • Must be on 8.5 by 11 inch sheet of paper or smaller d
    • You may write on both sides
    • No magnifying glasses or anything else silly
    • I will confiscate cheatsheets that do not follow these rules 🥀
    • I do not care what is written on it
  • Exam is hand written on paper, bring something to write with
  • You may bring a non-programmable, non-graphing calculator.

The final page of your midterm will also contain common distributions (download the sheet here)

Midterm Preparation

Here are some selected problems that would serve as good practice for the midterm. All questions were taken from past midterms, including Summer 2026.

Question 1

Suppose \(\Omega = \{A,B,C\}\) where \(\mathbb{P}(\{C\}) = 3\mathbb{P}(\{B\}) = 15\mathbb{P}(\{A\})\).

  1. Compute \(\mathbb{P}(\{A\})\), \(\mathbb{P}(\{B\})\), and \(\mathbb{P}(\{C\})\).

We have \(\mathbb{P}(\{A\}) = 1/15\mathbb{P}(\{C\})\) and \(\mathbb{P}(\{B\}) = 1/3\mathbb{P}(\{C\})\). By the law of total probability, we have:

\[ \begin{aligned} &\mathbb{P}(\{A,B,C\}) = 1 \\ &\mathbb{P}(\{A\}) + \mathbb{P}(\{B\}) + \mathbb{P}(\{C\}) = 1\\ &1/15\mathbb{P}(\{C\}) + 1/3\mathbb{P}(\{C\}) + \mathbb{P}(\{C\}) = 1\\ &21/15\mathbb{P}(\{C\}) = 1\\ &\mathbb{P}(\{C\}) = 15/21 = 5/7. \end{aligned} \]

Thus,

\(\mathbb{P}(\{A\}) = 1/15\mathbb{P}(\{C\}) = 5/105 = 1/21\)

\(\mathbb{P}(\{B\}) = 1/3\mathbb{P}(\{C\}) = 5/21\)

\(\mathbb{P}(\{C\}) = 15/21 = 5/7\)

  1. Let \(X = I_A\) and \(Y = I_B\). Is \(Z = X + Y\) an indicator function? If so, what is it an indicator of?

The most general answer is no, as if \(\omega \in A\) and \(\omega \in B\), then \(Z(\omega) = I_A(\omega) + I_B(\omega) = 1 + 1 = 2\).

However if they were disjoint, then \(\omega\) could only be in \(A\) OR \(B\), and not both, making \(Z(\omega) = I_A(\omega) + I_B(\omega)\) either 0 or 1. \(Z = I_{A\cup B}\) in this setting.

  1. Suppose students are randomly assigned to residences (\(A\) or \(B\)) with equal probability. Choosing \(A\) results in happiness score of 100 and choosing \(B\) results in a score of 60. Define \(V\) as the total combined happiness score for two random students. Write out the distribution of \(V\).

The possible outcomes are \(AA\), \(AB\), \(BA\), \(BB\) which correspond to happiness scores of 200, 160, 160, and 120 respectively.

The elements of interest in \(V\) are 200, 160, and 120.

\(P(V = 200)\) = \(P(\{AA\}) = 1/2*1/2 = 1/4\)

\(P(V = 160)\) = \(P(\{AB, BA\}) = 1/2*1/2 + 1/2*1/2 = 1/2\)

\(P(V = 120)\) = \(P(\{BB\}) = 1/2*1/2 = 1/4\)

The distribution is:

\[ \mathbb{P}(V = v) = \begin{cases} 1/4 & \text{ if }v = 200 \\ 1/2 & \text{ if } v = 160 \\ 1/4 & \text{ if } v = 120 \\ 0 & \text{ otherwise} \\ \end{cases} \]

Question 2

  1. Let \(A\) and \(B\) be events where \(\mathbb{P}(A), \mathbb{P}(B) > 0\).

Prove that \(\mathbb{P}(A \ \vert\ B) > \mathbb{P}(A) \text{ if } \mathbb{P}(B \ \vert\ A) > \mathbb{P}(B)\).

\[ \begin{aligned} \mathbb{P}(A \ \vert\ B) &= \frac{\mathbb{P}(B \ \vert\ A)\mathbb{P}(A)}{\mathbb{P}(B)}\\ &> \mathbb{P}(A) \text{ if } \mathbb{P}(B \ \vert\ A) > \mathbb{P}(B) \text{ since this implies } \frac{\mathbb{P}(B \ \vert\ A)}{\mathbb{P}(B)} > 1 \end{aligned} \]

  1. Show that if \(A\) and \(B^c\) are independent events, then so are \(A\) and \(B\).

Recall that if \(A\) and \(B^c\) are independent, then \(\mathbb{P}(A\cap B^c) = \mathbb{P}(A)\mathbb{P}(B^c)\).

\[ \begin{aligned} \mathbb{P}(A \cap B) &= \mathbb{P}(A) - \mathbb{P}(A \cap B^c)\\ &= \mathbb{P}(A) - \mathbb{P}(A)\mathbb{P}(B^c) \text{ since } A \text{ is independent of } B^c\\ &= \mathbb{P}(A)(1 - \mathbb{P}(B^c))\\ &= \mathbb{P}(A)(\mathbb{P}(B)) \end{aligned} \]

Question 3

Suppose you are a technician at a manufacturing plant that produces specialized sensors. On average, 10% of the sensors fail the calibration test. Your supervisor asks you to collect exactly 3 functional (passing) sensors for a new client shipment. You test the sensors one by one in the order they come off the assembly line.

  1. What is the probability that you will need to test exactly 5 sensors in total to find your 3rd functional sensor? Round your final answer to the nearest thousandth (i.e., 0.123).

Let \(X\) be the number of failures before the 3rd success.

To find the probability that exactly 5 sensors in total need to be tested before you find the 3rd success, this means we need to have \(X = 2\) failures.

\(X \sim {\mathrm{NegBinom}}(\theta = 0.90, 3)\)

\[ \begin{aligned} \mathbb{P}(X = 2; \theta = 0.90, r = 3) &= {{3 - 1 + 2}\choose {2}}(0.90)^{3}(1 - 0.90)^2\\ &= {{4}\choose {2}}(0.90)^{3}(0.10)^2\\ &=\frac{4\times 3\times 2}{2\times 2}(0.90)^{3}(0.10)^2\\ &= 0.044 \end{aligned} \]

  1. What is the probability that you will need to test 4 or more sensors in total to find your 3rd functional sensor? Round your final answer to the nearest thousandth (i.e., 0.123).

Needing to test 4 or more sensors is the equivalent of having 1 or more failures.

The probability we are looking for is \(\mathbb{P}(X \ge 1)\).

\[ \begin{aligned} \mathbb{P}(X \ge 1) &= 1 - \mathbb{P}(X < 1) \\ &= 1 - \mathbb{P}(X = 0) \\ &= 1 - {3+0-1 \choose 0}(0.9)^3(1-0.9)^0 \\ &= 1 - 0.729\\ &= 0.271 \end{aligned} \]

Question 4

There are two boxes. The first box has 4 blue balls and 5 green balls, and the second box has 3 blue balls and 2 green balls. One ball is randomly drawn from the first box and put into the second box. Then a ball is randomly drawn from the second box. What is the conditional probability that the transferred ball from the first box to the second box is blue given that a blue ball is drawn from the second box?

Let \(B_2\) be the event “a blue ball is drawn from the second box”, and \(B_1\) the event “a blue ball is drawn from the first box and put in the second”. We want \(\mathbb{P}(B_1 \ \vert\ B_2)\).

We have \(\mathbb{P}(B_1 \ \vert\ B_2) = \frac{\mathbb{P}(B_2\ \vert\ B_1)\mathbb{P}(B_1)}{\mathbb{P}(B_2)}\)

Also, \(\mathbb{P}(B_1) = 4/9\) and \(\mathbb{P}(B_2 \ \vert\ B_1) = 4/6\). Finally, if \(G_1\) is the event “a green ball is drawn from the first box and put in the second” (by the way, note that \(G_1 = B_1^c\)), we have:

\[ \begin{aligned} \mathbb{P}(B_2) &= \mathbb{P}(B_2 \ \vert\ B_1) \mathbb{P}(B_1) + \mathbb{P}(B_2 \ \vert\ B_1^c)\mathbb{P}(B_1^c)\\ &=\mathbb{P}(B_2 \ \vert\ B_1) \mathbb{P}(B_1) + \mathbb{P}(B_2 \ \vert\ G_1)\mathbb{P}(G_1)\\ &= (4/6) (4/9) + (3/6) (5/9)\\ &= 31/54 \end{aligned} \]

Putting it all together, we get: \[ \begin{aligned} \mathbb{P}(B_1 \ \vert\ B_2) &= \frac{(4/6)(4/9)}{31/54} = 16/31. \end{aligned} \]

Question 5

Let \(A\), \(B\) and \(C\) be events (sets) in a sample space \(\Omega\).

  1. Prove that if \(A\), \(B\) and \(C\) are independent then \(A \cup B\) and \(C\) are also independent.

We will prove it using the definition. We need to verify that \(P((A \cup B) \cap C) = P(A \cup B)P(C)\).

Note that \((A \cup B) \cap C = (A \cap C) \cup (B \cap C)\), hence:

\[ \begin{aligned} P((A \cup B) \cap C) &= P((A \cap C) \cup (B \cap C)) \\ &= P(A \cap C) + P(B \cap C) - P((A \cap C) \cap (B \cap C)) \\ &= P(A \cap C) + P(B \cap C) - P(A \cap B \cap C) \\ &= P(A)P(C) + P(B)P(C) - P(A)P(B)P(C) \\ &= P(C) \big( P(A) + P(B) - P(A)P(B) \big) \\ &= P(C) \big( P(A) + P(B) - P(A \cap B) \big) \\ &= P(C)P(A \cup B) \end{aligned} \]

  1. Prove that if \(\mathbb{P}(A) > 0\) and \(\mathbb{P}(A \cap B) > 0\) then \(\mathbb{P}(A \cap B \cap C) = P (C \ \vert\ A \cap B) \mathbb{P}(B\ \vert\ A) \mathbb{P}(A)\).

The right hand side is:

\[ \begin{aligned} P(C \mid A \cap B) P(B \mid A) P(A) &= \frac{P(C \cap (A \cap B))}{P(A \cap B)} \cdot \frac{P(B \cap A)}{P(A)} \cdot P(A) \\ &= P(C \cap A \cap B) \\ &= P(A \cap B \cap C) \end{aligned} \]

Question 6

An urn contains 4 red balls and 2 blue balls. A student randomly selects balls one at a time, without replacement, until they select a blue ball. Let the random variable \(X\) denote the total number of balls selected. Calculate the probability mass function (PMF), \(P(X = x)\), for all possible values of \(x\). Express your final answer as a single equation using indicators.

Support: \(x \in \{1, 2, 3, 4, 5\}\)

For \(X = 1\): The first ball is blue. \[P(X = 1) = \frac{2}{6} = \frac{1}{3}\]

For \(X = 2\): The first ball is red, and the second is blue. \[ P(X = 2) = \frac{4}{6} \times \frac{2}{5} = \frac{8}{30} = \frac{4}{15} \]

For \(X = 3\): The first two balls are red, and the third is blue.

\[P(X = 3) = \frac{4}{6} \times \frac{3}{5} \times \frac{2}{4} = \frac{24}{120} = \frac{1}{5}\]

For \(X = 4\): The first three balls are red, and the fourth is blue. \[P(X = 4) = \frac{4}{6} \times \frac{3}{5} \times \frac{2}{4} \times \frac{2}{3} = \frac{48}{360} = \frac{2}{15}\]

For \(X = 5\): The first four balls are red, and the fifth is blue. \[P(X = 5) = \frac{4}{6} \times \frac{3}{5} \times \frac{2}{4} \times \frac{1}{3} \times \frac{2}{2} = \frac{48}{720} = \frac{1}{15}\] Therefore:

\[P(X = x) = \frac{5}{15}I_{\{1\}}(x) + \frac{4}{15}I_{\{2\}}(x) + \frac{3}{15}I_{\{3\}}(x) + \frac{2}{15}I_{\{4\}}(x) + \frac{1}{15}I_{\{5\}}(x)\]

Question 7

A researcher is studying the nesting habits of a specific population of waterfowl. Based on historical data, the probability that a randomly selected nest contains at least one unhatched egg at the end of the breeding season is \(0.20\). The researcher randomly samples \(15\) distinct nests from this population. Assume each sample is independent.

  1. What is probability that exactly \(3\) of the sampled nests contain at least one unhatched egg?

  2. What is the probability that less than \(2\) of the sampled nests contain at least one unhatched egg.

\(Y \sim \text{Binomial}(n = 15, p = 0.20)\). Therefore the PMF is: \[P(Y = y) = \binom{15}{y} (0.20)^y (0.80)^{15-y} \quad \text{for } y \in \{0, 1, 2, \dots, 15\}\]

\[P(Y = 3) = \binom{15}{3} (0.20)^3 (0.80)^{12} = 0.2501\]

\[P(Y < 2) = P(Y = 0) + P(Y = 1)\] Then \[P(Y = 0) = \binom{15}{0} (0.20)^0 (0.80)^{15} = 1 \times 1 \times 0.03518 \approx 0.0352\] and \[P(Y = 1) = \binom{15}{1} (0.20)^1 (0.80)^{14} = 15 \times 0.20 \times 0.04398 \approx 0.1319\]

Therefore: \[P(Y < 2) = 0.0352 + 0.1319 = 0.1671\]

Question 8

A biology department receives a shipment of \(20\) field-grade digital thermometers. Unbeknownst to the lab manager, \(5\) of these thermometers are improperly calibrated. A teaching assistant randomly selects \(6\) thermometers from the shipment (without replacement) to distribute to an upcoming ecology lab section.

  1. Let \(X\) be the number of improperly calibrated thermometers from the sample of 6. What distribution does \(X\) follow? Name it, and identify the relevant parameters.

\(X\) follows a hypergeometric distribution with:

  • Population Size: \(N = 20\)
  • Number of Successes (total improperly calibrated thermometers): \(K = 5\)
  • Sample Size \(n = 6\)

The probability mass function (PMF) is given by:\[P(X = x) = \frac{\binom{K}{x} \binom{N - K}{n - x}}{\binom{N}{n}} = \frac{\binom{5}{x} \binom{15}{6 - x}}{\binom{20}{6}}\]

  1. Calculate the probability that at most \(1\) of the selected thermometers is improperly calibrated.

\[P(X \le 1) = P(X = 0) + P(X = 1)\].

\[P(X = 0) = \frac{\binom{5}{0} \binom{15}{6}}{\binom{20}{6}} = \frac{1 \times 5005}{38760} \approx 0.1291\].

\[P(X = 1) = \frac{\binom{5}{1} \binom{15}{5}}{\binom{20}{6}} = \frac{5 \times 3003}{38760} = \frac{15015}{38760} \approx 0.3874\]

Therefore, \[P(X \le 1) = 0.1291 + 0.3874 = 0.5165\]

Question 9

A knitter produces small keychains across three different periods of the day: morning, afternoon, and evening. 50% of all keychains are made in the morning, 30% are made in the afternoon, and 20% are made in the evening. If a stitch is dropped, the keychain is considered unsellable. The knitter has noticed:

  • A keychain produced during the morning is unsellable with probability 0.02.
  • A keychain produced during the afternoon is unsellable probability 0.05.
  • A keychain produced during the evening is unsellable with probability 0.09.

At the end of the day, all keychains get put into the same container, are mixed together, and then are randomly examined.

  1. A randomly chosen keychain was found to unsellable. At which time (morning, afternoon, or evning) was this keychain most likely produced?

We first need to solve for \(\mathbb{P}(\text{defective})\), which we can find by using the law of total probability.

\(\mathbb{P}(\text{defective}) = \mathbb{P}(\text{defective} | \text{day})\mathbb{P}(\text{day}) + P(\text{defective} | \text{evening})\mathbb{P}(\text{evening})+ P(\text{defective} | \text{night})\mathbb{P}(\text{night})\)

Filling in the values, we get \(\mathbb{P}(\text{defective}) = 0.02(0.5)+0.05(0.3)+0.09(0.2) = 0.043\)

Then, we can use Baye’s to solve for the desired probabilities:

\(\mathbb{P}(\text{morning} | \text{defective}) = \frac{\mathbb{P}(\text{defective} | \text{morning})\mathbb{P}(\text{morning})}{\mathbb{P}(\text{defective})} = \frac{0.02\times 0.50}{0.043} = 0.233\)

\(\mathbb{P}(\text{afternoon} | \text{defective}) = \frac{\mathbb{P}(\text{defective} | \text{afternoon})\mathbb{P}(\text{afternoon})}{\mathbb{P}(\text{defective})} = \frac{0.05\times 0.30}{0.043} = 0.349\)

\(\mathbb{P}(\text{evning} | \text{defective}) = \frac{\mathbb{P}(\text{defective} | \text{evening})\mathbb{P}(\text{evening})}{\mathbb{P}(\text{defective})} = \frac{0.09\times 0.20}{0.043} = 0.419\)

Thus, if we find a defective bulb, the most likely source of the bulb was the evening shift.

  1. The knitter wants to reduce the overall rate of unsellable keychains produced to below 4%. If proportions of unsellable keychains produced in the afternoon and evening remain unchanged, what is the maximum proportion of unsellable keychains that the knitter can produce in the morning? You can assume that the proportion of keychains produced at each time (morning, afternoon, evening) also remains unchanged. Round your final answer to the nearest thousandth (i.e., 0.123).

\[ \begin{aligned} &\mathbb{P}(\text{defective}) = \mathbb{P}(\text{defective} | \text{morning})\mathbb{P}(\text{morning}) + P(\text{defective} | \text{afternoon})\mathbb{P}(\text{afternoon})+ P(\text{defective} | \text{evening})\mathbb{P}(\text{evening})\\ &0.04 = \mathbb{P}(\text{defective} | \text{morning})0.50 + 0.05(0.3) + 0.09(0.2)\\ &0.04 = 0.5\mathbb{P}(\text{defective} | \text{morning}) + 0.033 \\ &0.007 = 0.5\mathbb{P}(\text{defective} | \text{morning})\\ &\implies \mathbb{P}(\text{defective} | \text{morning}) = 0.007/0.5 = 0.014 \end{aligned} \]

To reduce the rate to 4%, the defective rate in the morning shift cannot go above 1.4%.