Natural exponential family

In probability and statistics, a natural exponential family (NEF) is a class of probability distributions that is a special case of an exponential family (EF).

Univariate case
The natural exponential families (NEF) are a subset of the exponential families. A NEF is an exponential family in which the natural parameter &eta; and the natural statistic T(x) are both the identity. A distribution in an exponential family with parameter &theta; can be written with probability density function (PDF) $$ f_X(x\mid \theta) = h(x)\ \exp\Big(\ \eta(\theta) T(x) - A(\theta)\ \Big) \,\! ,$$ where $$h(x)$$ and $$A(\theta)$$ are known functions. A distribution in a natural exponential family with parameter &theta; can thus be written with PDF $$ f_X(x\mid \theta) = h(x)\ \exp\Big(\ \theta x - A(\theta)\ \Big) \,\! .$$ [Note that slightly different notation is used by the originator of the NEF, Carl Morris. Morris uses &omega; instead of &eta; and &psi; instead of A.]

General multivariate case
Suppose that $$\mathbf{x} \in \mathcal{X} \subseteq \mathbb{R}^p$$, then a natural exponential family of order p has density or mass function of the form: $$ f_X(\mathbf{x} \mid \boldsymbol\theta) = h(\mathbf{x})\ \exp\Big(\boldsymbol\theta^{\rm T} \mathbf{x} - A(\boldsymbol\theta)\ \Big) \,\! ,$$ where in this case the parameter $$\boldsymbol\theta \in \mathbb{R}^p .$$

Moment and cumulant generating functions
A member of a natural exponential family has moment generating function (MGF) of the form $$M_X(\mathbf{t}) = \exp\Big(\ A(\boldsymbol\theta + \mathbf{t}) - A(\boldsymbol\theta)\ \Big) \, .$$

The cumulant generating function is by definition the logarithm of the MGF, so it is $$K_X(\mathbf{t}) = A(\boldsymbol\theta + \mathbf{t}) - A(\boldsymbol\theta) \, .$$

Examples
The five most important univariate cases are:
 * normal distribution with known variance
 * Poisson distribution
 * gamma distribution with known shape parameter &alpha; (or k depending on notation set used)
 * binomial distribution with known number of trials, n
 * negative binomial distribution with known $$r$$

These five examples – Poisson, binomial, negative binomial, normal, and gamma – are a special subset of NEF, called NEF with quadratic variance function (NEF-QVF) because the variance can be written as a quadratic function of the mean. NEF-QVF are discussed below.

Distributions such as the exponential, Bernoulli, and geometric distributions are special cases of the above five distributions. For example, the Bernoulli distribution is a binomial distribution with n = 1 trial, the exponential distribution is a gamma distribution with shape parameter &alpha; = 1 (or k = 1 ), and the geometric distribution is a special case of the negative binomial distribution.

Some exponential family distributions are not NEF. The lognormal and Beta distribution are in the exponential family, but not the natural exponential family. The gamma distribution with two parameters is an exponential family but not a NEF and the chi-squared distribution is a special case of the gamma distribution with fixed scale parameter, and thus is also an exponential family but not a NEF (note that only a gamma distribution with fixed shape parameter is a NEF).

The inverse Gaussian distribution is a NEF with a cubic variance function.

The parameterization of most of the above distributions has been written differently from the parameterization commonly used in textbooks and the above linked pages. For example, the above parameterization differs from the parameterization in the linked article in the Poisson case. The two parameterizations are related by $$ \theta = \log(\lambda) $$, where &lambda; is the mean parameter, and so that the density may be written as $$f(k;\theta) = \frac{1}{k!} \exp\Big(\ \theta\ k - \exp(\theta)\ \Big) \ ,$$ for $$ \theta \in \mathbb{R}$$, so $$h(k) = \frac{1}{k!}, \text{ and } A(\theta) = \exp(\theta)\ .$$

This alternative parameterization can greatly simplify calculations in mathematical statistics. For example, in Bayesian inference, a posterior probability distribution is calculated as the product of two distributions. Normally this calculation requires writing out the probability distribution functions (PDF) and integrating; with the above parameterization, however, that calculation can be avoided. Instead, relationships between distributions can be abstracted due to the properties of the NEF described below.

An example of the multivariate case is the multinomial distribution with known number of trials.

Properties
The properties of the natural exponential family can be used to simplify calculations involving these distributions.

Univariate case
1. _{t = 0} = \left. \frac{d}{d t} A(\theta + t) \right

2. _{t = 0} \, .$ The mean is the first moment and always equal to the first cumulant, so $ \mu_1 = \kappa_1 = \operatorname{E}[X] = K'_X(0) = A'(\theta)\, .$

The variance is always the second cumulant, and it is always related to the first and second moments by $ \operatorname{Var}[X] = \kappa_2 = \mu_2 - \mu_1^2 \, ,$ so that $ \operatorname{Var}[X] = K_X(0) = A(\theta) \, .$

Likewise, the nth cumulant is $ \kappa_n = A^{(n)}(\theta) \, .$

3. Natural exponential families (NEF) are closed under convolution. Given independent identically distributed (iid) $X_1,\ldots,X_n$ with distribution from an NEF, then $\sum_{i=1}^n X_i\,$ is an NEF, although not necessarily the original NEF. This follows from the properties of the cumulant generating function.

