Bayesian posterior Created 2026-09-24 Updated 2026-10-14
The Bayesian posterior is the conditional probability distribution of an unknown statistical parameter after observing data. Suppose a continuous prior distribution has prior density relative to Lebesgue measure , and is the sampling probability mass function or probability density function of the observed data in the statistical model. Bayes' theorem givesThe Bayesian model evidence is the normalization constant making the posterior density integrate to one. The strict positive, finite condition is essential: a zero or infinite normalizer does not define this posterior distribution, even if the unnormalized expression can be written down. Other reference measures give the corresponding density formula; discrete parameter values replace the integral by a sum. The posterior propriety article gives examples where normalization fails.
With fixed, is a likelihood function of . Its normalization as a sampling distribution is over possible data, not over parameter values. In particular, a likelihood function is not a probability density function for and need not integrate to one over . The prior density supplies the probability weighting, and the Bayesian model evidence normalizes their product. This distinction prevents a tempting mistake: reversing the conditioning merely by exchanging the words “data” and “parameter”.
For eight heads among ten conditionally independent Bernoulli trials, take the observed data to be the heads count . Its binomial distribution likelihood function and the prior density giveUsing the Euler beta function , the Bayesian model evidence and normalized posterior density areThus the posterior distribution is . If the data are instead one particular ordered sequence with eight heads and two tails, its likelihood function omits the factor 45 and its Bayesian model evidence becomes . The factor cancels in Bayes' theorem, leaving the same posterior distribution; these two data descriptions have different sampling probabilities but identical information about here.
Beta(2,2) prior, peak-normalized Bernoulli likelihood, and Beta(10,4) posterior after eight heads and two tails
. Details. The prior density and posterior density use the left axis and each integrate to one. The dashed likelihood function uses the right axis and is divided by its maximum solely to compare its shape; it is not a parameter probability density function. The likelihood function peaks at , while the posterior mode is and the posterior mean is . Multiplying by the prior density shifts the preferred values toward one half while preserving a range of possibilities.
The resulting posterior variance is , compared with prior variance . In this example the update reduces uncertainty. The posterior predictive probability of heads on the next conditionally independent toss is , and the credible interval above reports a 95% range. These are summaries of the same posterior distribution, rather than competing estimates of one density peak.
Bayesian statistics Created 2026-09-24 Updated 2026-10-14
Bayesian statistics expresses uncertainty about an unknown statistical parameter through a probability distribution, then uses Bayes' theorem to update it after observing data. The prior distribution describes uncertainty before the current observations; the likelihood function describes how the statistical model generates those observations at each parameter value; the posterior distribution describes uncertainty conditional on the observations and that model. A physical parameter can have one fixed value while its value remains uncertain to us. Assigning it a probability distribution represents that uncertainty under the chosen model, rather than requiring the physical parameter to change randomly between measurements.
For example, suppose ten Bernoulli trials are independent conditional on an unknown heads probability , with a beta distribution prior . Eight heads and two tails give the posterior distribution by Beta-binomial conjugacy. Its posterior mean is , between the prior mean and observed binomial proportion . The Bayesian posterior below computes the whole update, and the credible interval below summarizes its remaining uncertainty. The conjugate update is explained in MIT 18.05, Reading 15: beta and normal conjugate priors.
The useful feature is that one posterior distribution supports several questions: a posterior mean estimates a value, a credible interval reports a range, and a posterior predictive distribution predicts a future observation while averaging over parameter uncertainty. With conditionally independent new data, today's posterior distribution can become tomorrow's prior distribution. These conclusions remain conditional on the statistical model and prior distribution; a precise update does not establish that either assumption fits the experiment.
A historical starting point is Thomas Bayes's essay in the 1763 volume of the Royal Society's Philosophical Transactions, communicated after his death by Richard Price. Its opening problem asks for uncertainty about an unknown event probability given observed successes and failures: the same direction of reasoning illustrated by the coin example. See Bayes and Price, An Essay towards solving a Problem in the Doctrine of Chances, opening letter and problem.
Confidence interval Created 2026-09-28 Updated 2026-10-14
A confidence interval is a random interval constructed from a statistical sample to cover a fixed unknown statistical parameter with a prescribed coverage probability. For a scalar target , a procedure with nominal confidence satisfiesThe subscript records which probability distribution generates the repeated samples. The endpoints are statistics, so they vary from sample to sample; the target is fixed. Equality gives exact nominal coverage probability, while the inequality also permits conservative procedures. For a general estimand , replace the target inside the interval by .
A realized confidence interval communicates the precision of an estimate in the target's own units. Reporting alone conceals the difference between an estimate with standard error and one with standard error . A narrow confidence interval indicates greater precision for the stated statistical model, rather than a guarantee that its assumptions describe the experiment correctly.
Once is observed, either contains the fixed target or does not. The 95% statement concerns the random procedure , not a posterior probability of 0.95 that this particular interval contains . A credible interval instead assigns specified posterior probability to a region under Bayesian inference. These interpretations can differ even when the numerical endpoints agree. The repeated-sampling interpretation is explained in NIST's confidence-limits teaching reference.
Jerzy Neyman's 1937 paper formulates the fixed-target, random-endpoint construction in Section II, especially equation (20) on page 348. Its confidence coefficient must hold across the allowed statistical parameters, rather than only at the value suggested by one sample. See Neyman, Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability and the original paper scan.
Credible interval Created 2026-09-28 Updated 2026-10-14
A credible interval is an interval containing a prescribed amount of posterior probability for an unknown scalar statistical parameter . For a continuous posterior distribution with posterior density , its endpoints satisfyThe conditioning includes the chosen statistical model and prior distribution. For a discrete posterior distribution, exact equality may be impossible because of its probability masses; an interval can instead be required to contain at least the requested posterior probability. An interval compresses the full posterior distribution into a range whose uncertainty can be communicated in the parameter's own units. See MIT 18.05, Class 16: probability intervals.
For the eight-head, two-tail example in Bayesian statistics, the posterior density is on . Its cumulative distribution function, obtained by integration of this polynomial, isSolving and by the bisection method givesThese are numerical approximations to the exact quantiles defined by those equations; the endpoints were computed from the cumulative distribution function, rather than read off a plot. The resulting equal-tailed credible interval leaves 2.5% posterior probability on each side. Its shaded area is 95% of the total area under the posterior density.
Credible intervals are not unique. The one-sided credible interval also has 95% posterior probability, but leaves all 5% outside it on the right. A highest density region instead selects points above a density threshold; it need not be an equal-tailed credible interval, and when the posterior density has separated peaks it need not be one interval at all. Thus a reported credible interval should specify its construction.
A 95% credible interval makes a statement about the statistical parameter conditional on these observed data and the Bayesian model. A 95% confidence interval instead refers to the coverage probability of a procedure under repeated sampling at a fixed parameter value. These are different conditioning statements: 95% posterior probability does not by itself imply 95% coverage probability for every fixed parameter. The confidence interval article develops that sampling interpretation.
Equal-tailed credible interval 2026-10-14
An equal-tailed credible interval uses quantiles of a continuous posterior distribution to leave posterior probability in each tail. It is also called a central credible interval; central refers to equal tail probabilities, not equal distances from the posterior mean. For the beta distribution in credible interval, the 95% endpoints are approximately and , whose midpoint differs from the posterior mean .
GW150914 2026-10-18
GW150914 is the first directly detected gravitational wave, interpreted as a binary black hole inspiral, merger and ringdown. Its discovery paper reports a peak projected gravitational wave strain of approximately and a combined matched filter signal-to-noise ratio of 24. The inferred source-frame component masses were and solar masses, with 90 percent credible intervals. These are model-dependent estimates from a detector network.[ref]
Observation of Gravitational Waves from a Binary Black Hole Merger by B. P. Abbott and others. Abstract; II Observation; VI Source discussion, Table I
The interesting measurement is a chain: curvature changes relative light travel times, wave interference turns those changes into a photodetector signal, calibrated records from separate sites constrain a common source, and statistical inference tests competing explanations. The following original models explain that chain; the plotted time series are stipulated calculations, never measured GW150914 data.
One-sided credible interval 2026-10-14
A one-sided credible interval puts all excluded posterior probability in one tail. For a continuous posterior distribution, an upper bound satisfies ; a lower bound uses . Intersecting with the parameter's allowed range removes points of zero posterior probability. For the beta distribution , the upper 95% bound is , so is the alternative credible interval shown above.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 ii Solution Created 2026-10-03 Updated 2026-10-14
The posterior mean is a weighted average of the sample proportion and prior mean:Thus it is pulled from 10% toward the prior's 5%, giving about 7.17%. This is an affine shrinkage estimator for a binomial proportion. The prior carries substantial concentration relative to the 90 observations, so the posterior is also more precise under this model: its standard deviation is about , compared with the binomial plug-in standard error . The posterior 95% credible interval is narrower and shifted down compared with the simple Wald interval based on alone.
The point estimate shrinks toward the historical mean, and the interval is narrower under the informative prior. A credible interval and a frequentist confidence interval have different probability interpretations; the comparison does not make the prior's relevance automatic.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 i Solution Created 2026-10-03 Updated 2026-10-14
A beta distribution is a convenient prior for a probability and is conjugate to the binomial distribution of the death count. Match its mean and variance . For ,The moment matching for a beta prior formula givesConditional on , use and the observed count . Multiplying its likelihood by the prior density gives the Bayesian posterior through Beta-binomial conjugacy:Under squared-error loss, take its posterior mean as the point estimate. A 95% equal-tail credible interval is given by its 0.025 and 0.975 quantiles. Numerically,Matching two moments does not uniquely determine a prior distribution; the beta family is a justified convenient choice, not a conclusion forced by those moments. Its transfer to this hospital presumes that the historical between-hospital distribution is relevant to the present risk and case mix.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 v Solution Created 2026-10-03 Updated 2026-10-14
Use a hierarchical Bayesian model with binomial observation errors and a common distribution for the underlying risks:Give a shared hyperprior, or parameterize them by mean and concentration and put priors on and . Conditional on these hyperparameters, the risks are independent and identically distributed; after integrating them out they are exchangeable random variables with shared uncertainty. The data estimate the overall risk level and between-hospital variation. Conditional Beta-binomial conjugacy givesand full Bayes point estimates under squared-error loss areAn Empirical Bayes method instead estimates the hyperparameters from the marginal beta-binomial distribution likelihoodand inserts their fitted values in the conditional posterior means. Both approaches provide partial pooling, stronger for smaller hospitals. Full Bayes also propagates hyperparameter uncertainty into the credible intervals. If systematic covariates are needed, one can place exchangeable residual effects in a logistic regression model rather than assuming a common unconditional risk distribution.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 36 4 f Solution Created 2026-10-03 Updated 2026-10-14
The PDF output places inside the 95% credible interval for the time slope, whose endpoints are approximately and , and places inside the baseline slope interval, approximately to . Relative to their posterior standard deviations, the proposed fixed values are onlyfrom the posterior means. Thus the simpler choice is compatible with the fitted coefficient summaries and has a natural proportional-decay interpretation. It is a reasonable constrained model to compare, not proof of the exact equalities: separate marginal intervals do not establish a joint constraint, and a continuous posterior distribution assigns a specified point probability zero.
The reported Monte Carlo errors measure numerical uncertainty in the estimated posterior means, not uncertainty about the coefficients themselves. In particular, the baseline slope's Monte Carlo error is about 9% of its posterior standard deviation, appreciably larger than the corresponding proportion for the time slope. Longer or better-mixed chains may be needed for precise summaries.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 h Solution Created 2026-10-03 Updated 2026-10-06
A uniform prior on makes the posterior density proportional to the Poisson change-point posterior likelihood above. The zeros trick introduces an observed zero with Poisson distribution mean , making its likelihood function equal to . Choose ; since , this mean is strictly positive. Rough BUGS code, with For , omit the array and set
zero=0 supplied as data, ismodel {
theta ~ dunif(0,T)
for (i in 1:n) {
before[i] <- step(theta-time[i])
}
j <- sum(before[])
logL <- theta-2*T+(n-j)*log(2)
zero ~ dpois(K-logL)
}j <- 0. Monitor the sampled theta to obtain its posterior mean, credible interval and interval probabilities.There is also an exact sampling method. On the posterior density is proportional to , so choose the interval with weightsThen draw from a uniform distribution on and set . These weighted interval draws sample the posterior directly, without asking a local Markov chain Monte Carlo update to cross its discontinuities.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 2 d Solution Created 2026-10-03 Updated 2026-10-14
In Markov chain Monte Carlo, retain the derived quantity at every iteration. Rough BUGS code using the actual observations isSupply
model {
pM ~ dbeta(0.5,0.5)
pT ~ dbeta(0.5,0.5)
milkAnswers ~ dbin(pM,4)
teaAnswers ~ dbin(pT,4)
delta <- pM-pT
positive <- step(delta)
}milkAnswers=3 and teaAnswers=1. Summarize delta by its posterior mean, empirical quantiles and credible interval; the average of positive estimates . Here . Check Markov chain Monte Carlo convergence diagnostics before interpreting the simulation. Since both Bayesian posteriors are independent known beta distributions, direct independent sampling is an equally valid, simpler way to obtain the same summaries. Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 218 6 e Solution 2026-09-28
The reported 95% credible interval for isConditional on the model, prior, and observed data, its posterior probability is 0.95. A frequentist 95% confidence interval instead has 95% coverage under repeated sampling before the data are observed; it does not assign a sampling probability to the fixed parameter after observing this dataset.
Bayes' theorem updates prior knowledge using the likelihood of new observations. For alternative hypotheses ,The prior describes information before the data ; is the sampling likelihood, and the posterior describes the updated probabilities. Posterior odds equal prior odds times the likelihood ratio. A likelihood is a probability model for data at specified parameters, not automatically a normalized probability distribution over those parameters.
For a continuous parameter , the same rule uses densities: . Priors can encode positivity, physical limits, previous independent measurements or calibration knowledge. Their parameterization matters: a density uniform in a rate is not uniform in its logarithm. Proper priors make model evidences well defined; an arbitrary normalization in an improper prior is especially problematic for comparing models.
A counting example uses Poisson-gamma conjugacy. If a detector registers events in exposure with constant rate , . A gamma prior with shape and rate parameter , , givesThe posterior mean combines the prior rate with the observed rate , weighted by the prior and actual exposures. The parameters must use a consistent shape-rate convention. Small counts can leave substantial prior sensitivity; abundant informative data usually reduce it for regular identifiable models.
Independent old data can become the prior for a new experiment, giving the same result as joint updating under a consistent model. The new data must not also have been used to construct that prior, or the evidence is counted twice. A credible interval has a specified posterior probability under the chosen model and prior; this interpretation differs from repeated-sampling coverage of a confidence interval. Predictions for a future observation average its sampling distribution over the posterior, incorporating parameter uncertainty. Prior sensitivity checks and a defensible likelihood are therefore part of the inference, rather than Bayes' theorem itself supplying missing physical knowledge.

