Truncated normal distribution

In probability and statistics, the truncated normal distribution is the probability distribution derived from that of a normally distributed random variable by bounding the random variable from either below or above (or both).

The truncated normal distribution has wide applications in statistics and econometrics.

is the probability density function of the standard normal distribution and

of the truncated normal distribution is allowed to assume negative values.

The doubly truncated normal distribution, on the other hand, can in principle have a negative scale parameter (which is different from the variance, see summary formulae), because no such integrability problems arise on a bounded domain.

In this case the distribution cannot be interpreted as an untruncated normal conditional on

, of course, but can still be interpreted as a maximum-entropy distribution with first and second moments as constraints, and has an additional peculiar feature: it presents two local maxima instead of one, located at

The truncated normal is one of two possible maximum entropy probability distributions for a fixed mean and variance constrained to the interval [a,b], the other being the truncated U.

[2] Truncated normals with fixed support form an exponential family.

Nielsen[3] reported closed-form formula for calculating the Kullback-Leibler divergence and the Bhattacharyya distance between two truncated normal distributions with the support of the first distribution nested into the support of the second distribution.

If the random variable has been truncated only from below, some probability mass has been shifted to higher values, giving a first-order stochastically dominating distribution and hence increasing the mean to a value higher than the mean

Regardless of whether the random variable is bounded above, below, or both, the truncation is a mean-preserving contraction combined with a mean-changing rigid shift, and hence the variance of the truncated distribution is less than the variance

Care must be taken in the numerical evaluation of these formulas, which can result in catastrophic cancellation when the interval

Barr & Sherrill (1999) give a simpler expression for the variance of one sided truncations.

Their formula is in terms of the chi-square CDF, which is implemented in standard software libraries.

Bebu & Mathew (2009) provide formulas for (generalized) confidence intervals around the truncated moments.

As for the non-truncated case, there is a recursive formula for the truncated moments.

[7] Computing the moments of a multivariate truncated normal is harder.

This is simply the inverse transform method for simulating random variables.

Although one of the simplest, this method can either fail when sampling in the tail of the normal distribution,[8] or be much too slow.

[9] Thus, in practice, one has to find alternative methods of simulation.

One such truncated normal generator (implemented in Matlab and in R (programming language) as trandn.R ) is based on an acceptance rejection idea due to Marsaglia.

[10] Despite the slightly suboptimal acceptance rate of Marsaglia (1964) in comparison with Robert (1995), Marsaglia's method is typically faster,[9] because it does not require the costly numerical evaluation of the exponential function.

For more on simulating a draw from the truncated normal distribution, see Robert (1995), Lynch (2007, Section 8.1.3 (pages 200–206)), Devroye (1986).

The MSM package in R has a function, rtnorm, that calculates draws from a truncated normal.

The truncnorm package in R also has functions to draw from a truncated normal.

Sampling from the multivariate truncated normal distribution is considerably more difficult.

[11] Exact or perfect simulation is only feasible in the case of truncation of the normal distribution to a polytope region.

[11][12] In more general cases, Damien & Walker (2001) introduce a general methodology for sampling truncated densities within a Gibbs sampling framework.

Their algorithm introduces one latent variable and, within a Gibbs sampling framework, it is more computationally efficient than the algorithm of Robert (1995).