Posterior probability

Intermediate

What you need first. Nothing else on this path comes first. This page is part of Bayesian statistics.

In Bayesian statistics, a posterior probability is the probability of an event about an unknown after the data have been taken into account. A posterior probability is the probability of a set of parameter values after the data have been taken into account.

It is computed from a prior distribution and a sampling model, not from the sample alone. A posterior hypothesis probability is that probability when the set is the region a named hypothesis picks out, such as “the heads probability is at most one half.” The integral is the same kind of object. The report is not: one number is the mass of whatever set is asked for, and the other is the mass attached to a hypothesis that has been named in advance. The distribution that supplies both, and the arithmetic that turns a prior and a likelihood into a probability, are the subject here. The comparison of a named hypothesis with a pp-value, and the decision that uses a loss, belong with the hypothesis probability.[1]

Posterior probability

Posterior probability
Fact Value
Topic Bayesian statistics
Listed on Bayesian statistics
Worked example 1

Motivating example

Two explanations of a binary outcome are open: explanation AA with prior probability 1/41/4, and explanation BB with prior probability 3/43/4. The observed sample has probability 1/21/2 under AA and probability 1/61/6 under BB. The question the posterior answers is how probable the set {A}\{A\} is once that sample has been seen. The prior probabilities and the two sampling probabilities are the ingredients. Neither ingredient is already the answer, and neither is a hypothesis probability until someone names AA or BB as the hypothesis under test.[1]

Definition

For a discrete unknown θ\theta and observed data yy,

P(θ=θj∣y)=p(y∣θj) P(θ=θj)∑ip(y∣θi) P(θ=θi),\mathbb{P}(\theta=\theta_j\mid y) =\frac{p(y\mid\theta_j)\,\mathbb{P}(\theta=\theta_j)}{\sum_i p(y\mid\theta_i)\,\mathbb{P}(\theta=\theta_i)},

provided the denominator is positive. For a continuous parameter with prior density p(θ)p(\theta) and sampling density p(y∣θ)p(y\mid\theta), the posterior density is

p(θ∣y)=p(θ) p(y∣θ)p(y),p(y)=∫p(θ) p(y∣θ) dθ.p(\theta\mid y)=\frac{p(\theta)\,p(y\mid\theta)}{p(y)}, \qquad p(y)=\int p(\theta)\,p(y\mid\theta)\,d\theta.

The posterior probability of a set AA of parameter values is the integral of that density over AA, or the sum of the point masses in AA. The whole function p(θ∣y)p(\theta\mid y) is the posterior distribution. A posterior probability is the mass it assigns to a specified set. When that set is the region named by a hypothesis, the mass is a posterior hypothesis probability. The set can also be an interval chosen to hold a stated mass, or a single point of a discrete parameter.[1][2]

In the carrier calculation, the set has one point, “she is a carrier.” The prior probability is 1/21/2. Two unaffected sons have likelihood 1/41/4 if she is a carrier and likelihood 11 if she is not. The posterior probability of that point is

(1/4)⋅(1/2)(1/4)⋅(1/2)+1⋅(1/2)=15=0.2.\frac{(1/4)\cdot(1/2)}{(1/4)\cdot(1/2)+1\cdot(1/2)}=\frac{1}{5}=0.2.

That number is the posterior probability of one point in a two-point parameter. It is not, by itself, a test of a scientific hypothesis about haemophilia beyond the model that was written down.[1]

Properties

The ratio of two posterior probabilities equals the prior odds times the likelihood ratio. The marginal probability of the data cancels, so

P(θ=θ1∣y)P(θ=θ2∣y)=P(θ=θ1)P(θ=θ2)⋅p(y∣θ1)p(y∣θ2).\frac{\mathbb{P}(\theta=\theta_1\mid y)}{\mathbb{P}(\theta=\theta_2\mid y)} =\frac{\mathbb{P}(\theta=\theta_1)}{\mathbb{P}(\theta=\theta_2)}\cdot\frac{p(y\mid\theta_1)}{p(y\mid\theta_2)}.

If the prior probability of a region is zero, the posterior probability of that region remains zero whenever the posterior is defined. Multiplying by a likelihood cannot create mass outside the prior’s support.[1]

A continuous posterior assigns probability zero to any single point, even at a point where the density is positive. The probability of a set with positive length can still be large. An equal-tailed posterior interval chooses its endpoints so that the tails hold a stated mass. A fixed region such as {θ≤1/2}\{\theta\le 1/2\} does the opposite: the region is chosen first and the mass is read off. Those two summaries answer different questions, and only the second is a hypothesis probability.[1][2]

Worked example

