Moment matching for a beta prior turns a desired mean and variance for an unknown probability into the parameters of a beta distribution prior. Choose and
Solving the beta distribution mean and variance identities gives
The strict upper bound on the variance makes , so both parameters are positive. Substitution gives mean and variance exactly. A smaller specified variance at fixed mean produces a more concentrated prior distribution.
For example, a desired prior mean and variance give , hence the beta distribution prior . With the same mean and variance , the calculation instead gives and the broader beta distribution prior . Both appear in the concentration diagram above.
The excluded boundary cases have clear meanings. Zero variance would require with certainty, not a beta distribution with finite positive parameters. At the other boundary, any random variable satisfies , hence variance at most ; equality requires to take only the endpoint values zero and one. This is a Bernoulli distribution, not a beta distribution. Thus cannot be matched by positive finite parameters, and or is also excluded.
After observing Bernoulli trials, the Beta-binomial conjugacy makes the posterior mean a weighted average of the prior mean and observed binomial proportion :
This formula gives a precise interpretation as the prior's weight relative to the sample size in this posterior mean. It does not require fictitious observed counts: the beta distribution parameters can be any positive real numbers. For the eight-head, two-tail example above, and , so the posterior mean is .
// Target: statistical-inference.bigb
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 gives
Conditional 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.
Prior probability Created 2026-09-24 Updated 2026-10-14
Prior probability describes uncertainty before the current observations are incorporated. For a statistical parameter , a prior distribution assigns probabilities to its possible ranges, conditional on background information and a statistical model. A continuous prior density specifies these probabilities through integration:
Here the probability density function is relative to Lebesgue measure ; a discrete prior distribution instead uses a probability mass function and sums. Density at one point is not the probability of that point. A nonnegative kernel with infinite total mass is an improper prior, whose use requires a separate check of posterior propriety.
For the coin model in Bayesian statistics, the beta distribution has prior density on . Its mean is and its variance is . It favors moderate heads probabilities without ruling out values near zero or one. For example,
The prior curve in Bayesian posterior makes this preference visible; moment matching for a beta prior explains how to choose a beta distribution from a desired mean and variance.
A prior distribution lets earlier evidence or elicited knowledge contribute to statistical inference when the current sample size is limited. It also exposes assumptions that can be checked by prior elicitation and a prior predictive check. Before the same eight heads and two tails, a uniform prior would give posterior mean , compared with under : the observations do not uniquely determine a Bayesian posterior. Even a uniform prior makes a choice of parameter coordinates; its child article explains why changing coordinates can destroy uniformity.