45.03.01 · mathematical-statistics / 03-bayesian-inference

Bayes Estimation Under Loss: Posterior Mean, Median, and Mode

shipped3 tiersLean: none

Anchor (Master): Berger 1985 Statistical Decision Theory and Bayesian Analysis (2nd ed., Springer) Ch. 4 (§4.4 posterior expected loss; §4.4.4 generalized Bayes); Robert 2007 The Bayesian Choice (2nd ed., Springer) Ch. 2-4, Ch. 8 (admissibility); Lehmann & Casella 1998 Theory of Point Estimation (2nd ed., Springer) Ch. 4-5

Intuition Beginner

You have done a Bayesian analysis and you hold a posterior — a full probability distribution for the unknown quantity, given your data and your prior belief. Often, though, someone wants a single number from you. What is your one best guess for the rate, the mean, the proportion? A whole distribution is honest, but a meeting needs an answer. The question of this unit is: which single number should you report?

The answer is not "whatever feels central." It depends on how you will be penalised for being wrong. If a miss of two units is exactly four times as painful as a miss of one unit, you are being scored by squared error, and the best single number is the posterior mean. If every unit of miss costs the same, no matter the direction, you are being scored by absolute error, and the best number is the posterior median. If the only thing that matters is being exactly right — any miss at all is one full unit of pain — then you should report the posterior mode, the single most probable value.

So the same posterior yields three different "best guesses," and the loss function picks which one. This is the heart of Bayesian point estimation: first build the posterior, then choose the summary that the cost of mistakes demands. Reporting a number without saying which loss you assumed is like quoting a price without a currency.

One more idea runs through everything here. Because the posterior blends prior and data, the Bayesian estimate sits between what you believed beforehand and what the data alone would say. It is pulled — shrunk — toward the prior. When data are scarce, the prior holds more sway; when data are abundant, the data win. That gentle shrinkage is not a bug. It is the same instinct that powers ridge regression and many modern estimators.

Visual Beginner

Figure: a single skewed posterior density drawn over a horizontal axis for the unknown . Three vertical markers fall at different places. The tallest point of the curve is the mode (the peak). To its right sits the median (the value with half the area on each side). Farther right still sits the mean (the balance point of the area, dragged outward by the long right tail). For a symmetric bell the three would coincide; the skew is what separates them, and each is the right answer under a different penalty for error.

 posterior
 density
   |            .-.            mode  = peak of the curve
   |           /   \           median = splits area 50/50
   |          /     \          mean  = balance point (pulled right by the tail)
   |         /        \____
   |        /              \________
   +--------|----|----|-------------------> theta
          mode median mean
        (0-1 loss)(abs err)(squared err)
   symmetric posterior: all three coincide
   skewed posterior:    mode < median < mean (for a right skew)

Worked example Beginner

A website ran a small test: out of visitors, clicked a button. You want one number for the click rate . Before the test you were fairly open-minded, so you used a uniform prior on , which is the same as . For the beta-binomial pair, the posterior after successes and failures is .

Step 1. Posterior mean (squared-error loss). For a distribution the mean is . Here that is .

Step 2. Posterior mode (0-1 loss). For with the mode is . Here that is . Notice this equals the raw sample proportion — the mode of a flat-prior posterior is the maximum-likelihood guess.

Step 3. Posterior median (absolute-error loss). The median of has no tidy formula, but a good approximation for is , giving .

Step 4. Compare. The three summaries are mode , median , mean . They are ordered mode median mean because this posterior is skewed to the left (a long tail toward small ), which drags the mean down below the peak.

What this tells us. One posterior, three legitimate "best guesses," and the gap between them ( versus ) is the size of the decision you make when you choose a loss function. With more data the posterior tightens and the three numbers march together; with this little data, the choice of loss visibly matters.

Check your understanding Beginner

Formal definition Intermediate+

The setting is the decision problem of 45.01.01 specialised to point estimation. A parameter ranges over with prior probability measure ; data has sampling law with density against a dominating measure. The action space is and a loss scores an estimate. The joint law of disintegrates as

where is the marginal and is the posterior, the regular conditional law of given (the conditioning operation of 37.04.01, surveyed elementarily in 26.07.01).