4. The variance function for random variables with an NEF distribution can be written in terms of the mean. $\operatorname{Var}(X) = V(\mu).$

5. The first two moments of a NEF distribution uniquely specify the distribution within that family of distributions. $ X \sim \operatorname{NEF} [\mu, V(\mu)] .$

Multivariate case
In the multivariate case, the mean vector and covariance matrix are $$ \operatorname{E}[X] = \nabla A(\boldsymbol\theta) \text{ and } \operatorname{Cov}[X] = \nabla \nabla^{\rm T} A(\boldsymbol\theta)\, ,$$ where$$\nabla$$ is the gradient and $$\nabla \nabla^{\rm T} $$ is the Hessian matrix.

Natural exponential families with quadratic variance functions (NEF-QVF)
A special case of the natural exponential families are those with quadratic variance functions. Six NEFs have quadratic variance functions (QVF) in which the variance of the distribution can be written as a quadratic function of the mean. These are called NEF-QVF. The properties of these distributions were first described by Carl Morris.

$$ \operatorname{Var}(X) = V(\mu) = \nu_0 + \nu_1 \mu + \nu_2 \mu^2.$$

The six NEF-QVFs
The six NEF-QVF are written here in increasing complexity of the relationship between variance and mean.


 * 1) The normal distribution with fixed variance $$X \sim  N(\mu, \sigma^2) $$ is NEF-QVF because the variance is constant.  The variance can be written $$ \operatorname{Var}(X) = V(\mu) = \sigma^2$$, so variance is a degree 0 function of the mean.
 * 2) The Poisson distribution $$X \sim \operatorname{Poisson}(\mu) $$ is NEF-QVF because all Poisson distributions have variance equal to the mean $$\operatorname{Var}(X) = V(\mu) = \mu$$, so variance is a linear function of the mean.
 * 3) The Gamma distribution $$X \sim \operatorname{Gamma}(r, \lambda) $$ is NEF-QVF because the mean of the Gamma distribution is $$\mu = r\lambda$$ and the variance of the Gamma distribution is $$\operatorname{Var}(X) = V(\mu) = \mu^2/r$$, so the variance is a quadratic function of the mean.
 * 4) The binomial distribution $$ X \sim \operatorname{Binomial}(n, p) $$ is NEF-QVF because the mean is $$\mu = np$$ and the variance is $$ \operatorname{Var}(X) = np(1-p) $$ which can be written in terms of the mean as
 * $$V(X) = - np^2 + np = -\mu^2/n + \mu.$$
 * 1) The negative binomial distribution $$ X \sim \operatorname{NegBin}(n, p) $$ is NEF-QVF because the mean is $$\mu = np/(1-p)$$ and the variance is $$V(\mu) = \mu^2/n + \mu.$$
 * 2) The (not very famous) distribution generated by the generalized hyperbolic secant distribution (NEF-GHS) has  $$V(\mu) = \mu^2/n +n$$ and $$\mu > 0.$$

Properties of NEF-QVF
The properties of NEF-QVF can simplify calculations that use these distributions. 1. Natural exponential families with quadratic variance functions (NEF-QVF) are closed under convolutions of a linear transformation. That is, a convolution of a linear transformation of an NEF-QVF is also an NEF-QVF, although not necessarily the original one.

Given independent identically distributed (iid) $X_1,\ldots,X_n$ with distribution from a NEF-QVF. A convolution of a linear transformation of an NEF-QVF is also an NEF-QVF.

Let $Y = \sum_{i=1}^n (X_i - b)/c \,$ be the convolution of a linear transformation of X. The mean of Y is $ \mu^* = n(\mu - b)/c \,$. The variance of Y can be written in terms of the variance function of the original NEF-QVF. If the original NEF-QVF had variance function $ \operatorname{Var}(X) = V(\mu) = \nu_0 + \nu_1 \mu + \nu_2 \mu^2,$ then the new NEF-QVF has variance function $ \operatorname{Var}(Y) = V^*(\mu^*) = \nu^*_0 + \nu^*_1 \mu + \nu^*_2 \mu^2 ,$ where $ \nu^*_0 = n V(b)/c^2 \, ,$ $ \nu^*_1 = V'(b)/c \, ,$ $ \nu^*_2/n = \nu_2/n \, .$

2. Let $ X_1$ and $X_2$ be independent NEF with the same parameter &theta; and let $ Y = X_1 + X_2 $. Then the conditional distribution of $X_1$ given $Y$ has quadratic variance in $Y$ if and only if $ X_1$ and $X_2$ are NEF-QVF. Examples of such conditional distributions are the normal, binomial, beta, hypergeometric and geometric distributions, which are not all NEF-QVF.

3. NEF-QVF have conjugate prior distributions on &mu; in the Pearson system of distributions (also called the Pearson distribution although the Pearson system of distributions is actually a family of distributions rather than a single distribution.) Examples of conjugate prior distributions of NEF-QVF distributions are the normal, gamma, reciprocal gamma, beta, F-, and t- distributions. Again, these conjugate priors are not all NEF-QVF.

4. If $ X \mid \mu $ has an NEF-QVF distribution and &mu; has a conjugate prior distribution then the marginal distributions are well-known distributions.

These properties together with the above notation can simplify calculations in mathematical statistics that would normally be done using complicated calculations and calculus.