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.
Jeffreys prior for a Bernoulli parameter 2026-10-25
For a Bernoulli random variable with success probability , the score function is . The expected value of its square is , since the variance of is . The Jeffreys prior is therefore the proper beta distribution , also called the arcsine distribution. The Euler beta function has , giving the stated normalized prior density.
After successes in independent Bernoulli trials, Beta-binomial conjugacy gives posterior distribution and posterior predictive probability of one further success. Although its prior density diverges at both boundaries, its integral is finite.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 36 1 e Solution Created 2026-10-03 Updated 2026-10-14
Before collecting any observations, a uniform success-chance prior distribution givesThus the uniform-count predictive property assigns equal probability to every possible number of successes in a fixed-size batch under the prior predictive distribution. It is uniform over counts, not over all ordered binary sequences. After observing successes in trials, its familiar one-step posterior predictive probability is ; the count-uniform property refers to prediction before those data are observed.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 e Solution Created 2026-10-03 Updated 2026-10-06
The posterior predictive probability averages the conditional probability over the Bayesian posterior. Using its gamma distribution density,For fixed and ,Consequently , and both tend to . This is reasonable because the posterior mean tends to the observed rate and the posterior variance tends to zero. Averaging then approaches evaluating it at the estimated rate: with abundant observations, predictive uncertainty about the rate vanishes.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 1 f Solution Created 2026-10-03 Updated 2026-10-06
There is a notation problem here. The posterior predictive probability calculated above is already a fixed number conditional on . Literally,No simulation is needed for that interpretation. The known exposure is also necessary, despite its omission from this part's list of inputs.
The natural uncertain quantity is instead . For its posterior probability of being below one half, draw the rate from its gamma distribution Bayesian posterior and average an indicator. Rough BUGS code isThe monitored average of
model {
lambda ~ dgamma(a+n, b+T)
q <- exp(-lambda)
belowHalf <- step(lambda-log(2))
}belowHalf estimates , equivalently . The equality boundary has zero probability. This code samples the already updated Bayesian posterior; adding the count likelihood function again would count the data twice. Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 3 20H c Solution Created 2026-09-24 Updated 2026-10-06
The specified gamma distribution uses shape and rate . Multiplying its density by the Poisson likelihood gives a posterior density proportional to . Thus the conjugate prior calculation givesFor squared-error loss, the posterior expected loss isIt is minimized at the posterior mean, so the Bayes estimator isFor a fresh conditionally independent Poisson observation, the posterior predictive probability of zero is the posterior expectation of . Evaluating the gamma integral givesThe samples are independent conditional on ; integrating out the uncertain common parameter produces the predictive probability above.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 2 c Solution Created 2026-10-03 Updated 2026-10-05
For the plug-in Neyman allocation, the estimated Bernoulli distribution variances are and , soThis uses the target ratio directly as the allocation odds; a procedure that actively corrects previous allocation imbalances would need an additional rule.
For the randomized play-the-winner rule RPW, return the drawn ball and add one ball of the same treatment after a success or of the opposite treatment after a failure. Treatment 0 has three successes and two failures, and treatment 1 has one success and three failures. The urn therefore has treatment-0 balls and treatment-1 balls. HenceFor dynamic programming with only the final patient left, there is no future value from learning. Independent uniform prior distributions and Beta-binomial conjugacy give posteriors and . Their posterior predictive probabilities of success are and . The optimal terminal action therefore givesThis is optimal for expected successes with no imposed lower bound on the randomization probabilities.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 216 6 a Solution Created 2026-10-03 Updated 2026-10-05
Let . To distinguish the number of posterior draws from the training-sample size, write it as ; in the question's sample notation . The Monte Carlo estimator of the requested posterior mean isFor independent exact posterior draws it is unbiased, andThe features are conditioned on as fixed data. The estimated probability concerns a future genuine banknote under the posterior predictive probability, not an indicator sampled from that predictive distribution.
The problem of induction concerns the justification of inferences which go beyond what their premises deductively entail. Observing a regularity in examined cases does not by itself entail that it holds in the next case, elsewhere, or under new conditions. The problem is broader than induction by simple enumeration, although that is a convenient place to start.
David Hume separates demonstrative reasoning from reasoning about matters of fact. Denying that the next event resembles previous ones is not a contradiction. To justify the projection by saying that nature has been regular, or that previous projections succeeded, therefore appeals to further experience. Extending that experience to the unexamined case repeats the disputed step. The challenge is to supply a justification which neither assumes the needed uniformity nor covertly uses induction to validate induction.[ref]
An Enquiry Concerning Human Understanding by David Hume. Section IV, part II: whether an inference from experience can be founded on reasoning without circularity
The scientific content is easy to expose with a finite data set. Suppose measured pairs are and . Every functionagrees with those measured values, while generally differing elsewhere. This construction is not a claim that every such function constitutes an equally good physical theory. Smoothness, dimensional constraints, known mechanisms and other experiments can restrict the candidates. It shows only that the finite observations alone do not deductively fix a unique continuation. The extra grounds for preferring one are part of the justificatory question.
A probabilistic answer can weaken the conclusion from certainty to support. For Bernoulli trials independent conditional on a common unknown success chance , a uniform prior distribution gives the posterior density after successes. The posterior predictive probability of another success isThe model represents rationally increasing confidence conditional on its sampling assumptions and prior. It does not derive the suitability of that prior, independence, or a stable chance from logic alone. It also distinguishes prediction from a universal generalization: under this continuous prior, both before and after any finite number of successes. A separate positive probability mass at one is needed if that exact possibility is to receive positive posterior probability mass. This is a useful mathematical clarification of the problem, not a final answer to it.
Karl Popper's falsificationism offers a different response. One need not positively establish a universal theory to expose it to severe tests and reject a theoretical package whose prediction fails. The deductive inference is valid. Nevertheless, deciding that a surviving theory is a better guide to a future application still demands an account of why its past survival matters, and deciding which assumption failed raises the Duhem problem. Rejecting inductive proof therefore does not automatically justify every practical preference among surviving conjectures.[ref]
Science: Conjectures and Refutations by Karl Popper. Chapter 1: conjectures, attempts at refutation and the difference between support and conclusive verification
A pragmatic defence instead asks what procedure is sensible when predictions must be made. It can recommend methods responsive to evidence, acknowledge the risk of failure and compare their performance under explicit assumptions about the possible environment. Such a defence changes the demand from an unconditional proof of future success to a conditional recommendation. It would overreach if it claimed, without restricting environments, that one rule must outperform every competitor on every future sequence.
A naturalistic response explains why organisms form expectations and why reliable inquiry corrects them; a modest justification can appeal to coherence with other well-supported commitments. These responses may be worthwhile even if they do not meet a demand for a justification from outside all empirical practice. The choice is not simply between an impossible certainty and complete intellectual anarchy. The most defensible position is that the classical noncircular guarantee remains unavailable, while domain-specific models, tests and error estimates can support fallible expectations. Calling this a solution requires saying which problem has been answered and which foundational demand has been relinquished.
Conditional on , the future Bernoulli random variable is independent of the observed statistical sample and has success probability . Its posterior predictive probability is therefore the posterior mean of . Put and . Thenusing the beta-gamma identity and the Gamma function recurrence. HenceThe whole posterior predictive distribution of is the Bernoulli distribution with this success probability.
