Marginal probability from conditional probabilities

Sometimes we only know the conditional probabilities of an event \(A\), given that each of another collection of events \(\{B_1, ..., B_k\} \) have occurred. If we also know the probabilities of the B-events, it is possible to calculate the unconditional probability for \(A\).

Law of total probability

If \(\{B_1, ..., B_k\} \) are a partition of the sample space,

\[ P(A)   =   \sum_{i=1}^{k} {P(A \mid B_i) \times P(B_i)} \]

Since exactly one of the events \(\{B_1, \dots, B_k\} \) must occur, the event \(A\) must occur with one and only one of these events. Therefore

\[ \begin{align} P(A) &= P\left((A \textbf{ and } B_1) \textbf{ or } (A \textbf{ and } B_2) \textbf{ or } \dots \textbf{ or } (A \textbf{ and } B_k)\right) \\ &= P(A \textbf{ and } B_1) + P(A \textbf{ and } B_2) + \dots P(A \textbf{ and } B_k) \end{align} \]

since the events \(\{A \textbf{ and } B_i\} \) are mutually exclusive. Expanding the probabilities of these,

\[ P(A) = P(A \mid B_1) \times P(B_1) + P(A \mid B_2) \times P(B_2) + \dots P(A \mid B_k) \times P(B_k) \]

The result is best illustrated with an example.

Example

The following table was derived from reports about contraceptive use in the USA among women aged 15 to 44 who were sexually active but not intending to get pregnant. It also shows the percentages of these women who had unintended pregnancies in their first year using each method.

Main method % of women % unintended pregnant
No method 37.8% 85%
Pill 17.1% 9%
Female sterilization 16.5% 0.5%
Male sterilization 6.2% 0.15%
Male condom 10.2% 18%
IUD 3.5% 0.5%
Withdrawal 3.2% 22%
Injectable 2.4% 0.3%
Vaginal ring 1.3% 9%
Fertility awareness methods 0.7% 24%
Patch 0.5% 9%
Implant 0.3% 0.05%
Other methods 0.3% 10%

What is the probability that a random American woman in this age group who is sexually active but not intending to get pregnant will actually get pregnant?

The main contraceptive method used is a partition of the sample space — each woman has one, and only one, of the methods as a "main" method.

The first column in the table gives the marginal probabilities for the contraceptive methods. The second column gives the conditional probabilities for pregnancy, given each contraceptive method.

Main method P(methodi) P(pregnant | methodi) P(pregnant and methodi)
No method 0.378 0.85 0.378 × 0.85 = 0.3213
Pill 0.171 0.09 0.171 × 0.09 = 0.0154
Female sterilization 0.165 0.005 0.165 × 0.005 = 0.0008
Male sterilization 0.062 0.0015 0.062 × 0.0015 = 0.0001
Male condom 0.102 0.18 0.102 × 0.18 = 0.0184
IUD 0.035 0.005 0.035 × 0.005 = 0.0002
Withdrawal 0.032 0.22 0.032 × 0.22 = 0.0070
Injectable 0.024 0.003 0.024 × 0.003 = 0.0001
Vaginal ring 0.013 0.09 0.013 × 0.09 = 0.0012
Fertility awareness methods 0.007 0.24 0.007 × 0.24 = 0.0017
Patch 0.005 0.09 0.005 × 0.09 = 0.0005
Implant 0.003 0.0005 0.003 × 0.0005 = 0.0000
Other methods 0.003 0.15 0.003 × 0.15 = 0.0005
Total 1.000   0.3670

A third column has been added to the table, showing the joint probabilities for pregnancy and the contraceptive methods. Adding these gives the overall probability of one such woman getting pregnant in the year, 0.3670.

Notice that most of this probability comes from women who used no contraceptive method.