Definition (posterior expected loss). For an action , the posterior expected loss at is

Definition (Bayes estimator). A Bayes estimator is any rule that minimises the Bayes risk of 45.01.01. Equivalently — by the characterisation theorem below — minimises the posterior expected loss for -almost every .

The three canonical losses and their minimisers:

  • Squared-error loss . The Bayes estimator is the posterior mean .
  • Absolute-error loss (scalar ). The Bayes estimator is a posterior median of .
  • - loss . As the minimiser tends to the posterior mode , the maximum a posteriori (MAP) estimate. On a finite or discrete the loss is already the posterior mode exactly.

Definition (generalized Bayes estimator). When is an improper prior — a -finite measure with , such as Lebesgue measure on or on the variance — the Bayes risk is undefined, but if the formal posterior is a proper probability measure for -almost every , the rule minimising pointwise is a generalized Bayes estimator. Generalized Bayes estimators are the bridge to many classical frequentist estimators: under the flat prior on a normal mean the generalized Bayes estimator for squared error is the sample mean.

Counterexamples to common slips

  • The MAP estimate is not coordinate-free. The mode of a density depends on the parametrisation: reparametrising multiplies the density by a Jacobian, so the MAP of and of need not satisfy . The posterior mean and median are likewise not equivariant under nonlinear , but the mode's failure is the one most often mistaken for a maximum-likelihood-style invariance.
  • A flat prior is not "no information." The improper uniform prior is not invariant under reparametrisation and can yield an improper posterior (no valid Bayes estimator at all); flatness is a choice with consequences, not the absence of one.
  • The posterior median can be a set. When the posterior has an atom or a flat stretch at probability one-half, the absolute-error minimiser is an interval of medians; any point of it is a Bayes estimator, so the Bayes estimator need not be unique even though its Bayes risk is.

Key theorem with proof Intermediate+

The organising result is that the global problem of minimising Bayes risk over all estimators reduces to a pointwise minimisation over actions, and that for the three canonical losses this pointwise problem has the mean, median, and mode as explicit solutions.

Theorem (Bayes estimators as posterior-loss minimisers). Fix a prior with finite Bayes value , and suppose the joint law disintegrates as above with marginal .

(i) (Reduction.) If for -almost every the action minimises , then is a Bayes estimator.

(ii) (Squared error.) For the unique minimiser is the posterior mean .

(iii) (Absolute error.) For scalar and , any posterior median minimises .

(iv) (0-1 / mode.) For on a discrete the minimiser is the posterior mode; for on a continuum the minimiser tends to a mode of a continuous bounded posterior density as .

Proof of (i). For any estimator , the loss integrand is non-negative, so Tonelli's theorem permits reordering the Bayes risk along the disintegration:

The Bayes risk is the -integral of the posterior expected loss at the chosen action. An integral of non-negative terms is minimised by minimising the integrand for each , which is what does. Hence for all .

Proof of (ii). Fix and write , assumed finite since . For any action ,

because the cross term by the definition of as the conditional mean (the orthogonality of the conditional-expectation projection, 37.04.01). The first term is free of and the second is minimised uniquely at . Hence the posterior mean is the unique squared-error Bayes estimator.

Proof of (iii). Fix and abbreviate the posterior . The posterior expected loss is

For , a direct computation gives

using where is differentiable and the integrated form otherwise. The integrand is for below a median and above it, so decreases up to a median and increases after; any with is a global minimiser. Convexity of guarantees the stationary condition is sufficient. So a posterior median minimises .

Proof of (iv). On discrete , , so minimising is maximising , the posterior mode. For the continuous - loss, where is the posterior density; minimising maximises the posterior mass in the band . As , dividing the mass by and passing to the limit, the maximising centre converges to a maximiser of the continuous bounded density , a posterior mode.

