In Bayesian statistics, the posterior predictive distribution is the distribution of possible unobserved values conditional on the observed values.[1] [2] Given a set of N i.i.d. observations
X=\{x1,...,xN\}
\tilde{x}
\theta\in\Theta
\Theta
p(\tilde{x}|\theta)
It may seem tempting to plug in a single best estimate
\hat{\theta}
\theta
\theta
\tilde{x}
A posterior predictive distribution accounts for uncertainty about
\theta
\theta
X
p(\theta|X)
\tilde{x}
X
\tilde{x}
\theta
\theta
X
p(\tilde{x}|X)=\int\Thetap(\tilde{x}|\theta)p(\theta|X)\operatorname{d}\theta
Because it accounts for uncertainty about
\theta
\theta
The prior predictive distribution, in a Bayesian context, is the distribution of a data point marginalized over its prior distribution
G
\tilde{x}\simF(\tilde{x}|\theta)
\theta\simG(\theta|\alpha)
H(\tilde{x}|\alpha)
pH(\tilde{x}|\alpha)=\int\thetapF(\tilde{x}|\theta)pG(\theta|\alpha)\operatorname{d}\theta
This is similar to the posterior predictive distribution except that the marginalization (or equivalently, expectation) is taken with respect to the prior distribution instead of the posterior distribution.
Furthermore, if the prior distribution
G(\theta|\alpha)
G(\theta|\alpha)
p(\theta|X,\alpha)=pG(\theta|\alpha'),
i.e. the posterior distribution also belongs to
G(\theta|\alpha),
\alpha'
\alpha.
\begin{align} p(\tilde{x}|X,\alpha)&=\int\thetapF(\tilde{x}|\theta)p(\theta|X,\alpha)\operatorname{d}\theta\\ &=\int\thetapF(\tilde{x}|\theta)pG(\theta|\alpha')\operatorname{d}\theta\\ &=pH(\tilde{x}|\alpha') \end{align}
Hence, the posterior predictive distribution follows the same distribution H as the prior predictive distribution, but with the posterior values of the hyperparameters substituted for the prior ones.
The prior predictive distribution is in the form of a compound distribution, and in fact is often used to define a compound distribution, because of the lack of any complicating factors such as the dependence on the data
X
t(x|\mu,\nu,\sigma2)
\nu',{\sigma2}'
In some cases the appropriate compound distribution is defined using a different parameterization than the one that would be most natural for the predictive distributions in the current problem at hand. Often this results because the prior distribution used to define the compound distribution is different from the one used in the current problem. For example, as indicated above, the Student's t-distribution was defined in terms of a scaled-inverse-chi-squared distribution placed on the variance. However, it is more common to use an inverse gamma distribution as the conjugate prior in this situation. The two are in fact equivalent except for parameterization; hence, the Student's t-distribution can still be used for either predictive distribution, but the hyperparameters must be reparameterized before being plugged in.
Most, but not all, common families of distributions are exponential families. Exponential families have a large number of useful properties. One of these is that all members have conjugate prior distributions — whereas very few other distributions have conjugate priors.
Another useful property is that the probability density function of the compound distribution corresponding to the prior predictive distribution of an exponential family distribution marginalized over its conjugate prior distribution can be determined analytically. Assume that
F(x|\boldsymbol{\theta})
\boldsymbol{\theta}
\boldsymbol{η}=\boldsymbol{η}(\boldsymbol{\theta})
pF(x|\boldsymbol{η})=h(x)g(\boldsymbol{η})e\boldsymbol{η\rmT(x)}
while
G(\boldsymbol{η}|\boldsymbol{\chi},\nu)
pG(\boldsymbol{η}|\boldsymbol{\chi},\nu)=f(\boldsymbol{\chi},\nu)g(\boldsymbol{η})\nue\boldsymbol{η\rm\boldsymbol{\chi}}
Then the prior predictive distribution
H
F
G
\begin{align} pH(x|\boldsymbol{\chi},\nu)&={\displaystyle\int\limits\boldsymbol{η}pF(x|\boldsymbol{η})pG(\boldsymbol{η}|\boldsymbol{\chi},\nu)\operatorname{d}\boldsymbol{η}}\\ &={\displaystyle\int\limits\boldsymbol{η}h(x)g(\boldsymbol{η})e\boldsymbol{η\rmT(x)}f(\boldsymbol{\chi},\nu)g(\boldsymbol{η})\nue\boldsymbol{η\rm\boldsymbol{\chi}}\operatorname{d}\boldsymbol{η}}\\ &={\displaystyleh(x)f(\boldsymbol{\chi},\nu)\int\limits\boldsymbol{η}g(\boldsymbol{η})\nu+1e\boldsymbol{η\rm(\boldsymbol{\chi}+T(x))}\operatorname{d}\boldsymbol{η}}\\ &=h(x)\dfrac{f(\boldsymbol{\chi},\nu)}{f(\boldsymbol{\chi}+T(x),\nu+1)} \end{align}
The last line follows from the previous one by recognizing that the function inside the integral is the density function of a random variable distributed as
G(\boldsymbol{η}|\boldsymbol{\chi}+T(x),\nu+1)
f(...)
The above result is independent of choice of parametrization of
\boldsymbol{\theta}
\boldsymbol{\theta}
\boldsymbol{η}
g(...)
g(...)
F
G
The reason the integral is tractable is that it involves computing the normalization constant of a density defined by the product of a prior distribution and a likelihood. When the two are conjugate, the product is a posterior distribution, and by assumption, the normalization constant of this distribution is known. As shown above, the density function of the compound distribution follows a particular form, consisting of the product of the function
h(x)
F
G
Despite the analytical tractability of such distributions, they are in themselves usually not members of the exponential family. For example, the three-parameter Student's t distribution, beta-binomial distribution and Dirichlet-multinomial distribution are all predictive distributions of exponential-family distributions (the normal distribution, binomial distribution and multinomial distributions, respectively), but none are members of the exponential family. This can be seen above due to the presence of functional dependence on
\boldsymbol{\chi}+T(x)
\boldsymbol{\chi}+T(x){\chi}
f(...)
When a conjugate prior is being used, the posterior predictive distribution belongs to the same family as the prior predictive distribution, and is determined simply by plugging the updated hyperparameters for the posterior distribution of the parameter(s) into the formula for the prior predictive distribution. Using the general form of the posterior update equations for exponential-family distributions (see the appropriate section in the exponential family article), we can write out an explicit formula for the posterior predictive distribution:
\begin{array}{lcl} p(\tilde{x}|X,\boldsymbol{\chi},\nu)&=&pH\left(\tilde{x}|\boldsymbol{\chi}+T(X),\nu+N\right) \end{array}
where
T(X)=
N | |
\sum | |
i=1 |
T(xi)
This shows that the posterior predictive distribution of a series of observations, in the case where the observations follow an exponential family with the appropriate conjugate prior, has the same probability density as the compound distribution, with parameters as specified above.The observations themselves enter only in the form
T(X)=
N | |
\sum | |
i=1 |
T(xi).
This is termed the sufficient statistic of the observations, because it tells us everything we need to know about the observations in order to compute a posterior or posterior predictive distribution based on them (or, for that matter, anything else based on the likelihood of the observations, such as the marginal likelihood).
It is also possible to consider the result of compounding a joint distribution over a fixed number of independent identically distributed samples with a prior distribution over a shared parameter. In a Bayesian setting, this comes up in various contexts: computing the prior or posterior predictive distribution of multiple new observations, and computing the marginal likelihood of observed data (the denominator in Bayes' law). When the distribution of the samples is from the exponential family and the prior distribution is conjugate, the resulting compound distribution will be tractable and follow a similar form to the expression above. It is easy to show, in fact, that the joint compound distribution of a set
X=\{x1,...,xN\}
N
pH(X|\boldsymbol{\chi},\nu)=\left(
N | |
\prod | |
i=1 |
h(xi)\right)\dfrac{f(\boldsymbol{\chi},\nu)}{f\left(\boldsymbol{\chi}+T(X),\nu+N\right)}
This result and the above result for a single compound distribution extend trivially to the case of a distribution over a vector-valued observation, such as a multivariate Gaussian distribution.
Collapsing out a node in a collapsed Gibbs sampler is equivalent to compounding. As a result, when a set of independent identically distributed (i.i.d.) nodes all depend on the same prior node, and that node is collapsed out, the resulting conditional probability of one node given the others as well as the parents of the collapsed-out node (but not conditioning on any other nodes, e.g. any child nodes) is the same as the posterior predictive distribution of all the remaining i.i.d. nodes (or more correctly, formerly i.i.d. nodes, since collapsing introduces dependencies among the nodes). That is, it is generally possible to implement collapsing out of a node simply by attaching all parents of the node directly to all children, and replacing the former conditional probability distribution associated with each child with the corresponding posterior predictive distribution for the child conditioned on its parents and the other formerly i.i.d. nodes that were also children of the removed node. For an example, for more specific discussion and for some cautions about certain tricky issues, see the Dirichlet-multinomial distribution article.