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. The truncated normal distribution has wide applications in statistics and econometrics. For example, it is used to model the probabilities of the binary outcomes in the probit model and to model censored data in the Tobit model.

Definitions

Suppose has a normal distribution with mean and variance and lies within the interval. Then conditional on has a truncated normal distribution.
Its probability density function,, for, is given by
and by otherwise.
Here,
is the probability density function of the standard normal distribution and is its cumulative distribution function
By definition, if, then, and similarly, if, then.
The above formulae show that when the scale parameter of the truncated normal distribution is allowed to assume negative values. The parameter is in this case imaginary, but the function is nevertheless real, positive, and normalizable. The scale parameter of the canonical normal distribution must be positive because the distribution would not be normalizable otherwise. The doubly truncated normal distribution, on the other hand, can in principle have a negative scale parameter, because no such integrability problems arise on a bounded domain. In this case the distribution cannot be interpreted as a canonical 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 and.

Properties

Moments

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 of the original normal distribution. Likewise, if the random variable has been truncated only from above, the truncated distribution has a mean less than
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 of the original normal distribution.

Two sided truncationJohnson, N.L., Kotz, S., Balakrishnan, N. (1994) ''Continuous Univariate Distributions, Volume 1'', Wiley. (Section 10.1)

Let and. Then:
and
Care must be taken in the numerical evaluation of these formulas, which can result in catastrophic cancellation when the interval does not include. There are better ways to rewrite them that avoid this issue.

One sided truncation (of lower tail)

In this case then
and
where

One sided truncation (of upper tail)

,
Barr and Sherrill 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 and Mathew provide formulas for confidence intervals around the truncated moments.
;A recursive formula
As for the non-truncated case, there is a recursive formula for the truncated moments.
Multivariate
Computing the moments of a multivariate truncated normal is harder.

Computational methods

Generating values from the truncated normal distribution

A random variate x defined as
with the cumulative distribution function and its inverse, a uniform random number on, follows the distribution truncated to the range. 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, or be much too slow. Thus, in practice, one has to find alternative methods of simulation.
One such truncated normal generator is based on an acceptance rejection idea due to Marsaglia. Despite the slightly suboptimal acceptance rate of Marsaglia in comparison with Robert, Marsaglia's method is typically faster, 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, Lynch Section 8.1.3, Devroye. The package in R has a function, , that calculates draws from a truncated normal. The package in R also has functions to draw from a truncated normal.
Chopin proposed an algorithm inspired from the Ziggurat algorithm of Marsaglia and Tsang, which is usually considered as the fastest Gaussian sampler, and is also very close to Ahrens’s algorithm. Implementations can be found in , , and .
Sampling from the multivariate truncated normal distribution
is considerably more difficult. Exact or perfect simulation is only feasible in the case of
truncation of the normal distribution to a polytope region.
In more general cases, Damien and Walker 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.