Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Empirical Bayes method
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Bayesian statistical inference method in which the prior distribution is estimated from the data}} {{Bayesian statistics}} '''Empirical Bayes methods''' are procedures for [[statistical inference]] in which the [[Prior probability|prior probability distribution]] is estimated from the data. This approach stands in contrast to standard [[Bayesian probability|Bayesian methods]], for which the prior distribution is fixed before any data are observed. Despite this difference in perspective, empirical Bayes may be viewed as an approximation to a fully Bayesian treatment of a [[hierarchical Bayes model|hierarchical model]] wherein the parameters at the highest level of the hierarchy are set to their most likely values, instead of being integrated out.<ref>{{cite book |first1=Bradley P. |last1=Carlin |first2=Thomas A. |last2=Louis |chapter=Empirical Bayes: Past, Present, and Future |pages=312–318 |title=Statistics in the 21st Century |editor-first=Adrian E. |editor-last=Raftery |editor2-first=Martin A. |editor2-last=Tanner |editor3-first=Martin T. |editor3-last=Wells |location= |publisher=Chapman & Hall |year=2002 |isbn=1-58488-272-7 }}</ref> Empirical Bayes, also known as '''maximum [[marginal likelihood]]''',<ref name="Bishop05"/> represents a convenient approach for setting [[Hyperparameter (Bayesian statistics)|hyperparameters]], but has been mostly supplanted by fully Bayesian hierarchical analyses since the 2000s with the increasing availability of well-performing computation techniques.{{Citation needed|date=February 2025}} It is still commonly used, however, for variational methods in Deep Learning, such as [[Variational autoencoder|variational autoencoders]], where latent variable spaces are high-dimensional. ==Introduction== Empirical Bayes methods can be seen as an approximation to a fully Bayesian treatment of a [[hierarchical Bayes model]]. In, for example, a two-stage hierarchical Bayes model, observed data <math>y = \{y_1, y_2, \dots, y_n\}</math> are assumed to be generated from an unobserved set of parameters <math>\theta = \{\theta_1, \theta_2, \dots, \theta_n\}</math> according to a probability distribution <math>p(y\mid\theta)\,</math>. In turn, the parameters <math>\theta</math> can be considered samples drawn from a population characterised by [[Hyperparameter (Bayesian statistics)|hyperparameters]] <math>\eta\,</math> according to a probability distribution <math>p(\theta\mid\eta)\,</math>. In the hierarchical Bayes model, though not in the empirical Bayes approximation, the hyperparameters <math>\eta\,</math> are considered to be drawn from an unparameterized distribution <math>p(\eta)\,</math>. Information about a particular quantity of interest <math>\theta_i\;</math> therefore comes not only from the properties of those data <math>y</math> that directly depend on it, but also from the properties of the population of parameters <math>\theta\;</math> as a whole, inferred from the data as a whole, summarised by the hyperparameters <math>\eta\;</math>. Using [[Bayes' theorem]], :<math> p(\theta\mid y) = \frac{p(y \mid \theta) p(\theta)}{p(y)} = \frac {p(y \mid \theta)}{p(y)} \int p(\theta \mid \eta) p(\eta) \, d\eta \,. </math> In general, this integral will not be tractable [[Integral#Analytical|analytically]] or [[Symbolic integration|symbolically]] and must be evaluated by [[Integral#Numerical|numerical]] methods. Stochastic (random) or deterministic approximations may be used. Example stochastic methods are [[Markov chain Monte Carlo|Markov Chain Monte Carlo]] and [[Monte Carlo integration|Monte Carlo]] sampling. Deterministic approximations are discussed in [[numerical integration|quadrature]]. Alternatively, the expression can be written as :<math> p(\theta\mid y) = \int p(\theta\mid\eta, y) p(\eta \mid y) \; d \eta = \int \frac{p(y \mid \theta) p(\theta \mid \eta)}{p(y \mid \eta)} p(\eta \mid y) \; d \eta\,, </math> and the final factor in the integral can in turn be expressed as :<math> p(\eta \mid y) = \int p(\eta \mid \theta) p(\theta \mid y) \; d \theta . </math> These suggest an iterative scheme, qualitatively similar in structure to a [[Gibbs sampler]], to evolve successively improved approximations to <math>p(\theta\mid y)\;</math> and <math>p(\eta\mid y)\;</math>. First, calculate an initial approximation to <math>p(\theta\mid y)\;</math> ignoring the <math>\eta</math> dependence completely; then calculate an approximation to <math>p(\eta\mid y)\;</math> based upon the initial approximate distribution of <math>p(\theta\mid y)\;</math>; then use this <math>p(\eta\mid y)\;</math> to update the approximation for <math>p(\theta\mid y)\;</math>; then update <math>p(\eta\mid y)\;</math>; and so on. When the true distribution <math>p(\eta\mid y)\;</math> is sharply peaked, the integral determining <math>p(\theta\mid y)\;</math> may be not much changed by replacing the probability distribution over <math>\eta\;</math> with a point estimate <math>\eta^{*}\;</math> representing the distribution's peak (or, alternatively, its mean), :<math> p(\theta\mid y) \simeq \frac{p(y \mid \theta) \; p(\theta \mid \eta^{*})}{p(y \mid \eta^{*})}\,. </math> With this approximation, the above iterative scheme becomes the [[EM algorithm]]. The term "Empirical Bayes" can cover a wide variety of methods, but most can be regarded as an early truncation of either the above scheme or something quite like it. Point estimates, rather than the whole distribution, are typically used for the parameter(s) <math>\eta\;</math>. The estimates for <math>\eta^{*}\;</math> are typically made from the first approximation to <math>p(\theta\mid y)\;</math> without subsequent refinement. These estimates for <math>\eta^{*}\;</math> are usually made without considering an appropriate prior distribution for <math>\eta</math>. ==Point estimation== <!-- where the "INTUITIVE", not-algebraic examples!????? --> ===Robbins' method: non-parametric empirical Bayes (NPEB)=== [[Herbert Robbins|Robbins]]<ref name=Robbins/> considered a case of sampling from a [[mixture distribution|mixed distribution]], where probability for each <math>y_i</math> (conditional on <math>\theta_i</math>) is specified by a [[Poisson distribution]], :<math>p(y_i\mid\theta_i)={{\theta_i}^{y_i} e^{-\theta_i} \over {y_i}!}</math> while the prior on ''θ'' is unspecified except that it is also [[i.i.d.]] from an unknown distribution, with [[cumulative distribution function]] <math>G(\theta)</math>. Compound sampling arises in a variety of statistical estimation problems, such as accident rates and clinical trials.{{Citation needed|date=February 2012}} We simply seek a point prediction of <math>\theta_i</math> given all the observed data. Because the prior is unspecified, we seek to do this without knowledge of ''G''.<ref name=CL/> Under [[squared error loss]] (SEL), the [[conditional expectation]] E(''θ''<sub>''i''</sub> | ''Y''<sub>''i''</sub> = ''y''<sub>''i''</sub>) is a reasonable quantity to use for prediction. For the Poisson compound sampling model, this quantity is :<math>\operatorname{E}(\theta_i\mid y_i) = {\int (\theta^{y_i+1} e^{-\theta} / {y_i}!)\,dG(\theta) \over {\int (\theta^{y_i} e^{-\theta} / {y_i}!)\,dG(\theta}) }.</math> This can be simplified by multiplying both the numerator and denominator by <math>({y_i}+1)</math>, yielding :<math> \operatorname{E}(\theta_i\mid y_i)= {{(y_i + 1) p_G(y_i + 1) }\over {p_G(y_i)}},</math> where ''p<sub>G</sub>'' is the marginal probability mass function obtained by integrating out ''θ'' over ''G''. To take advantage of this, Robbins<ref name=Robbins/> suggested estimating the marginals with their empirical frequencies (<math> \#\{Y_j\}</math>), yielding the fully non-parametric estimate as: :<math> \operatorname{E}(\theta_i\mid y_i) \approx (y_i + 1) { {\#\{Y_j = y_i + 1\}} \over {\#\{ Y_j = y_i\}} },</math> where <math>\#</math> denotes "number of". (See also [[Good–Turing frequency estimation]].) ;Example – Accident rates Suppose each customer of an insurance company has an "accident rate" Θ and is insured against accidents; the probability distribution of Θ is the underlying distribution, and is unknown. The number of accidents suffered by each customer in a specified time period has a [[Poisson distribution]] with expected value equal to the particular customer's accident rate. The actual number of accidents experienced by a customer is the observable quantity. A crude way to estimate the underlying probability distribution of the accident rate Θ is to estimate the proportion of members of the whole population suffering 0, 1, 2, 3, ... accidents during the specified time period as the corresponding proportion in the observed random sample. Having done so, it is then desired to predict the accident rate of each customer in the sample. As above, one may use the [[conditional probability|conditional]] [[expected value]] of the accident rate Θ given the observed number of accidents during the baseline period. Thus, if a customer suffers six accidents during the baseline period, that customer's estimated accident rate is 7 × [the proportion of the sample who suffered 7 accidents] / [the proportion of the sample who suffered 6 accidents]. Note that if the proportion of people suffering ''k'' accidents is a decreasing function of ''k'', the customer's predicted accident rate will often be lower than their observed number of accidents. This [[Shrinkage (statistics)|shrinkage]] effect is typical of empirical Bayes analyses. === Gaussian === Suppose <math>X, Y</math> are random variables, such that <math>Y</math> is observed, but <math>X</math> is hidden. The problem is to find the expectation of <math>X</math>, conditional on <math>Y</math>. Suppose further that <math>Y|X \sim \mathcal N(X, \Sigma)</math>, that is, <math>Y = X+ Z</math>, where <math>Z</math> is a [[Multivariate normal distribution|multivariate gaussian]] with variance <math>\Sigma</math>. Then, we have the formula <math display="block">\Sigma \nabla_y \rho(y|x) = \rho(y|x) (x-y)</math>by direct calculation with the probability density function of multivariate gaussians. Integrating over <math>\rho(x)dx</math>, we obtain<math display="block">\Sigma \nabla_y \rho(y) = (\mathbb{E}[x|y] - y) \rho(y) \implies \mathbb{E}[x|y] = y + \Sigma \nabla_y \ln \rho(y)</math>In particular, this means that one can perform Bayesian estimation of <math>X</math> without access to either the prior density of <math>X</math> or the posterior density of <math>Y</math>. The only requirement is to have access to the [[Score (statistics)|score function]] of <math>Y</math>. This has applications in [[Diffusion model#Score-based generative model|score-based generative modeling]].<ref>{{Cite journal |last=Saremi |first=Saeed |last2=Hyvärinen |first2=Aapo |date=2019 |title=Neural Empirical Bayes |url=https://www.jmlr.org/papers/v20/19-216.html |journal=Journal of Machine Learning Research |volume=20 |issue=181 |pages=1–23 |issn=1533-7928}}</ref> ===Parametric empirical Bayes=== If the likelihood and its prior take on simple parametric forms (such as 1- or 2-dimensional likelihood functions with simple [[conjugate prior]]s), then the empirical Bayes problem is only to estimate the marginal <math>m(y\mid\eta)</math> and the hyperparameters <math>\eta</math> using the complete set of empirical measurements. For example, one common approach, called parametric empirical Bayes point estimation, is to approximate the marginal using the [[maximum likelihood estimate]] (MLE), or a [[Moment (mathematics)|moments]] expansion, which allows one to express the hyperparameters <math>\eta</math> in terms of the empirical mean and variance. This simplified marginal allows one to plug in the empirical averages into a point estimate for the prior <math>\theta</math>. The resulting equation for the prior <math>\theta</math> is greatly simplified, as shown below. There are several common parametric empirical Bayes models, including the [[Poisson–gamma model]] (below), the [[Beta-binomial model]], the [[Gaussian–Gaussian model]], the [[Dirichlet-multinomial distribution|Dirichlet-multinomial model]], as well specific models for [[Bayesian linear regression]] (see below) and [[Bayesian multivariate linear regression]]. More advanced approaches include [[hierarchical Bayes model]]s and [[Bayesian mixture model]]s. ====Gaussian–Gaussian model==== For an example of empirical Bayes estimation using a Gaussian-Gaussian model, see [[Bayes_estimator#Empirical_Bayes_estimators|Empirical Bayes estimators]]. ====Poisson–gamma model==== For example, in the example above, let the likelihood be a [[Poisson distribution]], and let the prior now be specified by the [[conjugate prior]], which is a [[gamma distribution]] (<math>G(\alpha,\beta)</math>) (where <math>\eta = (\alpha,\beta)</math>): :<math> \rho(\theta\mid\alpha,\beta) \, d\theta = \frac{(\theta/\beta)^{\alpha-1} \, e^{-\theta / \beta} }{\Gamma(\alpha)} \, (d\theta/\beta) \text{ for } \theta > 0, \alpha > 0, \beta > 0 \,\! .</math> It is straightforward to show the [[Posterior probability|posterior]] is also a gamma distribution. Write :<math> \rho(\theta\mid y) \propto \rho(y\mid \theta) \rho(\theta\mid\alpha, \beta) ,</math> where the marginal distribution has been omitted since it does not depend explicitly on <math>\theta</math>. Expanding terms which do depend on <math>\theta</math> gives the posterior as: :<math> \rho(\theta\mid y) \propto (\theta^y\, e^{-\theta}) (\theta^{\alpha-1}\, e^{-\theta / \beta}) = \theta^{y+ \alpha -1}\, e^{- \theta (1+1 / \beta)} . </math> So the posterior density is also a [[gamma distribution]] <math>G(\alpha',\beta')</math>, where <math>\alpha' = y + \alpha</math>, and <math>\beta' = (1+1 / \beta)^{-1}</math>. Also notice that the marginal is simply the integral of the posterior over all <math>\Theta</math>, which turns out to be a [[negative binomial distribution]]. To apply empirical Bayes, we will approximate the marginal using the [[maximum likelihood]] estimate (MLE). But since the posterior is a gamma distribution, the MLE of the marginal turns out to be just the mean of the posterior, which is the point estimate <math>\operatorname{E}(\theta\mid y)</math> we need. Recalling that the mean <math>\mu</math> of a gamma distribution <math>G(\alpha', \beta')</math> is simply <math>\alpha' \beta'</math>, we have :<math> \operatorname{E}(\theta\mid y) = \alpha' \beta' = \frac{\bar{y}+\alpha}{1+1 / \beta} = \frac{\beta}{1+\beta}\bar{y} + \frac{1}{1+\beta} (\alpha \beta). </math> To obtain the values of <math>\alpha</math> and <math>\beta</math>, empirical Bayes prescribes estimating mean <math>\alpha\beta</math> and variance <math>\alpha\beta^2</math> using the complete set of empirical data. The resulting point estimate <math> \operatorname{E}(\theta\mid y) </math> is therefore like a weighted average of the sample mean <math>\bar{y}</math> and the prior mean <math>\mu = \alpha\beta</math>. This turns out to be a general feature of empirical Bayes; the point estimates for the prior (i.e. mean) will look like a weighted averages of the sample estimate and the prior estimate (likewise for estimates of the variance). ==See also== * [[Bayes estimator]] * [[Bayesian network]] * [[Hyperparameter (Bayesian statistics)|Hyperparameter]] * [[Hyperprior]] * [[Best linear unbiased prediction]] * [[Robbins lemma]] * [[Spike-and-slab variable selection]] ==References== {{More footnotes|date=February 2012}} {{reflist|refs= <ref name="Bishop05">C.M. Bishop (2005). ''Neural networks for pattern recognition''. Oxford University Press {{ISBN|0-19-853864-2}}</ref> <ref name=Robbins>{{cite journal |last=Robbins|first=Herbert|author-link=Herbert Robbins |year=1956 |title=An Empirical Bayes Approach to Statistics |journal=Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Contributions to the Theory of Statistics |series=Springer Series in Statistics |pages=157–163 |doi=10.1007/978-1-4612-0919-5_26 |isbn=978-0-387-94037-3 |url=https://link.springer.com/chapter/10.1007/978-1-4612-0919-5_26 |mr=0084919 |url-access=subscription}}</ref> <ref name=CL>{{cite book|last=Carlin|first=Bradley P.|author2=Louis, Thomas A.|title=Bayes and Empirical Bayes Methods for Data Analysis|publisher=Chapman & Hall/CRC|year=2000|edition=2nd|isbn=978-1-58488-170-4|pages= Sec. 3.2 and Appendix B }}</ref> }} ==Further reading== * {{cite book|author1=Peter E. Rossi|author2=Greg M. Allenby|author3=Rob McCulloch|title=Bayesian Statistics and Marketing|url=https://books.google.com/books?id=GL8VS9i_B2AC&q=%22Empirical+Bayes%22|date=14 May 2012|publisher=John Wiley & Sons|isbn=978-0-470-86368-8}} * {{cite journal |last=Casella|first=George |title=An Introduction to Empirical Bayes Data Analysis |journal=American Statistician |volume=39|issue=2|date=May 1985|pages=83–87 | mr = 0789118 |doi=10.2307/2682801 |jstor=2682801 |hdl=1813/32886 |url=http://ecommons.cornell.edu/bitstream/1813/32886/1/BU-787-M.Revised.pdf |hdl-access=free }} * {{cite journal |last=Nikulin|first=Mikhail |title=Bernstein's regularity conditions in a problem of empirical Bayesian approach |journal=Journal of Soviet Mathematics |volume=36|issue=5|year=1987|pages=596–600 |doi=10.1007/BF01093293 |s2cid=122405908 |doi-access=free}} ==External links== * [https://web.archive.org/web/20060524004306/http://ca.geocities.com/hauer@rogers.com/Pubs/TRBpaper.pdf Use of empirical Bayes Method in estimating road safety (North America)] * [https://web.archive.org/web/20110719003046/http://www2.math.uu.se/research/pub/Brandel.pdf Empirical Bayes methods for missing data analysis] * [http://it.stlawu.edu/~msch/biometrics/papers.htm Using the Beta-Binomial distribution to assess performance of a biometric identification device] *[http://www.biomedcentral.com/1471-2105/7/514/abstract/ A Hierarchical Naive Bayes Classifiers] (for continuous and [http://labmedinfo.org/download/lmi339.pdf discrete] variables). {{DEFAULTSORT:Empirical Bayes Method}} [[Category:Nonparametric Bayesian statistics]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Bayesian statistics
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:More footnotes
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)