Bridge. This theorem builds toward the conjugate closed forms and the admissibility theory of the Advanced section, and it appears again in ridge regression as a posterior mean 45.06.03 and James-Stein shrinkage as empirical Bayes 45.06.04. This is exactly the device that converts a global optimisation over estimators into a pointwise optimisation over actions, paid for by the prior, and it generalises the single-loss Bayes-rule statement of 45.01.01 into a menu — mean, median, mode — indexed by the loss. The central insight is that the posterior is a sufficient summary for every loss at once: build it once, then read off whatever summary the cost of error demands, so that the choice of point estimate is downstream of, and separable from, the inference itself. Putting these together, the squared-error case identifies the Bayes estimator with the conditional-expectation projection of 37.04.01, which is why the posterior mean inherits the orthogonality, tower, and variance-decomposition properties of conditional expectation, and why the normal-normal Bayes estimator turns out to be dual to the ridge penalty when the prior precision is read as a regularisation weight.

Exercises Intermediate+

Advanced results Master

Conjugacy and the algebra of shrinkage

For an exponential-family likelihood a conjugate prior of the form yields a posterior in the same family with updated hyperparameters , . The three worked families instantiate one mechanism. The normal-normal posterior mean is a precision-weighted average; the beta-binomial mean adds data counts to pseudo-counts; the gamma-Poisson mean adds the sufficient statistic to the prior rate. In every case the Bayes estimator under squared error is a convex combination of a prior centre and a data summary, the data weight rising to one as information accumulates [Robert Ch. 3]. The precision-weighting view exposes the shrinkage interpretation that the next chapter formalises: the prior precision is a regularisation strength, and the normal-normal estimator is, term for term, the ridge solution of 45.06.03 with penalty . The full exponential-family conjugacy theory — including the characterisation of which families admit conjugate priors and the linearity of the posterior expectation of the mean parameter in (Diaconis-Ylvisaker) — is the content of 45.03.02.

Admissibility of proper Bayes estimators

A proper Bayes estimator with finite Bayes risk is admissible whenever it is essentially the unique minimiser, by the integration argument of the Key theorem; for squared-error loss with a proper prior of full support and continuous risk functions, admissibility holds without an explicit uniqueness hypothesis, since a strict local risk improvement spreads to a positive-prior-mass neighbourhood and would strictly lower the Bayes risk [Berger §8.1]. The converse direction — that admissible estimators are limits of Bayes estimators — is the complete-class theory of 45.01.01. The boundary cases are governed by Blyth's method and by Brown's differential-equation characterisation: an estimator is admissible if it is a limit of Bayes estimators along priors whose Bayes-risk gap to the candidate tends to zero. This is the route by which the generalized Bayes estimator for the normal mean is proved admissible in dimensions one and two — through a least-favourable sequence with — and by which Stein's inadmissibility in dimension three or more is, dually, the failure of that sequence to close the gap [Lehmann & Casella §5.2].

Generalized Bayes, impropriety, and the frequentist bridge

Improper priors enlarge the class of Bayes estimators to recover classical frequentist procedures: the flat-prior generalized Bayes estimator of a location is the sample mean, the prior reproduces the usual variance estimator's posterior, and Jeffreys priors furnish reparametrisation-invariant default rules. The price is real. An improper prior can produce an improper posterior, in which case no estimator exists; marginalisation paradoxes (Dawid-Stone-Zidek) show that improper priors can yield mutually inconsistent conditional inferences; and a generalized Bayes estimator need not be admissible, the James-Stein dominance being precisely the statement that the generalized Bayes estimator is inadmissible for under total squared-error loss [Berger §4.4]. The Bayesian-frequentist contrast crystallises at the point estimate. The frequentist evaluates an estimator by its sampling risk as a function of the fixed unknown and seeks uniform or minimax control; the Bayesian averages that risk against a prior and minimises, obtaining a single estimator computable from the posterior alone. The Bernstein-von Mises theorem of 26.07.01 reconciles them asymptotically — the posterior concentrates at the MLE with inverse-Fisher-information spread, so the squared-error Bayes estimator and the MLE agree to first order — but in finite samples the prior's shrinkage is exactly the gap, and it is this gap that ridge and James-Stein exploit on purpose.

