Section 1.5

Conditional Probability and Independence

Question 1.5.1

Your friend is having a raffle where tickets labelled one through 100 are randomly shuffled. One ticket is selected by your friend. If it matches your number, you win.

  1. You are holding the ticket with #99 on it. What is the probability of winning the raffle?

  2. Your friend selects a ticket, and tells you that the number on it is larger than 74. What is the probability of winning the raffle given this information?

Let \(X\) be the number on the selected ticket. Since the ticket is chosen at random from the 100 equally likely tickets numbered 1 through 100, and you hold ticket #99:

\[ \mathbb{P}(X = 99) = \frac{1}{100} \] Therefore, the probability of winning the raffle is \(\boldsymbol{\dfrac{1}{100}}\).

Let \(A\) be the event that you win, i.e., \(X = 99\), and let \(B\) be the event that the selected ticket’s number is larger than 74, i.e., \(X \in \{75, 76, \ldots, 100\}\). There are \(100 - 74 = 26\) tickets in \(B\), each equally likely, so \(\mathbb{P}(B) = \frac{26}{100}\).

Since \(99 > 74\), the event \(A\) is a subset of \(B\), so \(A \cap B = A\) and \(\mathbb{P}(A \cap B) = \mathbb{P}(A) = \frac{1}{100}\).

By the definition of conditional probability: \[ \begin{aligned} \mathbb{P}(A \mid B) &= \frac{\mathbb{P}(A \cap B)}{\mathbb{P}(B)} \\ &= \frac{1/100}{26/100} \\ &= \frac{1}{26} \end{aligned} \] Therefore, the probability of winning the raffle given this information is \(\boldsymbol{\dfrac{1}{26}}\).

Question 1.5.2

A University is developing an AI-driven plagiarism detector. The detector returns positive (says a student plagiarized) 92% of the time for students who did plagiarize.

Assume 97% of the student body did not plagiarize on an assignment. The probability of testing negative for plagiarism across all students is 85.6%.

  1. Let \(C\) be the event that a student plagiarized. Let \(T\) be the event that the detector returns positive (says a student plagiarized). Write the quantities that are given in this question as probabilities, in terms of these events.
  • \(\mathbb{P}(T \ \vert\ C) = 0.92\) [0.5]
  • \(\mathbb{P}(C^c) = 0.97\) [0.5 points]
  • \(\mathbb{P}(T^c) = 0.856\) [0.5 points]
  1. What is the probability of testing negative, given that you did not plagiarize? Show all steps of this calculation.

We want to solve for \(P(T \ \vert\ C)\).

\[ \begin{aligned} \mathbb{P}(T^C) &= [\mathbb{P}(T^c \ \vert\ C)\mathbb{P}(C) + \mathbb{P}(T^c \ \vert\ C^c)\mathbb{P}(C^c)]\\ 0.856 &= [0.08*0.03+\mathbb{P}(T^c \ \vert\ C^c)0.97]\\ \rightarrow & \mathbb{P}(T^c \ \vert\ C^c) = \frac{0.856 - 0.0024}{0.97} = 0.88\\ \end{aligned} \]

  1. A student is flagged by the detector. What is the probability that they actually plagiarized?

Want to solve for \[ \begin{aligned} \mathbb{P}(C \ \vert\ T) &= \frac{\mathbb{P}(T | C)\mathbb{P}(C)}{\mathbb{P}(T)} \\ &= \frac{0.92\times0.03}{0.144}\\ &= \frac{0.0276}{0.144}\\ &\approx 0.192 \end{aligned} \]

  1. The University is considering a two-stage screening process. Students who test positive have their assessments run through the detector again. The results of the second test used to flag whether or not the student plagiarized. What is the probability that, even with this strategy, the detector is incorrect? Assume each the two tests are conditionally independent, given the plagiarism status. Use the notation \(T_1\) and \(T_2\) to denote the respective tests.

There are a three ways the detector can be incorrect. The first is that the student tests negative (only) once, but the student did plagiarize. The next two involve the first test showing up positive. A student can test on the first test, get retested, and test positive again, but the student did not plagiarize. Further, a student can test positive, then negative, but actually did cheat. We will add these probabilities up.

