Conditional Probability Starts with an Intersection
Knowing that an event \(B\) occurred changes the relevant sample space: outcomes outside \(B\) are no longer possible. To find the probability that \(A\) also occurred, count the part of \(B\) that lies in \(A\), then compare it with the probability of \(B\). This simple ratio is the basis for conditional probability, the multiplication rule, and Bayes’ rule.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), where \(\Omega\) is the set of outcomes, \(\mathcal{F}\) is a collection of events, and \(\mathbb{P}\) assigns probabilities to events. For events \(A,B\in\mathcal{F}\), the conditional probability of \(A\) given \(B\) is defined only when \(\mathbb{P}(B)>0\). If \(\mathbb{P}(B)=0\), the ratio in the definition is undefined, and this event-based definition does not assign a value to \(\mathbb{P}(A\mid B)\).
The denominator is the probability of the information being conditioned on; the numerator is the probability that this information and the event of interest both occur. In particular, \(\mathbb{P}(B\mid B)=1\), because \(\mathbb{P}(B\cap B)=\mathbb{P}(B)\). Also, \(\mathbb{P}(A\mid B)=0\) if \(A\cap B\) is empty. These facts depend on \(\mathbb{P}(B)>0\).
Proof. Nonnegativity follows because \(\mathbb{P}(A\cap B)\ge0\) and the denominator \(\mathbb{P}(B)\) is positive. For the whole sample space, \(\mathbb{P}(\Omega\mid B)=\mathbb{P}(\Omega\cap B)/\mathbb{P}(B)=\mathbb{P}(B)/\mathbb{P}(B)=1\). If \(A_1,A_2,\ldots\) are pairwise disjoint, then the events \(A_r\cap B\) are pairwise disjoint and their union is \((\bigcup_r A_r)\cap B\). Countable additivity of \(\mathbb{P}\), followed by division by the positive number \(\mathbb{P}(B)\), gives \(\mathbb{P}((\bigcup_r A_r)\mid B)=\sum_r\mathbb{P}(A_r\mid B)\). Finally, multiplying the defining equation by \(\mathbb{P}(B)\) gives the multiplication rule. \(\square\)
The multiplication rule can also be used in the other direction. If \(\mathbb{P}(A)>0\), then \(\mathbb{P}(A\cap B)=\mathbb{P}(A)\mathbb{P}(B\mid A)\). Equating these two expressions for the same intersection gives \(\mathbb{P}(B)\mathbb{P}(A\mid B)=\mathbb{P}(A)\mathbb{P}(B\mid A)\). The two conditional probabilities generally differ: their denominators refer to different events.
Partitions, Total Probability, and Bayes’ Rule
A finite partition \(H_1,\ldots,H_m\) of \(\Omega\) consists of pairwise disjoint events whose union is \(\Omega\). Think of the \(H_i\) as mutually exclusive possibilities that cover every outcome. For the formulas below, write \(I=\{i:\mathbb{P}(H_i)>0\}\), and assume \(\mathbb{P}(E)>0\) for the event \(E\) on which we condition. Conditional probabilities given \(H_i\) are used only for \(i\in I\). Any cell with zero probability has \(\mathbb{P}(E\cap H_i)=0\), so it contributes nothing to the sums.
Proof. Since the partition covers \(\Omega\), the events \(E\cap H_1,\ldots,E\cap H_m\) are disjoint and their union is \(E\). Additivity gives \(\mathbb{P}(E)=\sum_{i=1}^m\mathbb{P}(E\cap H_i)\). A zero-probability cell has \(\mathbb{P}(E\cap H_i)=0\); for every \(i\in I\), the multiplication rule gives \(\mathbb{P}(E\cap H_i)=\mathbb{P}(E\mid H_i)\mathbb{P}(H_i)\). This proves the total probability formula. For \(i\in I\), the definition of conditional probability gives \(\mathbb{P}(H_i\mid E)=\mathbb{P}(H_i\cap E)/\mathbb{P}(E)\). Substitute the multiplication-rule expression for the numerator and the total-probability expression for the denominator to obtain Bayes’ formula. If \(\mathbb{P}(H_i)=0\), then \(\mathbb{P}(H_i\cap E)=0\), and the same definition, with \(\mathbb{P}(E)>0\), gives \(\mathbb{P}(H_i\mid E)=0\). \(\square\)
Total probability combines the contributions from all possible cases. Bayes’ rule then reverses the direction of conditioning: it starts with the probability of observing \(E\) under each case \(H_i\) and returns the probabilities of those cases after \(E\) is observed. The denominator is essential because it normalizes the contributions to sum to \(1\).
Worked Example: A Positive Screening Result
Suppose \(D\) denotes having a condition and \(+\) denotes a positive screening result. Assume \(\mathbb{P}(D)=\tfrac{1}{100}\), \(\mathbb{P}(+\mid D)=\tfrac{9}{10}\), and \(\mathbb{P}(+\mid D^c)=\tfrac{1}{20}\). Find \(\mathbb{P}(D\mid +)\). Both \(D\) and \(D^c\) have positive probability, so the stated conditional probabilities are defined.
First calculate each joint probability using the multiplication rule. The probability of a positive result and the condition is
The probability of a positive result without the condition is
Since \(D,D^c\) partition the sample space, total probability gives \(\mathbb{P}(+)=\tfrac{9}{1000}+\tfrac{99}{2000}=\tfrac{18}{2000}+\tfrac{99}{2000}=\tfrac{117}{2000}\). Therefore,
Check: The other posterior probability is \(\mathbb{P}(D^c\mid +)=(99/2000)/(117/2000)=99/117=11/13\), and \(\tfrac{2}{13}+\tfrac{11}{13}=1\). The answer is not the sensitivity \(\tfrac{9}{10}\): that number conditions on \(D\), whereas the question conditions on \(+\).
Worked Example: Selecting One of Two Boxes
A box is selected, then one object is drawn. Box \(A\) is selected with probability \(\tfrac{1}{3}\), and box \(B\) with probability \(\tfrac{2}{3}\). The probability of drawing a red object is \(\tfrac{3}{4}\) from \(A\) and \(\tfrac{1}{4}\) from \(B\). Given that the drawn object is red, find the probability that box \(A\) was selected.
The selection events \(A\) and \(B\) are disjoint and exhaustive, and both have positive probability. Let \(R\) be the event of drawing red. The two joint probabilities are
Thus \(\mathbb{P}(R)=\tfrac{1}{4}+\tfrac{1}{6}=\tfrac{3}{12}+\tfrac{2}{12}=\tfrac{5}{12}>0\). Conditioning on red gives
Check: Bayes’ rule gives \((\tfrac{3}{4}\cdot\tfrac{1}{3})/(\tfrac{5}{12})=(\tfrac{1}{4})/(\tfrac{5}{12})=\tfrac{3}{5}\). The other posterior probability is \(\mathbb{P}(B\mid R)=\tfrac{(1/4)(2/3)}{5/12}=\tfrac{1/6}{5/12}=\tfrac{2}{5}\); the two posterior probabilities sum to \(1\).
Reading Conditional Probabilities from a Table
A finite table is a compact way to keep the intersection and conditioning event distinct. Each cell records a joint probability or a count for two events; row and column totals provide the marginal probabilities. To calculate \(\mathbb{P}(A\mid B)\), divide the cell for \(A\cap B\) by the total for \(B\), not by the total for \(A\). If the table contains counts from equally weighted observations, dividing the relevant counts gives the same conditional probability because the common total cancels.
Worked Example: Two Events in a Finite Sample Space
Two fair dice are rolled, so the sample space has \(36\) equally likely ordered outcomes. Let \(A\) be the event that the sum is \(8\), and \(B\) the event that the first die shows an even number. Find both \(\mathbb{P}(A\mid B)\) and \(\mathbb{P}(B\mid A)\).
The outcomes in \(A\) are \((2,6),(3,5),(4,4),(5,3),(6,2)\), so \(A\) contains \(5\) outcomes. There are \(3\) even choices for the first die and \(6\) choices for the second, so \(B\) contains \(3\cdot6=18\) outcomes. The outcomes in both events are \((2,6),(4,4),(6,2)\), so \(A\cap B\) contains \(3\) outcomes. Each outcome has probability \(\tfrac{1}{36}\), hence \(\mathbb{P}(A)=\tfrac{5}{36}\), \(\mathbb{P}(B)=\tfrac{18}{36}=\tfrac{1}{2}\), and \(\mathbb{P}(A\cap B)=\tfrac{3}{36}\).
Using the appropriate denominator for each conditioning event gives
Check: The multiplication rule gives \(\mathbb{P}(B)\mathbb{P}(A\mid B)=\tfrac{18}{36}\cdot\tfrac{1}{6}=\tfrac{3}{36}=\mathbb{P}(A\cap B)\). In the reverse direction, \(\mathbb{P}(A)\mathbb{P}(B\mid A)=\tfrac{5}{36}\cdot\tfrac{3}{5}=\tfrac{3}{36}\) as well. The conditionals differ because \(A\) and \(B\) have different probabilities.
A Table-Based Bayes Calculation
The same formulas work when a table contains counts rather than probabilities. Suppose a study records whether each person received a treatment and whether the person responded. Let \(T\) mean treated and \(R\) mean response. The four cells below are counts; the row and column totals are included so the conditioning denominator can be read directly.
Worked Example: Response Counts by Treatment Status
In a group of \(40\) people, \(12\) were treated and responded, \(8\) were treated and did not respond, \(4\) were untreated and responded, and \(16\) were untreated and did not respond. Find \(\mathbb{P}(R\mid T)\) and \(\mathbb{P}(T\mid R)\).
| Response \(R\) | No response \(R^c\) | Total | |
|---|---|---|---|
| Treated \(T\) | 12 | 8 | 20 |
| Untreated \(T^c\) | 4 | 16 | 20 |
| Total | 16 | 24 | 40 |
Check the counts before calculating: the treated row total is \(12+8=20\), the untreated row total is \(4+16=20\), the response column total is \(12+4=16\), and the no-response column total is \(8+16=24\). The grand total is \(20+20=40\), also \(16+24=40\). Thus \(\mathbb{P}(T)=20/40\), \(\mathbb{P}(R)=16/40\), and \(\mathbb{P}(T\cap R)=12/40\).
For response given treatment, the denominator is the treated total: \(\mathbb{P}(R\mid T)=12/20=\tfrac{3}{5}\). For treatment given response, the denominator is the response total: \(\mathbb{P}(T\mid R)=12/16=\tfrac{3}{4}\). Both conditioning events have positive probability. As a check, \(\mathbb{P}(T)\mathbb{P}(R\mid T)=\tfrac{20}{40}\cdot\tfrac{3}{5}=\tfrac{3}{10}=\tfrac{12}{40}=\mathbb{P}(T\cap R)\), and \(\mathbb{P}(R)\mathbb{P}(T\mid R)=\tfrac{16}{40}\cdot\tfrac{3}{4}=\tfrac{3}{10}\) gives the same intersection probability.
Common Mistakes and a Reliable Check
A frequent error is to use the probability of the event being asked about as the denominator, regardless of the conditioning event. For example, in the die example, the incorrect calculation \(\mathbb{P}(A\mid B)=\mathbb{P}(A\cap B)/\mathbb{P}(A)=(3/36)/(5/36)=3/5\) actually calculates \(\mathbb{P}(B\mid A)\). The correction is to use \(\mathbb{P}(B)=18/36\) in the denominator for \(\mathbb{P}(A\mid B)\), giving \((3/36)/(18/36)=1/6\).
Before using a conditional probability or Bayes’ rule, check three items: the conditioning event has positive probability; the numerator is the intersection with that event; and the denominator is the probability of that event. For Bayes’ rule, also check that the cases form a partition and that the total-probability denominator is positive. These checks prevent undefined conditionals and help distinguish a likelihood such as \(\mathbb{P}(E\mid H_i)\) from a posterior probability such as \(\mathbb{P}(H_i\mid E)\).
Check Your Understanding
For each question, identify the conditioning event before choosing the denominator. State any positivity condition needed for the conditional probability to be defined.
- If \(\mathbb{P}(A\cap B)=\tfrac{1}{10}\) and \(\mathbb{P}(B)=\tfrac{2}{5}\), calculate \(\mathbb{P}(A\mid B)\).
- A partition \(H_1,H_2\) has probabilities \(\tfrac{1}{4}\) and \(\tfrac{3}{4}\), and \(\mathbb{P}(E\mid H_1)=\tfrac{1}{2}\), \(\mathbb{P}(E\mid H_2)=\tfrac{1}{3}\). Find \(\mathbb{P}(E)\).
- Using the values in question 2, calculate \(\mathbb{P}(H_1\mid E)\) and check that the denominator is positive.
- Why can \(\mathbb{P}(A\mid B)\) and \(\mathbb{P}(B\mid A)\) have different values even when \(A\cap B=B\cap A\)?
- A table has \(9\) observations in \(A\cap B\), \(15\) in \(B\), and \(30\) in total. Calculate \(\mathbb{P}(A\mid B)\), assuming each observation is equally weighted.