- Introduced by
- Herbert Robbins (1956); Bradley Efron & Carl Morris (1973)
- Type
- Empirical Bayes estimator
What does it do?
Empirical Bayes (EB) is an estimation strategy in which the hyperparameters of a prior distribution are estimated from the observed data via the marginal likelihood, rather than specified in advance.
Herbert Robbins introduced the framework in 1956, and Bradley Efron and Carl Morris developed practical shrinkage estimators from it in 1973. The resulting posterior keeps a Bayesian structure but replaces subjective hyperparameters with data-driven ones, linking shrinkage estimation with full Bayesian inference.
The intuition behind the method
In a standard Bayesian analysis you must fix the prior before seeing the data. Empirical Bayes relaxes that requirement: it lets the data reveal what the prior should look like. Imagine estimating batting averages for thirty baseball players after only a handful of at-bats each. A naive per-player estimate is noisy. Empirical Bayes pools information across all players to estimate the population-level mean and variance, then pulls each player's estimate toward that shared mean. The pull is stronger for players with few at-bats and weaker for players with many. How strongly to shrink is set by the data, not by external judgment.
History
Herbert Robbins introduced the term 'empirical Bayes' and its framework in his 1956 paper, showing that the prior can be estimated from the compound decision problem rather than assumed known. Stein's estimator for k normal means is known to dominate the maximum-likelihood estimator when k ≥ 3; Efron and Morris (1973) showed that its positive-part version belongs to a class of good rules that have Bayesian properties and dominate the MLE, derived using empirical Bayes ideas. They also gave results for empirical linear Bayes rules in non-normal cases. Later work extended the approach to other exponential-family likelihoods, and large-scale data analysis made it routine. Efron and Hastie (2016) give a modern synthesis linking empirical Bayes to regularisation, false discovery rates and large-scale inference.
When to use it
Empirical Bayes is most useful when (1) many parallel units are estimated simultaneously, such as genes in a differential expression analysis, schools in an educational study, or small areas in survey estimation, so that pooling information across units helps; (2) no credible external prior is available, so a fully subjective prior would be hard to justify; and (3) a full hierarchical Bayes analysis with MCMC is impractical and an approximation is acceptable. It is a poor choice when only a few units are estimated, when the units are not plausibly exchangeable under one population distribution, or when the uncertainty in the hyperparameters must be carried into the intervals; in those cases a fully hierarchical analysis is preferable. The key assumptions are exchangeability of the units under the prior and enough units for the marginal likelihood to estimate the hyperparameters reliably.
Limitations and considerations
- Estimation error in η̂ is ignored, so credible intervals tend to be too narrow; the underestimation is larger when the number of units is small or the hyperparameters are poorly identified. A fully hierarchical model with a prior on η corrects this.
- The marginal likelihood identifies the hyperparameters only when there are enough parallel units; with few units the hyperparameter estimates, and hence the shrinkage, can be unstable. No universal threshold applies, so check stability or use a fully hierarchical analysis.
- Exchangeability may fail when units are structurally heterogeneous, and pooling them under one prior then distorts estimates for some subgroups.
- Nonparametric EB, which estimates the prior itself, needs still more units and is sensitive to the estimation method.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- When many units are estimated together, shrunken estimates can have lower mean-squared error than maximum-likelihood estimates; Stein's estimator dominates the MLE for k ≥ 3 normal means.
- Hyperparameters are estimated from the data, so the analyst does not set the prior's mean and variance by hand, although the prior family must still be chosen.
- Computation is often modest: normal-normal cases involve simple moment-type calculations, GLMM cases can use EM or Laplace approximations, and the posterior keeps a standard Bayesian form.
- Applied in genomics (for example variance moderation in limma and DESeq2), small-area estimation, sports statistics, insurance and educational testing.
Applications
- Differential expression analysis in genomics, where empirical Bayes variance moderation (as in limma and DESeq2) stabilises per-gene estimates across thousands of genes.
- Small-area estimation in official statistics, pooling sparse survey data across geographic areas to produce more reliable local estimates.
- Educational testing, estimating school or student effects in value-added models with many schools and limited observations per school.
- Insurance and actuarial science, where credibility theory blends individual claim history with population-level rates.
- Multiple testing in genomics and neuroimaging, through empirical Bayes estimation of local false-discovery rates.
How it works
How it works
The marginal likelihood integrates out the unobserved parameters θ under the prior family p(θ | η), leaving a function of the observed data y and the hyperparameter vector η only. This collapses the two-level model (likelihood and prior) into a single expression that can be maximised over η without knowing the true θ.
Formula
m(\mathbf{y} \mid \eta) = \int p(\mathbf{y} \mid \boldsymbol{\theta})\, p(\boldsymbol{\theta} \mid \eta)\, d\boldsymbol{\theta}The hyperparameters η (for example the prior mean and variance in a normal-normal model) are estimated by maximising the log marginal likelihood, a point-estimation step that treats η as fixed rather than random. Method-of-moments estimators are an alternative route, but they are not the same estimator as marginal-likelihood maximisation and can give different values. For generalised linear mixed models the marginal likelihood usually has no simple closed form, and it is typically handled with the EM algorithm or a Laplace approximation. The marginal likelihood must be well behaved: with improper or noninformative priors in models with many parameters it can become unbounded, and the estimate of η then degenerates.
Formula
\hat{\eta} = \arg\max_{\eta}\, \log m(\mathbf{y} \mid \eta)Once η is fixed at its estimate, the usual Bayes formula is applied as if the prior were known. The resulting approximate posterior p(θ | y, η̂) is used for point estimates, credible intervals and prediction. This approximation ignores the uncertainty in η̂ itself, a known limitation that fully hierarchical Bayes with MCMC addresses.
Formula
p(\boldsymbol{\theta} \mid \mathbf{y}) \approx p(\boldsymbol{\theta} \mid \mathbf{y},\, \hat{\eta})In the canonical normal-means problem with k means estimated simultaneously, the EB posterior mean takes the James-Stein form: each observation is pulled toward the grand mean ȳ by a factor B̂ estimated from the pooled data. Here k is the number of means, and σ² is the common sampling variance, which this form treats as known. Stein's estimator dominates the maximum-likelihood estimator in mean-squared error when k ≥ 3 (for the grand-mean form, the usual condition is stated in terms of k as in the displayed factor). The displayed B̂ can be negative when the sum of squared deviations is small; the positive-part version truncates B̂ at zero. Efron and Morris (1973) showed that the positive-part version is one member of a class of good rules with Bayesian properties that also dominate the MLE, and they derived these rules using empirical Bayes ideas.
Formula
\hat{\theta}_i^{\text{EB}} = \bar{y} + \hat{B}\,(y_i - \bar{y}), \quad \hat{B} = 1 - \frac{(k-3)\sigma^2}{\sum_i(y_i - \bar{y})^2}Common pitfalls
- Reading the EB credible interval as fully accounting for prior uncertainty; it omits the estimation error in η̂.
- Applying EB to a handful of units and expecting reliable shrinkage; the marginal likelihood cannot pin down the prior from very few units.
- Reporting the raw MLE after computing EB estimates; the shrunken posterior mean is the quantity EB delivers, and it is not the observed value.
- Assuming exchangeability without checking whether units come from qualitatively different subpopulations; shrinkage toward a single grand mean is then misleading.
- Interpreting EB-based p-values or posterior probabilities across thousands of units without a multiple-testing correction; in genomic analyses a false-discovery-rate correction is still needed after shrinkage.
- Using noninformative or improper priors in models with many parameters (for example a state-space local-level model where the number of regressors equals the number of observations): the marginal likelihood can become unbounded, the EB estimate then collapses to the boundary and produces no smoothing. Ensure the prior keeps the marginal likelihood finite, for instance by making at least some prior components informative.
Frequently asked questions
How does empirical Bayes differ from full (hierarchical) Bayes?
In full hierarchical Bayes, the hyperparameters η are assigned their own prior and integrated out along with θ, typically via MCMC. Empirical Bayes instead plugs in a point estimate η̂ obtained from the marginal likelihood and treats it as fixed. EB is usually faster and often gives similar point estimates, but its credible intervals are too narrow because they ignore uncertainty in η̂. The underestimation is larger when the number of units is small and when the hyperparameters are poorly identified; for large numbers of units the difference is often small, and for few units full hierarchical Bayes is preferable.
What is the connection between empirical Bayes and the James-Stein estimator?
The James-Stein estimator shrinks k simultaneous normal means toward a common value and dominates the MLE when k ≥ 3. Efron and Morris (1973) showed that the positive-part version is one member of a class of good rules with Bayesian properties that dominate the MLE, obtained using empirical Bayes ideas, with the shrinkage factor B̂ playing the role of an estimated prior weight. This links the two ideas formally.
When is the exchangeability assumption of empirical Bayes violated?
Exchangeability means that before seeing the data, all units' parameters are plausibly drawn from the same prior distribution. This fails when units are structurally different, for example pooling gene expression estimates for housekeeping and regulatory genes under one prior, or pooling schools in rural and urban areas when their outcome distributions are known to differ systematically. In such cases, stratified or hierarchical models with group-specific priors are more appropriate.
Can empirical Bayes be used for non-normal data?
Yes. The EB framework extends to other exponential-family likelihoods. Poisson-gamma models are a common choice for counts (the marginal is then negative binomial), beta-binomial models suit proportions, and gamma-gamma models suit skewed positive outcomes. The marginal likelihood changes form, but the steps of estimating η̂ from the marginal and then computing the posterior stay the same.
Related methods
Sources
Robbins, H. (1956). An empirical Bayes approach to statistics. In J. Neyman (Ed.), Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Vol. 1 (pp. 157–164). University of California Press.
Open DOI referenceEfron, B., & Morris, C. (1973). Stein's estimation rule and its competitors — An empirical Bayes approach. Journal of the American Statistical Association, 68(341), 117–130.
Open DOI referenceCarlin, B. P., & Louis, T. A. (2000). Bayes and Empirical Bayes Methods for Data Analysis (2nd ed.). Chapman & Hall/CRC.
ISBN: 978-1584881704Efron, B., & Hastie, T. (2016). Computer Age Statistical Inference: Algorithms, Evidence, and Data Science. Cambridge University Press.
ISBN: 978-1107149892Bayesian Econometrics (local level model and empirical Bayes with noninformative priors)