Truncated normal distribution
Lua error in Module:Infobox at line 314: malformed pattern (missing ']').
In probability and statistics, the truncated normal distribution is the probability distribution of a normally distributed random variable whose value is either bounded below or above (or both). 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.
Definition
Suppose has a normal distribution 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. There is an understanding that if
, then
, and similarly, if
, then
.
Moments
Let and
Two sided truncation:[2]
One sided truncation (upper tail):[3]
where and
.
One sided truncation (lower tail):
Barr and 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 and Mathew (2009) provide formulas for (generalized) confidence intervals around the truncated moments.
- A recursive formula
As for the non-truncated case, there is a neat recursive formula for the truncated moments. See.[4]
Simulating
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,[5] or be much too slow. 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.[6] Despite the slightly suboptimal acceptance rate of Marsaglia (1964) in comparison with Robert (1995), 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 (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.
Chopin (2011) proposed (arXiv) an algorithm inspired from the Ziggurat algorithm of Marsaglia and Tsang (1984, 2000), which is usually considered as the fastest Gaussian sampler, and is also very close to Ahrens’s algorithm (1995). Implementations can be found in C, C++, Matlab and Python.
Sampling from the multivariate truncated normal distribution is considerably more difficult.[7] Exact or perfect simulation is only feasible in the case of truncation of the normal distribution to a polytope region. [7] In more general cases, Damien and 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).
See also
Lua error in package.lua at line 80: module 'strict' not found.
References
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Johnson, N.L., Kotz, S., Balakrishnan, N. (1994) Continuous Univariate Distributions, Volume 1, Wiley. ISBN 0-471-58495-9 (Section 10.1)
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Document by Eric Orjebin, "http://www.smp.uq.edu.au/people/YoniNazarathy/teaching_projects/studentWork/EricOrjebin_TruncatedNormalMoments.pdf"
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ Lua error in package.lua at line 80: module 'strict' not found.
- ↑ 7.0 7.1 Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Norman L. Johnson and Samuel Kotz (1970). Continuous univariate distributions-1, chapter 13. John Wiley & Sons.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Lua error in package.lua at line 80: module 'strict' not found.
- Nicolas Chopin, "Fast simulation of truncated Gaussian distributions". Statistics and Computing 21(2): 275-288, 2011, doi:10.1007/s11222-009-9168-1