Empirical Bayes methods are procedures for statistical inference in which the prior probability distribution is estimated from the data. This approach stands in contrast to standard 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 model wherein the parameters at the highest level of the hierarchy are set to their most likely values, instead of being integrated out.[1] Empirical Bayes, also known as maximum marginal likelihood, represents a convenient approach for setting hyperparameters, but has been mostly supplanted by fully Bayesian hierarchical analyses since the 2000s with the increasing availability of well-performing computation techniques. It is still commonly used, however, for variational methods in Deep Learning, such as variational autoencoders, where latent variable spaces are high-dimensional.
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
y=\{y1,y2,...,yn\}
\theta=\{\theta1,\theta2,...,\thetan\}
p(y\mid\theta)
\theta
η
p(\theta\midη)
η
p(η)
Information about a particular quantity of interest
\thetai
y
\theta
η
Using Bayes' theorem,
p(\theta\midy) =
p(y\mid\theta)p(\theta) | |
p(y) |
=
p(y\mid\theta) | |
p(y) |
\intp(\theta\midη)p(η)dη.
In general, this integral will not be tractable analytically or symbolically and must be evaluated by numerical methods. Stochastic (random) or deterministic approximations may be used. Example stochastic methods are Markov Chain Monte Carlo and Monte Carlo sampling. Deterministic approximations are discussed in quadrature.
Alternatively, the expression can be written as
p(\theta\midy) =\intp(\theta\midη,y)p(η\midy) dη =\int
p(y\mid\theta)p(\theta\midη) | |
p(y\midη) |
p(η\midy) dη,
p(η\midy)=\intp(η\mid\theta)p(\theta\midy) d\theta.
These suggest an iterative scheme, qualitatively similar in structure to a Gibbs sampler, to evolve successively improved approximations to
p(\theta\midy)
p(η\midy)
p(\theta\midy)
η
p(η\midy)
p(\theta\midy)
p(η\midy)
p(\theta\midy)
p(η\midy)
When the true distribution
p(η\midy)
p(\theta\midy)
η
η*
p(\theta\midy)\simeq
p(y\mid\theta) p(\theta\midη*) | |
p(y\midη*) |
.
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)
η
η*
p(\theta\midy)
η*
η
Robbins considered a case of sampling from a mixed distribution, where probability for each
yi
\thetai
p(yi\mid\thetai)={{\theta
yi | |
i} |
-\thetai | |
e |
\over{yi}!}
G(\theta)
\thetai
Under squared error loss (SEL), the conditional expectation E(θi | Yi = yi) is a reasonable quantity to use for prediction. For the Poisson compound sampling model, this quantity is
\operatorname{E}(\thetai\midyi)={\int
yi+1 | |
(\theta |
e-\theta/{yi}!)dG(\theta)\over{\int
yi | |
(\theta |
e-\theta/{yi}!)dG(\theta})}.
This can be simplified by multiplying both the numerator and denominator by
({yi}+1)
\operatorname{E}(\thetai\midyi)={{(yi+1)pG(yi+1)}\over{pG(yi)}},
where pG is the marginal probability mass function obtained by integrating out θ over G.
To take advantage of this, Robbins suggested estimating the marginals with their empirical frequencies (
\#\{Yj\}
\operatorname{E}(\thetai\midyi) ≈ (yi+1){{\#\{Yj=yi+1\}}\over{\#\{Yj=yi\}}},
where
\#
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 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 effect is typical of empirical Bayes analyses.
If the likelihood and its prior take on simple parametric forms (such as 1- or 2-dimensional likelihood functions with simple conjugate priors), then the empirical Bayes problem is only to estimate the marginal
m(y\midη)
η
η
\theta
\theta
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 model, as well specific models for Bayesian linear regression (see below) and Bayesian multivariate linear regression. More advanced approaches include hierarchical Bayes models and Bayesian mixture models.
For an example of empirical Bayes estimation using a Gaussian-Gaussian model, see Empirical Bayes estimators.
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 (
G(\alpha,\beta)
η=(\alpha,\beta)
\rho(\theta\mid\alpha,\beta)d\theta=
(\theta/\beta)\alpha-1e-\theta | |
\Gamma(\alpha) |
(d\theta/\beta)for\theta>0,\alpha>0,\beta>0.
It is straightforward to show the posterior is also a gamma distribution. Write
\rho(\theta\midy)\propto\rho(y\mid\theta)\rho(\theta\mid\alpha,\beta),
where the marginal distribution has been omitted since it does not depend explicitly on
\theta
\theta
\rho(\theta\midy)\propto(\thetaye-\theta)(\theta\alpha-1e-\theta)=\thetay+e-.
G(\alpha',\beta')
\alpha'=y+\alpha
\beta'=(1+1/\beta)-1
\Theta
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
\operatorname{E}(\theta\midy)
\mu
G(\alpha',\beta')
\alpha'\beta'
\operatorname{E}(\theta\midy)=\alpha'\beta'=
\bar{y | |
+\alpha}{1+1 |
/\beta}=
\beta | |
1+\beta |
\bar{y}+
1 | |
1+\beta |
(\alpha\beta).
To obtain the values of
\alpha
\beta
\alpha\beta
\alpha\beta2
The resulting point estimate
\operatorname{E}(\theta\midy)
\bar{y}
\mu=\alpha\beta