3 Conditional Probability
Example 3.1 The probability1 that a randomly selected American adult (18+) uses Snapchat is 0.24.
- Suppose the randomly selected adult is under age 30. Do you think the probability that a randomly selected adult who is under age 30 uses Snapchat is 0.24? What if the adult is over age 30?
- The probability2 that a randomly selected American adult is under age 30 is 0.20. Start to create a two-way table representing 10000 hypothetical U.S. adults. Is the probability that a randomly selected American adult both (1) is under age 30, and (2) uses Snapchat equal to \(0.20\times 0.24\)? Explain.
- Suppose that the probability that a randomly selected American adult both is use age 30 and uses Snapchat is 0.13. Construct an appropriate two-way table.
- Find the probability that a randomly selected American adult who is under age 30 uses Snapchat.
- How can the probability in the previous part be written in terms of the probabilities provided earlier?
- Find the probability that a randomly selected American adult who is over age 30 uses Snapchat.
- Find the probability that a randomly selected American adult who uses Snapchat is under age 30.
The conditional probability of event \(A\) given event \(B\), denoted \(\text{P}(A|B)\), is defined as
\[ \text{P}(A|B) = \frac{\text{P}(A\cap B)}{\text{P}(B)} \]
The conditional probability \(\text{P}(A|B)\) represents how the likelihood or degree of uncertainty of event \(A\) should be updated to reflect information that event \(B\) has occurred.
Conditional probabilities are probabilities. There are analagous conditional versions of the properties of probability, e.g. \(\text{P}(A^c|B) = 1 - \text{P}(A|B)\).
In general, knowing whether or not event \(B\) occurs influences the probability of event \(A\). That is,
\[ \text{In general, } \text{P}(A|B) \neq \text{P}(A) \]
Be careful: order is essential in conditioning. That is,
\[ \text{In general, } \text{P}(A|B) \neq \text{P}(B|A) \]
Within the context of two events, we have joint, conditional, and marginal probabilities.
- Joint: unconditional probability involving both events, \(\text{P}(A \cap B)\).
- Conditional: conditional probability of one event given the other, \(\text{P}(A | B)\), \(\text{P}(B | A)\).
- Marginal: unconditional probability of a single event \(\text{P}(A)\), \(\text{P}(B)\).
The relationship \(\text{P}(A|B) = \text{P}(A\cap B)/\text{P}(B)\) can be stated generically as
\[ \text{conditional} = \frac{\text{joint}}{\text{marginal}} \]
When dealing with probabilities (or proportions or percentages) be sure to ask “probability of what?” Thinking in fraction terms, be careful to identify the correct reference group which corresponds to the denominator.
Example 3.2 The following two phrases contain exactly the same words, just in different orders. Which is larger, the numerical value of 1 or 2?
- The probability that a randomly selected man who is greater than six feet tall plays in the National Basketball Association (NBA).
- The probability that a randomly selected man who plays in the National Basketball Association (NBA) is greater than six feet tall.
Example 3.3 Suppose
- 20% of adults are under age 30
- 63% of adults under age 30 use TikTok
- 31% of adults over age 30 TikTok
- Use the information to set up a hypothetical two-way table.
- Compute the probability that an adult uses TikTok.
- Compute the probability that an adult who uses TikTok is under age 30.
Rearranging the definition of conditional probability we get the Multiplication rule: the probability that two events both occur is
\[ \begin{aligned} \text{P}(A \cap B) & = \text{P}(A|B)\text{P}(B)\\ & = \text{P}(B|A)\text{P}(A) \end{aligned} \]
The multiplication rule says that you should think “multiply” when you see “and”. However, be careful about what you are multiplying: to find a joint probability you need an unconditional and an appropriate conditional probability.
You can condition either on \(A\) or on \(B\), provided you have the appropriate marginal probability; often, conditioning one way is easier than the other.
Be careful: the multiplication rule does not say that \(\text{P}(A\cap B)\) is the same as \(\text{P}(A)\text{P}(B)\).
Law of total probability If \(C_1, C_2, C_3\ldots\) are disjoint events with \(C_1\cup C_2 \cup C_3\cup \cdots =\Omega\), then \[\begin{align*} \text{P}(A) & = \text{P}(A \cap C_1) + \text{P}(A \cap C_2) + \text{P}(A \cap C_2) + \cdots \\ & = \text{P}(A |C_1)\text{P}(C_1) + \text{P}(A | C_2)\text{P}(C_2) + \text{P}(A | C_3)\text{P}(C_3) + \cdots \end{align*}\]
The events \(C_1, C_2, C_3, \ldots\), which represent the “cases”, form a partition of the sample space; each outcome \(\omega\in\Omega\) lies in exactly one of the \(C_i\).
The law of total probability says that we can interpret the unconditional probability \(\text{P}(A)\) as a probability-weighted average of the case-by-case conditional probabilities \(\text{P}(A|C_i)\) where the weights \(\text{P}(C_i)\) represent the probability of encountering each case.
3.1 Exercises
Exercise 3.1 Continuing Exercise 2.1. The probability that a randomly selected U.S. household has a pet dog is 0.47. The probability that a randomly selected U.S. household has a pet cat is 0.25. the probability that a randomly selected U.S. household has a pet dog and a pet cat is 0.15.
In addition to computing, represent the probabilities using appropriate notation.
- Compute the probability that a randomly selected U.S. household that has a pet dog also has a pet cat. Is it 0.25?
- Compute the probability that a randomly selected U.S. household that does not have a pet dog has a pet cat. Is it the same as the previous part? Is it one minus the previous part?
- Describe in words the probability that results from subtracting the answer to the first part from 1.
- Compute the probability that a randomly selected U.S. household that has a pet cat also has a pet dog.
Exercise 3.2 Suppose that3
- 67% of Democrats believe in human-driven climate
- 46% of Independents believe in human-driven climate
- 34% of Republicans believe in human-driven climate
Also suppose that4
- 28% of American adults are Democrats
- 42% of American adults are Independents
- 30% of American adults are Republicans
- Define the event \(A\) to represent “believes in human-driven climate change” and \(D, I, R\) to correspond to affiliation in each of the parties. If the probability measure \(\text{P}\) corresponds to selecting an American adult uniformly at random, write all the percentages above as probabilities using proper notation.
- Construct an appropriate two-way table of probabilities.
- Now suppose that the randomly selected American believes in human-driven climate change. How does this information change the probability that the selected American belongs to each political party? Answer by computing appropriate probabilities (and using proper notation).
- How many times more likely is it for an American adult to believe in human-driven climate change and be Independent than to:
- believe in human-driven climate change and be Democrat
- believe in human-driven climate change and be Republican
- believe in human-driven climate change and be Democrat
- How many times more likely is it for an American adult who believes in human-driven climate change to be Independent than to be:
- Democrat
- Republican
- Democrat
- What do you notice about the answers to the two previous parts?
- The process of conditioning can be thought of as “slicing and renormalizing”.
- Extract the “slice” corresponding to the event being conditioned on (and discard the rest). For example, a slice might correspond to a particular row or column of a two-way table.
- “Renormalize” the values in the slice so that corresponding probabilities add up to 1.
- Extract the “slice” corresponding to the event being conditioned on (and discard the rest). For example, a slice might correspond to a particular row or column of a two-way table.
- Slicing determines the shape; renormalizing determines the scale.
- Slicing determines relative probabilities; renormalizing just makes sure they add up to 1.
Exercise 3.3 Continuing Exercise 3.2. Explain in detail how you could conduct a simulation, using only the information provided in the problem set up, and how you would use the results to approximate the conditional probability of each party given belief in human driven climate change.
- Conditional probabilities can be approximated by filtering (or subsetting) based on the condition
- To approximate \(\text{P}(A|B)\), simulate the random phenomenon for a set number of repetitions (say 10000), discard those repetitions on which \(B\) does not occur, and compute the relative frequency of \(A\) among the remaining repetitions (on which \(B\) does occur).
- Be careful! The margin of error is based on only the number of repetitions used to compute the relative frequency. So if you perform 10000 repetitions but \(B\) occurs only on 2000, then the margin of error for estimate \(\text{P}(A|B)\) is roughly on the order of \(1/\sqrt{2000} = 0.022\) (rather than \(1/\sqrt{10000} = 0.01\). Especially if \(\text{P}(B)\) is small, the margin of error could be large resulting in an imprecise estimate of \(\text{P}(A|B)\). (Advantage: not computationally intensive.)
The values in this problem are based on a April, 2021 report by the Pew Research Center.↩︎
Based on data from the U.S. Census Bureau↩︎
Probabilities are estimated based on this 2024 survey.↩︎
Estimate based on Gallup poll↩︎