\[ \begin{aligned} \mathbb{P}(\text{incorrect test}) &= \mathbb{P}(\text{(Student did plagiarize and test 1 is negative,}\\ & \text{OR student did plagiarize and test 1 is positive but test 2 is negative, OR,}\\ & \text{student did not plagiarize and test 1 is positive and test 2 is positive. )})\\ &= \mathbb{P}(T_1^c \ \vert\ C)\mathbb{P}(C) + \mathbb{P}(T_1, T_2^c \ \vert\ C)\mathbb{P}(C) + \mathbb{P}(T_1, T_2 \ \vert\ C^c)P(C^c) \\ &= 0.08(0.03) + \mathbb{P}(T_1, T_2^c \ \vert\ C)(0.03) + \mathbb{P}(T_1, T_2 \ \vert\ C^c)(0.97)) \end{aligned} \]

\(\mathbb{P}(T_1, T_2 \ \vert\ C^c) = \mathbb{P}(T_1 \ \vert\ C^c)\times \mathbb{P}(T_2 \ \vert\ C^c) = 0.12^2 = 0.0144\)

\(\mathbb{P}(T_1, T_2^c \ \vert\ C) = \mathbb{P}(T_1\ \vert\ C)\times\mathbb{P}(T_2^c \ \vert\ C)= (0.92)(1-0.92) = 0.074\)

We know \(\mathbb{P}(T^c | C^c) = 0.88\), so \(\mathbb{P}(T | C^c) = 1 - 0.88 = 0.12\) for any test

Therefore,

\[ \begin{aligned} \mathbb{P}(\text{incorrect test}) &= 0.08(0.03) + \mathbb{P}(T_1, T_2^c \ \vert\ C)(0.03) + \mathbb{P}(T_1, T_2 \ \vert\ C^c)(0.97))\\ &= 0.08(0.03) + 0.074(0.03) + 0.0144(0.97)\\ &= 0.0186 \end{aligned} \]

  1. Using the same two-stage screening process as in (d), what is the probability that a student didn’t plagiarize, given they were flagged?

Want to solve for \(\mathbb{P}(C^c \ \vert\ T_1, T_2)\). We can solve this using Bayes’ Rule:

\[ \begin{aligned} \mathbb{P}(C^c \ \vert\ T_1, T_2) &= \frac{\mathbb{P}(T_1, T_2 | C^c)\mathbb{P}(C^c)}{P(T_1, T_2)}\\ &= \frac{\mathbb{P}(T_1, T_2 | C^c)\mathbb{P}(C^c)}{\mathbb{P}(T_1, T_2 | C)\mathbb{P}(C) +\mathbb{P}(T_1, T_2 | C^c)\mathbb{P}(C^c) }\\ &= \frac{0.0144(0.97)}{(0.92)^2(0.03) + (0.0144)(0.97) }\\ &\approx 0.355 \end{aligned} \]

Question 1.5.3

Suppose a baseball pitcher throws fastballs 80% of the time and curveballs 20% of the time. Suppose a batter hits a home run on 8% of all fastball pitches, and on 5% of all curveball pitches. What is the probability that this batter will hit a home run on this pitcher’s next pitch?

Let \(F\) be the event that the pitch is a fastball and \(C\) be the event that the pitch is a curveball. These form a partition of the sample space, with \(\mathbb{P}(F) = 0.8\) and \(\mathbb{P}(C) = 0.2\). Let \(H\) be the event that the batter hits a home run, so \(\mathbb{P}(H \mid F) = 0.08\) and \(\mathbb{P}(H \mid C) = 0.05\).

By the law of total probability (Theorem 1.5.1): \[ \begin{aligned} \mathbb{P}(H) &= \mathbb{P}(F)\,\mathbb{P}(H \mid F) + \mathbb{P}(C)\,\mathbb{P}(H \mid C) \\ &= (0.8)(0.08) + (0.2)(0.05) \\ &= 0.064 + 0.01 \\ &= 0.074 \end{aligned} \] Therefore, the probability that the batter hits a home run on the pitcher’s next pitch is \(\boldsymbol{0.074}\).

Question 1.5.4

Suppose the probability of snow is 20%, and the probability of a traffic accident is 10%. Suppose further that the conditional probability of an accident, given that it snows, is 40%. What is the conditional probability that it snows, given that there is an accident?

Let \(S\) be the event that it snows and \(A\) be the event that there is an accident. We are given \(\mathbb{P}(S) = 0.2\), \(\mathbb{P}(A) = 0.1\), and \(\mathbb{P}(A \mid S) = 0.4\). We want \(\mathbb{P}(S \mid A)\).

