Chapter 6: Bayes Rules, Generalized Bayes, and Empirical Bayes
This chapter moves from frequentist risk to Bayesian decision theory. In the previous chapter, admissibility compared the entire risk function \(\theta\longmapsto R(\theta,\delta),\) but risk curves of two estimators often cross, so they cannot be uniformly ordered. Bayesian decision theory introduces a prior distribution on the parameter space, averages the risk function into a scalar Bayes risk, and turns the global optimization problem into pointwise minimization of posterior expected loss.
We will study Bayes risk and posterior risk, Bayes estimators under common loss functions, conjugate priors, generalized Bayes procedures, Jeffreys priors, MAP and regularization, and the basic ideas of empirical Bayes.
1. From frequentist risk to Bayes risk
1.1 Rule, estimator, and estimate
Let the sample space be \(\mathcal X\) and the action space be \(\mathcal A\). A decision rule is a measurable map
When the action \(a\) is intended to estimate some target \(g(\theta)\), the same object is also called an estimator.
After observing a particular data value \(X=x\),
is the realized number or vector and is called an estimate.
Terminology
- Bayes rule: a Bayes-optimal decision rule in a general decision problem;
- Bayes estimator: a Bayes rule when the action is used to estimate a parameter or a function \(g(\theta)\);
- Bayes estimate: the realized value \(\delta_\pi(x)\) after observing \(x\).
1.2 Frequentist risk
Given a loss function \(L(\theta,a)\), the frequentist risk is
where \(\theta\) is treated as a fixed unknown quantity and the expectation is taken only over repeated sampling
Thus frequentist theory compares the entire function
1.3 Introducing a prior distribution
Bayesian decision theory introduces a prior distribution \(\pi\) on the parameter space \(\Theta\):
The joint distribution of \((\theta,X)\) can therefore be written as
The marginal distribution of \(X\) is
Whenever a regular conditional distribution exists, the posterior distribution is denoted by
The same joint law admits the factorization
If \(P_\theta\) has density \(p(x\mid\theta)\) with respect to \(\mu\) and the prior has density \(\pi(\theta)\) with respect to \(\nu\), then
and
Since the normalizing constant \(m_\pi(x)\) does not depend on the action \(a\), a Bayes rule may equivalently be found by minimizing
2. Bayes risk and posterior risk
Definition 2.1 (Bayes risk)
For a prior \(\pi\), the Bayes risk, or integrated risk, of a decision rule \(\delta\) is
Equivalently,
A rule \(\delta_\pi\) is called a Bayes rule with respect to \(\pi\) if it minimizes \(r(\pi,\delta)\) over all decision rules.
Define the posterior expected loss
Using the two factorizations of the joint distribution,
Thus Bayes risk minimization can be performed separately for each value of \(x\).
Theorem 2.2 (Posterior-risk characterization)
Assume that at least one decision rule has finite Bayes risk. If, for \(m_\pi\)-almost every \(x\),
then \(\delta_\pi\) is a Bayes rule.
Proof idea for Theorem 2.2 (click to expand)
Since
choosing, for each observed value \(x\), an action that minimizes \(C(a,x)\) also minimizes the entire integral.
Therefore,
3. Bayes estimators under common loss functions
Let the target be \(g(\theta)\) and let the action satisfy \(a\in\mathbb R\).
3.1 Squared-error loss
Suppose
The posterior risk is
Expanding,
Differentiating with respect to \(a\) and setting the derivative equal to zero gives
Conclusion: squared-error loss
Under squared-error loss, the Bayes estimator is the posterior mean:
The minimum posterior risk is
3.2 Weighted squared-error loss
Consider
Define
Then
When
and the required moments are finite,
Moreover,
Example 3.1 (Relative squared error for a positive parameter)
Suppose the posterior, in rate parameterization, is
and the loss is
Hence
For \(k>2\),
Under ordinary squared-error loss, however, the Bayes estimator is
Important idea
The posterior distribution itself has not changed.
What changes is the loss function, and therefore the optimal action changes as well. A Bayesian decision is determined not only by the posterior distribution, but also by how the cost of error is defined.
3.3 Absolute-error loss
If
then any posterior median is a Bayes estimator; that is, \(a\) satisfies
and
Hence
3.4 0–1 loss and MAP
For a discrete parameter, consider exact 0–1 loss
The posterior risk is
Thus the Bayes rule is the posterior mode:
For a continuous parameter,
typically holds, so exact 0–1 loss is not useful. A common alternative is interval 0–1 loss,
The optimal action is the center of a length-\(2c\) interval having the largest posterior probability:
As \(c\downarrow0\), this informally leads to the posterior mode, or MAP estimator, when a posterior density exists.
Common losses and Bayes point estimators
4. Conjugate priors
Definition 4.1 (Conjugate family)
For a sampling model \(p(x\mid\theta)\), a family of priors \(\mathcal F\) is called conjugate if
for every possible observation \(x\).
The key advantage of conjugacy is algebraic closure: the prior and posterior have the same functional form, and only the hyperparameters are updated.
5. Beta–Binomial model
Let
and define
The likelihood satisfies
Take a Beta prior
with density
Then
so
Under squared-error loss,
This can be rewritten in shrinkage form:
Thus the posterior mean shrinks the sample proportion \(\bar X\) toward the prior mean
while
acts as a prior strength.
Example 5.1 (Uniform prior and Laplace smoothing)
If
then
This is Laplace smoothing. Even when \(T=0\) or \(T=n\), the estimate is not exactly \(0\) or \(1\).
6. Gamma–Poisson model (optional enrichment)
Let
The likelihood satisfies
Use the Gamma prior in rate parameterization:
Then
and therefore
Under squared-error loss,
It may also be written as
Hence it is a weighted average of the sample mean and the prior mean, with \(\beta\) behaving like a prior sample size.
7. Gamma–Exponential model: comparing three estimation principles
Let \(n\ge2\) and
Define
The likelihood is
Take the Gamma prior
whose density is proportional to
Then
We wish to estimate the reliability probability that a new component survives beyond \(t_0\):
7.1 Plug-in estimator
The maximum likelihood estimator is
By invariance of the MLE,
7.2 Minimum-risk unbiased estimator
Because
satisfies
it is an unbiased estimator of \(g(\theta)\).
Conditional on the complete sufficient statistic \(T\),
is uniform on the simplex. Rao–Blackwellization therefore gives
Under convex loss, this is the minimum-risk unbiased rule; in particular, under squared-error loss it is the UMVU estimator.
7.3 Bayes estimator
Under squared-error loss, the Bayes estimator is
Using the Laplace transform of the Gamma posterior,
The three estimators solve different optimization problems
- Plug-in estimator: substitute \(\widehat\theta_{\mathrm{MLE}}\) into the target function;
- MRU / UMVU estimator: optimize within the class of unbiased estimators;
- Bayes estimator: minimize Bayes risk under a specified prior and loss.
There is no reason for them to coincide.
8. Normal–Normal model
Let
where \(\sigma^2\) is known, and take the prior
The likelihood depends on the data only through \(\bar X\). Completing the square gives
where
and
Equivalently,
Under squared-error loss,
The posterior risk of this Bayes rule is
In this conjugate normal model, \(v_n\) does not depend on the realized data \(X\).
Shrinkage interpretation
The posterior mean is a precision-weighted average of the sample mean and the prior mean.
The data precision is
while the prior precision is
As \(n\) increases, the data receive more weight; as \(\tau^2\) becomes small, the prior becomes more concentrated and receives more weight.
9. Conjugate priors in exponential families (optional enrichment)
Consider the canonical exponential family
For i.i.d. data \(T_1,\ldots,T_n\), the likelihood is proportional to
A conjugate prior may be written as
The posterior is
Hence the hyperparameters update according to
and
Pseudo-observation interpretation
The quantity \(n_0\) behaves like an effective prior sample size, while \(t_0\) behaves like a prior mean sufficient statistic.
10. Improper priors and generalized Bayes
10.1 Improper prior
If
then \(\pi\) is called an improper prior.
It is not a probability distribution, but it may still yield a proper posterior. If
then the formal posterior
is a genuine probability distribution.
Definition 10.1 (Generalized Bayes rule)
A decision rule is called a generalized Bayes rule with respect to an improper prior if it minimizes posterior expected loss under the formal posterior generated by that prior.
10.2 Flat prior for the normal mean
Let
with \(\sigma^2\) known.
Use the improper flat prior
Then
Therefore, under squared-error loss,
is a generalized Bayes estimator.
10.3 Why is \(\bar X\) not proper Bayes?
Proposition 10.2 (\(\bar X\) is not proper Bayes)
In the unrestricted normal location model, \(\bar X\) cannot be the posterior mean under any proper prior on \(\mathbb R\), although it is generalized Bayes under Lebesgue measure.
Proof of Proposition 10.2 (click to expand)
Let
and suppose \(\pi\) is a proper prior. The marginal density of \(\bar X\) is
where \(\phi_s\) is the normal density with variance \(s^2\).
Differentiating with respect to \(x\) gives Tweedie's identity:
If
for every \(x\), then necessarily
for every \(x\).
Thus \(m_\pi(x)\) must be a positive constant on \(\mathbb R\). But a positive constant cannot integrate to \(1\) over \(\mathbb R\).
Therefore no proper prior can have posterior mean identically equal to \(x\). \(\square\)
Proper Bayes and generalized Bayes are different
The estimator
is generalized Bayes because a flat measure produces a proper posterior;
but it is not proper Bayes because no genuine probability prior produces it as the posterior mean.
Moreover, an improper prior generally does not define a finite prior-averaged Bayes risk, so being generalized Bayes does not mean minimizing a finite Bayes risk under some proper prior.
11. Jeffreys prior and reference priors
A so-called “non-informative prior” should not be interpreted as literally containing no information. A density that is flat in one parameterization will generally not remain flat after reparameterization.
A common invariant default in one-dimensional problems is Jeffreys prior.
Definition 11.1 (Jeffreys prior)
If \(I(\theta)\) is the Fisher information, define
Its main motivation is reparameterization invariance. If
is a smooth one-to-one transformation, then Jeffreys prior satisfies
11.1 Bernoulli parameter
For \(n\) Bernoulli observations,
Therefore
This is exactly the
prior.
If
then the posterior is
11.2 Location family
For
the Fisher information is constant in \(\theta\), so
11.3 Scale family
For
the Fisher information is proportional to \(1/\sigma^2\), so
This prior is usually improper but is invariant under scale transformations.
11.4 Multivariate parameter
If
then Jeffreys prior takes the form
where \(I(\theta)\) is the Fisher information matrix.
11.5 Reference priors
The motivation of reference priors is related to Jeffreys priors: one seeks a prior that asymptotically maximizes the amount of information gained from prior to posterior, commonly measured through Kullback–Leibler divergence.
In regular one-parameter problems, the reference prior often agrees with Jeffreys prior.
In multiparameter problems, especially with nuisance parameters, the resulting reference prior may depend on
- which component is the parameter of interest;
- the ordering used in the construction.
Required caution
Invariance alone does not guarantee
- posterior propriety;
- good finite-sample risk;
- consistency in models with many nuisance parameters.
In applications one should still check posterior propriety, prior sensitivity, and robustness.
12. MAP and regularization (optional enrichment)
Consider the Gaussian linear model
Suppose the prior density has the form
The log posterior satisfies
Hence the MAP estimator is equivalent to minimizing
Therefore:
-
if \(P(\beta)=\frac12\|\beta\|_2^2,\) we obtain ridge regression;
-
if \(P(\beta)=\|\beta\|_1,\) we obtain lasso-type soft thresholding;
-
an \(\ell_0\) penalty yields hard thresholding but is computationally harder.
12.1 Spike-and-slab prior
In a Gaussian sequence model,
one may use
where \(\delta_0\) is a point mass at zero and \(\gamma\) is a continuous distribution.
Such a spike-and-slab prior explicitly encodes sparsity and can produce shrinkage or thresholding through the posterior median or MAP.
13. Empirical Bayes: learning a prior from an ensemble
In ordinary Bayesian analysis, the prior \(\nu\) is specified before using the data for the current decision.
In empirical Bayes (EB), an ensemble of related observations is used to estimate
- the prior distribution \(\nu\);
- its hyperparameters;
- or the marginal distribution required by the Bayes rule.
The estimated object is then plugged into the oracle Bayes rule.
Suppose
are i.i.d. from the hierarchical model
13.1 Historical-data EB
Use historical observations
to estimate \(\nu\), and then apply the fitted Bayes rule to a new observation \(X_{m+1}\).
Conditional on the historical sample, this resembles an ordinary Bayes analysis using a fitted prior.
13.2 Compound / parallel EB
Observe many current units
estimate the common mixing distribution from the entire ensemble, and then estimate all of
using that fitted distribution.
This is the large-scale setting behind many modern shrinkage and multiple-testing methods.
13.3 Parametric and nonparametric EB
Empirical Bayes may be
- parametric EB: for example, assume a normal prior and estimate only its mean and variance;
- nonparametric EB: estimate an unrestricted mixing distribution.
An important idea is that estimating the entire prior \(\nu\) may be unnecessary. If the oracle Bayes rule depends only on the marginal distribution \(f_\nu\), one may estimate \(f_\nu\) directly.
13.4 Poisson empirical Bayes
Suppose
The marginal mass function is
The posterior mean is
Since
we obtain Robbins' identity:
Thus empirical Bayes can estimate
directly from a large ensemble and plug them into this ratio.
What does empirical Bayes change?
Because \(\widehat\nu\) is itself data-dependent, \(\delta_{\widehat\nu}\) is generally not a Bayes rule with respect to any fixed prior.
Reusing the same data both to learn the prior and to estimate the current parameters can introduce
- hyperparameter uncertainty;
- overconfidence;
- additional risk-analysis issues.
Possible responses include sample splitting, cross-fitting, explicit risk analysis, or full hierarchical Bayes.
The benefit is equally important: EB can learn the degree of pooling or shrinkage adaptively from the observed population.
14. Why does Bayes enter naturally here?
The logic of the preceding lectures can be summarized as
Admissibility removes only rules that are uniformly dominated, but it usually does not identify a unique procedure among the many remaining admissible rules.
A prior \(\pi\) assigns weights to the parameter space and converts the function-valued comparison
into the scalar criterion
14.1 Two viewpoints on Bayes
Decision-theoretic viewpoint
The prior need not initially be interpreted as a subjective belief. It may instead be regarded as a weighting distribution over the parameter space.
From this viewpoint, Bayesian procedures
- turn a partial ordering of risk functions into scalar optimization;
- generate candidates for admissible and complete classes;
- provide lower bounds for minimax risk and connect to least-favorable priors;
- explain why shrinkage and regularization arise naturally.
Statistical-inference viewpoint
The prior represents information available before the current experiment:
The likelihood supplies information from the current data, and Bayes' formula combines the two into the posterior
The posterior may then be used for
- point estimation;
- uncertainty quantification;
- prediction;
- subsequent scientific decision making.
14.2 Why does weighted risk become posterior risk?
By the tower property,
Therefore,
This is the bridge between the decision-theoretic and Bayesian-inference viewpoints.
15. What Bayesian methods contribute to statistics
Bayesian ideas play several distinct roles in statistics:
- Prior information: incorporate previous studies, expert knowledge, physical restrictions, or external data.
- Regularization and pooling: priors naturally produce shrinkage and allow related parameters to share information.
- Prediction and uncertainty: posterior and posterior-predictive distributions propagate parameter uncertainty.
- Hierarchical and latent-variable models: random effects, mixtures, missing data, and latent states can be handled in a unified probability model.
- Scientific decision making: the posterior may be combined with asymmetric medical, economic, or scientific losses.
- Frequentist theory: Bayes and generalized-Bayes constructions are useful for proving admissibility, minimaxity, and complete-class results.
- Empirical Bayes: an ensemble of related problems can be used to learn prior structure and adapt the amount of pooling.
Bayesian analysis is not automatically correct
Conclusions may be sensitive to
- the prior;
- the likelihood;
- hierarchical modeling assumptions.
Posterior propriety, prior sensitivity, calibration, and robustness should therefore be checked.
16. Chapter summary
The main conclusions of this chapter are:
- Bayes risk is the frequentist risk averaged over a prior distribution.
- A Bayes rule can be obtained by minimizing posterior expected loss pointwise.
- Squared-error, absolute-error, and 0–1 losses lead respectively to the posterior mean, median, and mode/MAP.
- Conjugate priors preserve functional form from prior to posterior and can be interpreted in terms of pseudo-observations.
- The Beta–Binomial, Gamma–Poisson, and Normal–Normal models all illustrate the shrinkage structure of posterior means.
- The Gamma–Exponential example clearly distinguishes plug-in, MRU/UMVU, and Bayes optimization principles.
- Improper priors can generate generalized Bayes rules but must not be confused with proper Bayes procedures.
- In the normal location model, \(\bar X\) is generalized Bayes under a flat prior but is not Bayes under any proper prior.
- Jeffreys prior is constructed from Fisher information and is motivated primarily by invariance under reparameterization.
- MAP is closely connected to penalized optimization, and ridge, lasso, and sparse priors all admit Bayesian interpretations.
- Empirical Bayes learns a prior or marginal distribution from an ensemble of related observations and thereby adapts the amount of shrinkage.
- Bayesian decision theory is not a replacement for frequentist risk analysis; it is a natural extension when risk curves cannot be uniformly ordered.