Synthesis. The central insight is that the posterior is a loss-free sufficient summary: it is computed once from prior and data, and this is exactly the object from which every point estimate is read off, the loss function entering only at the final pointwise minimisation that selects mean, median, or mode. The foundational reason the three summaries arise from one posterior is the reduction theorem — Bayes risk is the marginal integral of posterior expected loss, so global optimality generalises into pointwise optimality and the loss merely re-weights a fixed measure. Putting these together, conjugacy makes the squared-error estimator a precision-weighted average, which is dual to the ridge penalty of 45.06.03 under the dictionary prior-precision regularisation-strength, while the multivariate sharpening of that shrinkage appears again in the James-Stein estimator of 45.06.04, whose dominance of the sample mean is the Stein inadmissibility of 45.01.01 read as empirical Bayes. The bridge is the posterior-expected-loss functional: admissibility of proper Bayes estimators, the generalized-Bayes recovery of classical rules, the conjugate shrinkage algebra, and the Bayesian-frequentist asymptotic agreement are one theory about minimising , with the prior's properness the single dial that separates a guaranteed-admissible estimator from a classical frequentist one.

Full proof set Master

Proposition 1 (reduction to posterior expected loss). For a prior with and the disintegration , is a Bayes estimator if and only if minimises for -almost every .

Proof. By Tonelli (non-negative integrand), for every , as in the Key theorem. If minimises the integrand -a.e., it minimises the integral, so it is Bayes. Conversely, suppose is Bayes but on a set with there is an action achieving strictly smaller posterior expected loss; replacing by that action on (a measurable selection exists by the measurable maximum theorem when is Polish and is jointly measurable, lower-semicontinuous in ) strictly lowers , contradicting optimality. Hence the pointwise minimisation holds -a.e.

Proposition 2 (posterior mean for squared error; minimal loss is posterior variance). For with finite posterior second moment, the unique minimiser of is , and .

Proof. Let . For any , . Taking conditional expectation, the middle term vanishes because , leaving . The first summand is , independent of ; the second is non-negative and zero only at . So is the unique minimiser and the minimal value is the posterior total variance.

Proposition 3 (posterior median for absolute error). For scalar and with finite posterior first moment, every posterior median minimises , and the minimisers form a closed interval.

Proof. With , for Fubini gives

The integrand is non-decreasing in (as is non-decreasing), negative below any median and positive above, so is convex with derivative changing sign exactly at the median set . A convex function on attains its minimum on the closed interval where its derivative vanishes or changes sign; that interval is the median set. Hence any posterior median is a minimiser and the minimiser set is a closed interval (a single point when crosses strictly).

Proposition 4 (posterior mode as 0-1 / limiting 0-K minimiser). On discrete with , the minimiser of is the posterior mode. For a posterior with bounded continuous density and , any sequence of -minimisers accumulates, as , at a maximiser of .

Proof. Discrete case: , minimised by maximising . Continuous case: , so the -minimiser maximises . By the mean-value form, uniformly on compacts as since is continuous. Let maximise and let be a subsequential limit; for any fixed , , and dividing by and passing to the limit yields . So is a mode.

Proposition 5 (admissibility of a unique proper Bayes estimator). If is Bayes for a proper prior with and every Bayes estimator for shares its risk function, then is admissible.

Proof. If dominated , integrating against gives , hence equality by minimality, so is Bayes for . By hypothesis , contradicting the strict inequality domination requires at some . No dominator exists. For squared error the uniqueness hypothesis is discharged by Proposition 2, which makes the minimiser unique -a.e.

Connections Master

  • Statistical decision theory 45.01.01 supplies the loss-risk-Bayes-risk scaffold this unit specialises: the abstract Bayes rule of that unit becomes here the concrete posterior mean, median, and mode, and the admissibility-of-unique-Bayes-rules theorem is the same integration argument, now applied to point estimation under the three canonical losses.

  • The elementary Bayesian survey 26.07.01 introduces the prior, posterior, conjugate families, and the bare assertion that the posterior mean/median/mode minimise the three losses; this unit is the decision-theoretic completion that proves those assertions and embeds them in the Bayes-risk reduction, replacing "report the posterior" with "minimise posterior expected loss for a stated loss."

  • Conditional expectation 37.04.01 is the analytic substrate: the posterior mean is the conditional expectation , so its optimality under squared error is the orthogonal-projection property of conditional expectation, and the tower property and conditional-variance decomposition transfer directly to Bayes-risk computations.

  • Ridge regression and regularised estimation 45.06.03 are the posterior mean under a Gaussian prior on coefficients: the precision-weighted shrinkage of the normal-normal Bayes estimator computed here is the ridge penalty with , so ridge is Bayes estimation under squared-error loss with an explicit conjugate prior.

  • The James-Stein estimator 45.06.04 is the multivariate, empirical-Bayes sharpening of this shrinkage: it estimates the prior variance from the data and shrinks coordinatewise, and its dominance of the sample mean for is the Stein inadmissibility of 45.01.01 read through the generalized-Bayes lens of this unit.