By Bayes’ theorem (Theorem 1.5.2): \[ \begin{aligned} \mathbb{P}(S \mid A) &= \frac{\mathbb{P}(S)}{\mathbb{P}(A)} \, \mathbb{P}(A \mid S) \\ &= \frac{0.2}{0.1} (0.4) \\ &= (2)(0.4) \\ &= 0.8 \end{aligned} \] Therefore, the conditional probability that it snows, given that there is an accident, is \(\boldsymbol{0.8}\).

Question 1.5.5

Suppose we roll two fair six-sided dice, one red and one blue. Let \(A\) be the event that the two dice show the same value. Let \(B\) be the event that the sum of the two dice is equal to 12. Let \(C\) be the event that the red die shows 4. Let \(D\) be the event that the blue die shows 4.

  1. Are \(A\) and \(B\) independent?

  2. Are \(A\) and \(C\) independent?

  3. Are \(A\) and \(D\) independent?

  4. Are \(C\) and \(D\) independent?

  5. Are \(A\), \(C\), and \(D\) all independent?

There are 36 equally likely outcomes for the pair of dice. \(A\) occurs for the 6 outcomes where both dice match, so \(\mathbb{P}(A) = \frac{6}{36} = \frac{1}{6}\). \(B\) occurs only for the outcome \((6,6)\), so \(\mathbb{P}(B) = \frac{1}{36}\).

The only outcome in both \(A\) and \(B\) is \((6,6)\) itself, so \(\mathbb{P}(A \cap B) = \frac{1}{36}\).

Checking independence: \[ \mathbb{P}(A)\mathbb{P}(B) = \frac{1}{6} \cdot \frac{1}{36} = \frac{1}{216} \neq \frac{1}{36} = \mathbb{P}(A \cap B) \] Since \(\mathbb{P}(A \cap B) \neq \mathbb{P}(A)\mathbb{P}(B)\), \(A\) and \(B\) are not independent.

\(C\) occurs for the 6 outcomes where the red die shows 4, so \(\mathbb{P}(C) = \frac{6}{36} = \frac{1}{6}\).

\(A \cap C\) occurs only when the red die is 4 and both dice match, i.e., only the outcome \((4,4)\), so \(\mathbb{P}(A \cap C) = \frac{1}{36}\).

Checking independence: \[ \mathbb{P}(A)\mathbb{P}(C) = \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36} = \mathbb{P}(A \cap C) \] Since \(\mathbb{P}(A \cap C) = \mathbb{P}(A)\mathbb{P}(C)\), \(A\) and \(C\) are independent.

By the same reasoning as part (b), with the roles of the red and blue dice swapped, \(\mathbb{P}(D) = \frac{1}{6}\) and \(\mathbb{P}(A \cap D) = \frac{1}{36}\) (the only outcome in both events is \((4,4)\)).

Checking independence: \[ \mathbb{P}(A)\mathbb{P}(D) = \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36} = \mathbb{P}(A \cap D) \] Since \(\mathbb{P}(A \cap D) = \mathbb{P}(A)\mathbb{P}(D)\), \(A\) and \(D\) are independent.

\(C \cap D\) occurs only when the red die is 4 and the blue die is 4, i.e., only the outcome \((4,4)\), so \(\mathbb{P}(C \cap D) = \frac{1}{36}\).

Checking independence: \[ \mathbb{P}(C)\mathbb{P}(D) = \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{36} = \mathbb{P}(C \cap D) \] Since \(\mathbb{P}(C \cap D) = \mathbb{P}(C)\mathbb{P}(D)\), \(C\) and \(D\) are independent.

For \(A\), \(C\), and \(D\) to be independent, we need (among other things) \(\mathbb{P}(A \cap C \cap D) = \mathbb{P}(A)\mathbb{P}(C)\mathbb{P}(D)\).

The event \(A \cap C \cap D\) requires the red die to be 4, the blue die to be 4, and the two dice to match — but if both dice already show 4, they automatically match. So \(A \cap C \cap D\) is just the single outcome \((4,4)\), giving \(\mathbb{P}(A \cap C \cap D) = \frac{1}{36}\).

On the other hand, \[ \mathbb{P}(A)\mathbb{P}(C)\mathbb{P}(D) = \frac{1}{6} \cdot \frac{1}{6} \cdot \frac{1}{6} = \frac{1}{216} \] Since \(\frac{1}{36} \neq \frac{1}{216}\), the three events are not all independent — even though, as shown in parts (b)–(d), they are pairwise independent.