Prior probabilities are P(A)=1/4\mathbb{P}(A)=1/4 and P(B)=3/4\mathbb{P}(B)=3/4. The sampling probabilities of the observed sample are 1/21/2 under AA and 1/61/6 under BB. The unnormalised weights are

14⋅12=18,34⋅16=18.\tfrac14\cdot\tfrac12=\tfrac18, \qquad \tfrac34\cdot\tfrac16=\tfrac18.

The marginal probability of the sample is 1/8+1/8=1/41/8+1/8=1/4. The posterior probability of AA is (1/8)/(1/4)=1/2(1/8)/(1/4)=1/2. The likelihood ratio in favour of AA is (1/2)/(1/6)=3(1/2)/(1/6)=3, and the prior odds of AA against BB are (1/4)/(3/4)=1/3(1/4)/(3/4)=1/3, so the posterior odds are 11, which is the same probability 1/21/2. The data have moved the probability of {A}\{A\} from 1/41/4 to 1/21/2. Naming AA as a hypothesis would then call 1/21/2 a posterior hypothesis probability. Without that naming, 1/21/2 is only the posterior probability of the set.[1]

Your turn. Keep the sampling probabilities 1/21/2 and 1/61/6, and replace the prior by P(A)=P(B)=1/2\mathbb{P}(A)=\mathbb{P}(B)=1/2. What is the posterior probability of AA?

The unnormalised weights are (1/2)⋅(1/2)=1/4(1/2)\cdot(1/2)=1/4 and (1/2)⋅(1/6)=1/12(1/2)\cdot(1/6)=1/12. Their sum is 1/31/3, so the posterior probability of AA is (1/4)/(1/3)=3/4(1/4)/(1/3)=3/4.

Assumptions and limits

The denominator must be positive and finite. If the prior is an improper function, there is no prior probability to start from, and a posterior probability is available only after the product of that function and the likelihood has been checked to have a finite integral. The numerical value depends on the whole prior, not only on the maximum of the likelihood. A posterior probability computed under one model is conditional on that model. A dispute about the number is a dispute about the prior, the sampling model, or both.[1][2]

The carrier probability 1/51/5 used the likelihoods 1/41/4 and 11, and it ignored mutation. A different sampling story for the sons produces a different posterior probability of the same point. The arithmetic does not supply the story.[1]

Check yourself

Try these questions before opening an answer.

A sampling probability is not yet posterior

The data have sampling probability 1/2 under one explanation and 1/6 under another. Why is 1/2 not already the posterior probability of the first explanation?

Sampling probabilities need not add to one across explanations. The posterior multiplies each by its prior and divides by the sum of those products.

A prior of zero

An explanation is given prior probability 0, and the data are very likely under it. What is its posterior probability, when the posterior is defined?

Zero. The likelihood does not create mass outside the support of the prior.

A single point of a continuous parameter

A continuous posterior density is positive at θ = 1/2. What is the posterior probability of the single point θ = 1/2?

Zero. A posterior probability is the mass of a set, and a continuous distribution gives every single point mass zero. The mass of an interval around 1/2 can still be large.

History

Bayes’s 1763 essay asked for the probability that an unknown chance lies between two bounds, given the number of successes in a fixed number of trials. That is a posterior probability for an interval of the unknown. The continuous form used now writes the posterior density as the prior density times the likelihood, divided by the marginal probability of the data. Once that density is in hand, a mean, a median, an interval, or the probability of a named region can be computed from it. The probability of a named region is the hypothesis probability. The interval probability Bayes asked for is the set probability, whether or not anyone has called the interval a hypothesis.[2][1]

See also

Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability

Glossary and index

References

  1. ^ a b c d e f g h i j a. (pp. 7–8) b. (pp. 7–8) c. (p. 7) d. (p. 9) e. (pp. 7–8) f. (pp. 7–8) g. (pp. 7–8) h. (pp. 7–8) i. (p. 9) j. (p. 7) Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis. Chapman and Hall/CRC. https://doi.org/10.1201/b16018
  2. ^ a b c d a. (p. 33) b. (p. 33) c. (p. 31) d. (pp. 31, 33) Dodge, Yadolah (2008). The Concise Encyclopedia of Statistics. Springer. https://doi.org/10.1007/978-0-387-32833-1
Cite this page
Plain text
StatWiki (2026). "Posterior probability." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/posterior-probability.html
BibTeX
@misc{statwiki_posterior_probability,
  author = {{StatWiki}},
  title = {{Posterior probability}},
  year = {2026},
  url = {https://www.statwiki.io/articles/posterior-probability.html},
  urldate = {2026-12-02},
  note = {StatWiki, last updated 2 December 2026}
}