Historical & philosophical context Master

The reduction of Bayesian estimation to minimising posterior expected loss is implicit in Laplace's eighteenth-century work on inverse probability and explicit in the decision-theoretic reframing of Abraham Wald, whose Statistical Decision Functions [Wald 1950] (Wiley, 1950) made loss, risk, and Bayes solutions the primitive objects. David Blackwell and Meyer Girshick's Theory of Games and Statistical Decisions [Blackwell & Girshick 1954] (Wiley, 1954) gave the posterior-risk computation of Bayes solutions in the form used here, and Leonard J. Savage's The Foundations of Statistics (1954) supplied the subjective-expected-utility axioms under which minimising posterior expected loss is the unique coherent decision rule. The identification of the squared-error minimiser with the posterior mean, the absolute-error minimiser with the median, and the 0-1 minimiser with the mode is standard by the time of Raiffa and Schlaifer's Applied Statistical Decision Theory (1961), which also systematised the conjugate-family closed forms.

The admissibility theory of proper Bayes estimators was developed by Charles Stein, Lawrence Brown, and others through the 1950s-1970s; Brown's differential-equation characterisation of admissibility for the normal mean and Joseph Hodges and Erich Lehmann's earlier admissibility results frame the boundary between the dimension-one-and-two admissibility of the sample mean and Stein's 1956 inadmissibility result for . James Berger's Statistical Decision Theory and Bayesian Analysis [Berger §4.4] (1985) and Christian Robert's The Bayesian Choice [Robert Ch. 2] (1994; 2nd ed. 2007) are the standard modern treatments, the latter organising Bayesian estimation explicitly around the loss-then-posterior structure, while Lehmann and Casella's Theory of Point Estimation [Lehmann & Casella §4] (1998) integrates Bayes estimation with the classical optimality theory and the generalized-Bayes recovery of frequentist rules.

Bibliography Master

@book{wald1950statistical,
  author    = {Wald, Abraham},
  title     = {Statistical Decision Functions},
  publisher = {Wiley},
  year      = {1950}
}

@book{blackwellgirshick1954theory,
  author    = {Blackwell, David and Girshick, Meyer A.},
  title     = {Theory of Games and Statistical Decisions},
  publisher = {Wiley},
  year      = {1954}
}

@book{raiffaschlaifer1961applied,
  author    = {Raiffa, Howard and Schlaifer, Robert},
  title     = {Applied Statistical Decision Theory},
  publisher = {Harvard Business School},
  year      = {1961}
}

@book{berger1985statistical,
  author    = {Berger, James O.},
  title     = {Statistical Decision Theory and Bayesian Analysis},
  edition   = {2nd},
  series    = {Springer Series in Statistics},
  publisher = {Springer},
  year      = {1985}
}

@book{robert2007bayesian,
  author    = {Robert, Christian P.},
  title     = {The Bayesian Choice},
  edition   = {2nd},
  series    = {Springer Texts in Statistics},
  publisher = {Springer},
  year      = {2007}
}

@book{lehmanncasella1998theory,
  author    = {Lehmann, Erich L. and Casella, George},
  title     = {Theory of Point Estimation},
  edition   = {2nd},
  series    = {Springer Texts in Statistics},
  publisher = {Springer},
  year      = {1998}
}

@book{casellaberger2002statistical,
  author    = {Casella, George and Berger, Roger L.},
  title     = {Statistical Inference},
  edition   = {2nd},
  publisher = {Duxbury},
  year      = {2002}
}