Bayes and Total Probability: Four Forms¶
Theorem¶
Write for marginal mass or density functions and for the corresponding conditional functions. Where the denominator is positive and finite,
The four total-probability forms are:
| Marginalization over | ||
|---|---|---|
| Discrete | Discrete | |
| Continuous | Continuous | |
| Discrete | Continuous | |
| Continuous | Discrete |
Use appropriate conditional mass or density versions; continuity of marginals alone does not establish a joint density.
For discrete conditional laws use a Conditional Probability Mass Function; for conditional laws with densities use a Conditional Probability Density Function. Both express Conditional Probability, but density conditioning at a point is not division by the probability of that point.
Interpretation¶
The same factorization works whether each variable is discrete or continuous: sum over discrete values and integrate over continuous ones. In every case "joint conditional marginal" produces both Bayes' rule and the law of total probability, with standing for a PMF or a density as the type of each variable requires.
In this example, is discrete, while has conditional densities and for . Summing over gives , and Bayes' rule gives , the red curve. It starts at for near and decreases; at , where the two densities are equal, the posterior equals the prior . Small observations favour , whose density puts more weight near .
To read the table, note that the variable summed or integrated out is , so the operation follows the type of . The left-hand side follows the type of : a PMF if is discrete, a density if is continuous. In the mixed forms a probability and a density appear in one formula. Heuristically, stands for for a small , and the width cancels between numerator and denominator.
All four forms extend the law of total probability and Bayes' rule for events. The purely continuous forms are treated separately in the continuous law of total probability and the continuous Bayes rule.
Key Results¶
- When is discrete and continuous, and .
- When is continuous and discrete, and .
Examples¶
- If and , then on .
- If , , and , then for .
Prerequisites¶
- Conditional Probability Mass Function
- Conditional Probability Density Function
- Conditional Probability
Related Concepts¶
Sources¶
- Nicky van Foreest · Probability Distributions · Week 2
Symbols: integral, sum
Last updated: 20 October 2026 03:02
Bayes and Total Probability: Four FormsConditional Probability Mass FunctionConditional Probability Density FunctionConditional ProbabilityContinuous Law of Total ProbabilityContinuous Bayes RuleLaw of Total ProbabilityBayes Rule