Fact-checked by Grok 2 weeks ago

Truncated normal distribution

The truncated normal distribution is a continuous probability distribution derived from the normal distribution by restricting the support to a finite interval [a, b], where the density is zero outside this range and renormalized within it to ensure the total probability integrates to one. It is parameterized by the mean μ and standard deviation σ of the underlying normal distribution, along with the lower truncation point a and upper truncation point b, where typically -∞ ≤ a < b ≤ ∞. This distribution arises naturally when a normally distributed random variable is conditioned to lie within specified bounds, preserving many properties of the normal while avoiding extreme values. The probability density function (PDF) of the truncated normal distribution is given by
f(x \mid \mu, \sigma, a, b) = \frac{\phi\left(\frac{x - \mu}{\sigma}\right)}{\sigma \left[ \Phi\left(\frac{b - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right) \right]}
for a < x < b, and 0 otherwise, where \phi and \Phi denote the standard normal PDF and CDF, respectively. The cumulative distribution function (CDF) is similarly adjusted as
F(x \mid \mu, \sigma, a, b) = \frac{\Phi\left(\frac{x - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)}{\Phi\left(\frac{b - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)}
for a < x < b. The mean is \mu + \sigma \frac{\phi(\alpha) - \phi(\beta)}{Z}, where \alpha = (a - \mu)/\sigma, \beta = (b - \mu)/\sigma, and Z = \Phi(\beta) - \Phi(\alpha), while the variance is \sigma^2 \left[ 1 + \frac{\alpha \phi(\alpha) - \beta \phi(\beta)}{Z} - \left( \frac{\phi(\alpha) - \phi(\beta)}{Z} \right)^2 \right]. These moments differ from those of the untruncated normal, with the mean shifting toward the center of the interval and the variance typically decreasing as the truncation narrows.
In statistics and econometrics, the truncated normal distribution is essential for analyzing data subject to truncation or censoring, such as income levels above a reporting threshold. It forms the basis for models like truncated regression, which corrects for selection bias in samples where observations below or above certain cutoffs are excluded, as seen in studies of earnings distributions. Applications extend to queueing theory, where it models stationary waiting times in single-server queues with impatient customers under heavy traffic conditions, and to robust estimation in location and regression problems by simplifying asymptotic theory. Additionally, it supports efficient computational methods, including sampling algorithms and quadrature for multidimensional stochastic modeling.

Definition and Fundamentals

Probability Density Function

The truncated normal distribution is obtained by restricting a normally distributed random variable to lie within a finite interval [a, b], where a < b. This conditional distribution preserves the bell-shaped form of the parent normal but adjusts for the truncation boundaries. The probability density function (PDF) of a truncated normal random variable X with parent normal parameters \mu (mean) and \sigma > 0 (standard deviation), truncated to the interval [a, b], is defined as f(x \mid \mu, \sigma, a, b) = \begin{cases} \frac{\phi(x; \mu, \sigma)}{Z} & a \leq x \leq b, \\ 0 & \text{otherwise}, \end{cases} where \phi(x; \mu, \sigma) = \frac{1}{\sigma \sqrt{2\pi}} \exp\left( -\frac{(x - \mu)^2}{2\sigma^2} \right) is the PDF of the N(\mu, \sigma^2) distribution, and Z = \Phi(b; \mu, \sigma) - \Phi(a; \mu, \sigma) is the normalizing constant with \Phi(\cdot; \mu, \sigma) denoting the cumulative distribution function (CDF) of N(\mu, \sigma^2). The parameters \mu and \sigma characterize the location and scale of the underlying normal, while a and b specify the truncation points. Equivalently, using standardized truncation limits \alpha = (a - \mu)/\sigma and \beta = (b - \mu)/\sigma, the PDF can be expressed in terms of the standard normal density \phi(z) = \frac{1}{\sqrt{2\pi}} \exp\left( -\frac{z^2}{2} \right) and CDF \Phi(z) as f(x \mid \mu, \sigma, \alpha, \beta) = \frac{1}{\sigma} \cdot \frac{\phi\left( \frac{x - \mu}{\sigma} \right)}{\Phi(\beta) - \Phi(\alpha)} \quad \text{for } a \leq x \leq b, and 0 otherwise. This standardization simplifies computations by reducing to the standard normal case. The Z arises from the process: it equals the probability that the parent falls within [a, b], ensuring \int_a^b f(x \mid \mu, \sigma, a, b) \, dx = 1. To derive Z, integrate the unnormalized density \phi(x; \mu, \sigma) over [a, b], yielding Z = \int_a^b \phi(x; \mu, \sigma) \, dx = \Phi(b; \mu, \sigma) - \Phi(a; \mu, \sigma). For numerical , express the CDF as \Phi(z) = \frac{1}{2} \left[ 1 + \erf\left( \frac{z}{\sqrt{2}} \right) \right], where \erf is the , allowing efficient computation via established algorithms for \erf.

Cumulative Distribution Function

The cumulative distribution function (CDF) of a truncated normal distribution, defined on the [a, b] where -\infty < a < b < \infty, for a parent normal distribution with mean \mu and standard deviation \sigma > 0, is the probability that the falls below x within the truncation bounds. For x \in [a, b], the CDF F(x) is expressed as F(x) = \frac{\Phi\left(\frac{x - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)}{Z}, where \Phi denotes the CDF of the standard normal distribution, \alpha = (a - \mu)/\sigma, and Z = \Phi((b - \mu)/\sigma) - \Phi(\alpha) is the normalizing constant ensuring the total probability over [a, b] equals 1. This form arises directly from conditioning the parent normal CDF on the truncation interval. At the boundaries, F(a) = 0 and F(b) = 1, reflecting the support restriction; outside [a, b], F(x) = 0 for x < a and F(x) = 1 for x > b. The CDF is the integral of the corresponding (PDF) from a to x, normalized by Z, which integrates the PDF over the full truncation interval [a, b]. Computing F(x) requires evaluating the standard normal CDF \Phi, for which accurate algorithms exist, such as those based on continued fractions or asymptotic expansions. However, numerical challenges arise in cases of extreme truncation, where a or b is far from \mu (e.g., |\alpha| \gg 0), leading to subtractive cancellation in the numerator and denominator due to \Phi values close to 0 or 1, potentially causing loss of precision in floating-point arithmetic. To address this, approximations tailored to lower or upper truncated cases have been developed, such as rational function models that achieve high accuracy (e.g., relative errors below $10^{-10}) for tail regions without relying on direct \Phi differences.

Statistical Properties

Moments

The k-th raw moment of a random variable X following a truncated normal distribution N(\mu, \sigma^2) restricted to the interval [a, b] is expressed as E[X^k] = \frac{1}{Z} \int_a^b x^k \frac{1}{\sigma} \phi\left( \frac{x - \mu}{\sigma} \right) \, dx, where \phi(\cdot) denotes the probability density function of the standard normal distribution, \alpha = (a - \mu)/\sigma, \beta = (b - \mu)/\sigma, and Z = \Phi(\beta) - \Phi(\alpha) is the normalizing constant with \Phi(\cdot) the standard normal cumulative distribution function. For the first moment (mean), a closed-form formula is available: E[X] = \mu + \sigma \frac{\phi(\alpha) - \phi(\beta)}{Z}. $$ The second central moment (variance) derives from the second raw moment and is given by \mathrm{Var}(X) = \sigma^2 \left[ 1 + \frac{\alpha \phi(\alpha) - \beta \phi(\beta)}{Z} - \left( \frac{\phi(\alpha) - \phi(\beta)}{Z} \right)^2 \right]. These expressions can be simplified in one-sided truncation scenarios using the Mills ratio, $\lambda(z) = \phi(z)/\Phi(z)$, which relates the density and cumulative values at the boundary and aids in analytical computations without altering the general form. The moments vary with the extent of truncation: narrower intervals $[a, b]$ relative to $\sigma$ lead to smaller variance, as the distribution concentrates within the bounds, while the mean shifts toward the interval's center. As a baseline, untruncated limits yield the standard [normal](/page/Normal) moments of $\mu$ and $\sigma^2$. ### Mode, Median, and [Skewness](/page/Skewness) The [mode](/page/Mode) of the truncated [normal](/page/Normal) distribution is the value within the truncation interval $[a, b]$ that maximizes its [probability density function](/page/Probability_density_function), which is proportional to the [parent](/page/Parent) [normal](/page/Normal) [density](/page/Density) $\phi((x - \mu)/\sigma)$ for $x \in [a, b]$. If the [parent](/page/Parent) mean $\mu$ lies within the interval ($a < \mu < b$), the [mode](/page/Mode) coincides with $\mu$, as the [normal](/page/Normal) [density](/page/Density) achieves its maximum there. In cases of severe truncation where $\mu \leq a$, the [mode](/page/Mode) is at the lower boundary $a$; conversely, if $\mu \geq b$, the [mode](/page/Mode) is at the upper boundary $b$. This behavior preserves the unimodal nature of the [parent](/page/Parent) distribution but shifts the peak to the boundary when the truncation excludes the [parent's](/page/Parent) [mode](/page/Mode).[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) The median $m$ of the truncated normal distribution satisfies $F(m) = 0.5$, where $F$ is the cumulative distribution function given by F(x) = \frac{\Phi\left(\frac{x - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)}{\Phi\left(\frac{b - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)}, with $\Phi$ denoting the standard normal CDF. Unlike the untruncated normal, where the median equals the mean $\mu$, no closed-form expression exists for the truncated median, requiring numerical solution of the equation for $m$, often via inverse CDF methods such as bisection or [Newton-Raphson](/page/Newton-Raphson) applied to the above formula. For symmetric truncation around $\mu$ (e.g., $a = \mu - k\sigma$, $b = \mu + k\sigma$), the median remains at $\mu$.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) The skewness coefficient $\gamma_1$ quantifies the [asymmetry](/page/Asymmetry) introduced by [truncation](/page/Truncation) and is defined as \gamma_1 = \frac{\mu_3}{\omega^3}, where $\mu_3 = E[(X - \xi)^3]$ is the third central moment, $\xi$ is the [mean](/page/Mean), and $\omega$ is the standard deviation of the truncated distribution (with moments referenced from the foundational expressions in the moments section). Unlike the untruncated normal, which has $\gamma_1 = 0$, the truncated normal exhibits non-zero [skewness](/page/Skewness) unless the [truncation](/page/Truncation) is symmetric about $\mu$. Explicit computation of $\mu_3$ uses recursive formulas for central moments; for instance, Horrace (2015) derives \mu_k = (k-1)\mu_{k-2} + \lambda_k - \lambda_{k-1} \bar{\alpha}, where $\lambda_k$ involves integrals of the hazard function and $\bar{\alpha}$ is a standardized [truncation](/page/Truncation) point, enabling evaluation up to the fourth moment for [skewness](/page/Skewness) and kurtosis. Left-sided [truncation](/page/Truncation) ($b = \infty$, $a > -\infty$) induces positive [skewness](/page/Skewness) by removing the left tail, resulting in a longer right tail relative to the [mean](/page/Mean); right-sided [truncation](/page/Truncation) yields negative [skewness](/page/Skewness). The magnitude of [skewness](/page/Skewness) increases with [truncation](/page/Truncation) severity and [asymmetry](/page/Asymmetry), deviating further from zero as the [truncation](/page/Truncation) [interval](/page/Interval) narrows away from $\mu$. ## Special Cases and Variants ### One-Sided Truncation One-sided [truncation](/page/Truncation) of the [normal distribution](/page/Truncated_normal_distribution) occurs when the support is restricted to either the upper [tail](/page/Tail) (from $a = -\infty$ to a finite $b < \infty$) or the lower [tail](/page/Tail) (from a finite $a > -\infty$ to $b = \infty$), resulting in a conditional [distribution](/page/Distribution) that retains the bell-shaped form but shifted and scaled due to the [truncation](/page/Truncation). For lower [tail](/page/Tail) [truncation](/page/Truncation), where the [distribution](/page/Distribution) is conditioned on $X > a$, the normalizing constant is $Z = 1 - \Phi(\alpha)$ with $\alpha = (a - \mu)/\sigma$, the mean is $\mathbb{E}[X \mid X > a] = \mu + \sigma \frac{\phi(\alpha)}{Z}$, and the variance is $\mathrm{Var}(X \mid X > a) = \sigma^2 \left(1 + \alpha \frac{\phi(\alpha)}{Z} - \left(\frac{\phi(\alpha)}{Z}\right)^2 \right)$, where $\phi$ and $\Phi$ denote the standard normal PDF and CDF, respectively. The upper tail truncation case, conditioned on $X < b$, exhibits symmetric formulas obtained by reflecting the lower tail setup; here, $\beta = (b - \mu)/\sigma$, $Z = \Phi(\beta)$, the mean is $\mathbb{E}[X \mid X < b] = \mu - \sigma \frac{\phi(\beta)}{Z}$, and the variance is $\mathrm{Var}(X \mid X < b) = \sigma^2 \left(1 - \beta \frac{\phi(\beta)}{Z} - \left(\frac{\phi(\beta)}{Z}\right)^2 \right)$. A special case of left-truncated normal arises when truncating a zero-mean normal distribution below at zero, yielding the half-normal distribution, whose PDF is $\sqrt{2/\pi} \exp(-x^2 / (2\sigma^2)) / \sigma$ for $x > 0$. The square of a half-normal random variable follows a [chi-squared distribution](/page/Chi-squared_distribution) with one degree of freedom, linking one-sided truncation to quadratic forms of normals in certain parameter settings. Right-truncated normals can approximate distributions with exponential-like tails when the truncation point is sufficiently far into the upper [tail](/page/Tail), providing a bridge to heavier-tailed models in asymptotic regimes. In [survival analysis](/page/Survival_analysis), right-truncation models truncated data where only events occurring before a fixed time are observed, with the truncated normal serving as a latent distribution for underlying [normal](/page/Normal) lifetimes adjusted for [truncation](/page/Truncation). In [finance](/page/Finance), left-truncation applies to asset returns constrained above zero, such as modeling non-negative log-returns or option payoffs, where moments of the truncated normal inform [risk](/page/Risk) metrics like value-at-risk. Computationally, one-sided truncation simplifies [normalization](/page/Normalization), as the constant $Z$ requires evaluating only a single CDF term rather than a difference, facilitating efficient [simulation](/page/Simulation) and [inference](/page/Inference) in software implementations. ### Two-Sided Truncation The two-sided truncated [normal](/page/Normal) distribution arises when a [normal](/page/Normal) random [variable](/page/Random_variable) $X \sim \mathcal{N}(\mu, \sigma^2)$ is restricted to a finite [interval](/page/Interval) $[a, b]$ with $a < b$, conditioning on $a \leq X \leq b$. The normalizing constant is $Z = \Phi(\beta) - \Phi(\alpha)$, where $\alpha = (a - \mu)/\sigma$, $\beta = (b - \mu)/\sigma$, and $\Phi$ denotes the cumulative distribution function of the standard [normal](/page/Normal) distribution.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) The mean of this distribution shifts toward the center of the interval $[a, b]$ compared to the untruncated mean $\mu$, given by $\mu_t = \mu + \sigma \frac{\phi(\alpha) - \phi(\beta)}{Z}$, where $\phi$ is the [standard normal probability density function](/page/Standard_normal_probability_density_function). This adjustment reflects the dual boundary effects, pulling the location inward from both tails. The variance is reduced relative to $\sigma^2$, with the formula \sigma_t^2 = \sigma^2 \left[ 1 + \frac{\alpha \phi(\alpha) - \beta \phi(\beta)}{Z} - \left( \frac{\phi(\alpha) - \phi(\beta)}{Z} \right)^2 \right], capturing the contraction due to finite bounds on both sides.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) For narrow intervals where $| \beta - \alpha |$ is small relative to the scale of the untruncated distribution, the density becomes nearly constant across $[a, b]$, approximating a uniform distribution on that interval. In specific cases of truncation to $[0, 1]$ with appropriate $\mu$ and $\sigma$, the two-sided truncated normal can be approximated by a rescaled [beta distribution](/page/Beta_distribution), particularly when the parameters yield a symmetric, bell-shaped form within the bounds. As $| \beta - \alpha | \to 0$, the distribution concentrates at the midpoint of the interval, approaching a [Dirac delta function](/page/Dirac_delta_function) centered there.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) This distribution finds applications in psychometrics, where it models test scores like IQ with floor and ceiling effects, accounting for truncation at extreme values during norming processes. In engineering, it is used for statistical tolerance analysis in manufacturing assemblies, incorporating mean shifts due to truncated normal variations in component dimensions.[](https://pmc.ncbi.nlm.nih.gov/articles/PMC6748442/)[](https://www.tandfonline.com/doi/full/10.1080/00207541003639634) ## Parameter Estimation ### Method of Moments The method of moments for estimating the parameters of a truncated normal distribution involves matching the first two sample moments from the observed data to the corresponding theoretical moments of the distribution, assuming known truncation points $a$ and $b$ with $a < b$. Let $X \sim \mathcal{N}(\mu, \sigma^2)$ truncated to $[a, b]$, where the standardized truncation points are $\alpha = (a - \mu)/\sigma$ and $\beta = (b - \mu)/\sigma$. The normalizing constant is $Z = \Phi(\beta) - \Phi(\alpha)$, with $\Phi$ denoting the standard normal cumulative distribution function. The sample mean $m_1$ and (biased) sample variance $m_2$ from a sample of size $n$ are set equal to the theoretical expected value $E[X]$ and variance $\operatorname{Var}(X)$, yielding the system of nonlinear equations to solve for $\mu$ and $\sigma$: m_1 = \mu + \sigma \frac{\phi(\alpha) - \phi(\beta)}{Z}, m_2 = \sigma^2 \left[ 1 + \frac{\alpha \phi(\alpha) - \beta \phi(\beta)}{Z} - \left( \frac{\phi(\alpha) - \phi(\beta)}{Z} \right)^2 \right], where $\phi$ is the standard normal probability density function.[](https://www.jstor.org/stable/10.2307/2279903) These equations generally require iterative numerical solution, such as the Newton-Raphson method, starting from initial guesses based on the untruncated normal approximations.[](https://scholarsarchive.byu.edu/etd/2053) This approach offers simplicity and intuitiveness, particularly for small sample sizes where maximum likelihood may be unstable, as it directly leverages sample moments without requiring optimization of a full likelihood function.[](https://scholarsarchive.byu.edu/etd/2053) For the special case of one-sided truncation, such as left-truncation at $a$ with $b = \infty$, closed-form approximations exist using the inverse Mills ratio $\lambda(\alpha) = \phi(\alpha)/\Phi(-\alpha)$. The sample mean is adjusted as $\hat{\mu} \approx m_1 - \hat{\sigma} \lambda(\hat{\alpha})$, with $\hat{\sigma}$ similarly approximated from $m_2$, providing a quick initial estimate before iteration.[](https://www.jstor.org/stable/10.2307/2279903) The method of moments for truncated normals traces its origins to early 20th-century work by [Karl Pearson](/page/Karl_Pearson) and [Alice Lee](/page/Alice_Lee), who developed formulas for singly truncated cases in 1908, with refinements by [A. C. Cohen](/page/A._C._Cohen) in 1949 for both single and double truncation.[](https://www.jstor.org/stable/1912173) It found early applications in bioassay and probit analysis prior to the 1940s, where truncated normal models helped estimate dose-response curves from quantal data censored by experimental thresholds. ### Maximum Likelihood Estimation The maximum likelihood estimation (MLE) for the parameters $\mu$ and $\sigma^2$ of a truncated normal distribution is based on maximizing the log-likelihood function derived from the probability density function restricted to the truncation interval $[a, b]$. For an independent and identically distributed sample $x_1, \dots, x_n$ from $\mathrm{TN}(\mu, \sigma^2; a, b)$, the log-likelihood is given by \ell(\mu, \sigma^2) = \sum_{i=1}^n \log \left[ \frac{1}{\sigma} \phi\left( \frac{x_i - \mu}{\sigma} \right) \right] - n \log \left[ \Phi\left( \frac{b - \mu}{\sigma} \right) - \Phi\left( \frac{a - \mu}{\sigma} \right) \right], where $\phi$ and $\Phi$ denote the standard normal pdf and cdf, respectively.[](https://www.tandfonline.com/doi/abs/10.1080/00401706.1961.10489973)[](https://scholarsarchive.byu.edu/etd/2053) Setting the partial derivatives (score equations) to zero yields implicit equations without closed-form solutions, necessitating numerical optimization. The score with respect to $\mu$ simplifies to \bar{x} - \mu = -\sigma \frac{\phi(\beta) - \phi(\alpha)}{Z}, where $\alpha = (a - \mu)/\sigma$, $\beta = (b - \mu)/\sigma$, $\bar{x}$ is the sample mean, and $Z = \Phi(\beta) - \Phi(\alpha)$, or equivalently, \mu = \bar{x} + \sigma \frac{\phi(\beta) - \phi(\alpha)}{Z}. This fixed-point relation for $\mu$ can be iterated, starting from initial values (e.g., method of moments estimates), while updating $\sigma$ via the score equation for $\sigma^2$, which involves the sample second moment adjusted by a term $\frac{\alpha \phi(\alpha) - \beta \phi(\beta)}{Z} + 1$. Convergence is typically achieved through [Newton-Raphson](/page/Newton-Raphson_method) or similar iterative procedures.[](https://www.tandfonline.com/doi/abs/10.1080/00401706.1961.10489973)[](https://arxiv.org/abs/1407.6518) Under standard regularity conditions, the MLE is consistent and asymptotically efficient when the truncation points are fixed and the sample lies within $[a, b]$ with probability approaching 1. Standard errors can be obtained from the inverse of the observed [Fisher information matrix](/page/Fisher_information_matrix), evaluated at the MLE. However, for one-sided or extreme truncations, the distribution belongs to a non-steep exponential family, potentially leading to non-regular asymptotics where the MLE may not exist or converge at the usual $\sqrt{n}$ rate.[](https://www.tandfonline.com/doi/abs/10.1080/00401706.1961.10489973)[](https://arxiv.org/abs/2303.10287) In software implementations, direct MLE via numerical optimization is available in packages such as R's `fitdistrplus` for univariate cases. For truncated normals embedded in larger models (e.g., mixtures or regressions), variants of the expectation-maximization (EM) algorithm facilitate parameter estimation by treating truncation as missing data, iteratively computing expectations over the untruncated support conditional on observed truncated values.[](https://arxiv.org/abs/1407.6518)[](https://link.springer.com/article/10.1007/s10255-018-0733-2) Numerical challenges arise in extreme truncation scenarios, where the likelihood surface may exhibit non-convexity or flat regions, risking convergence to local maxima or failure to converge; good initial values, such as those from the method of moments, are essential to mitigate this.[](https://arxiv.org/abs/2303.10287) ## Random Variate Generation ### Inversion Method The inversion method, also known as inverse transform sampling, provides an exact algorithm for generating random variates from the truncated normal distribution by inverting its cumulative distribution function (CDF). This technique leverages the fact that if $U$ is a uniform random variable on $[0, 1]$, then $X = F^{-1}(U)$ follows the target distribution with CDF $F$, where $F^{-1}$ denotes the quantile function. For the truncated normal, the CDF is scaled to the truncation interval $[a, b]$, making the inversion straightforward once the underlying normal CDF and its inverse are available.[](http://www.cs.fsu.edu/~mascagni/Devroye.pdf) The algorithm proceeds as follows. First, standardize the truncation bounds: $\alpha = (a - \mu)/\sigma$ and $\beta = (b - \mu)/\sigma$, where $\mu$ and $\sigma > 0$ are the mean and standard deviation of the parent normal distribution. Generate $U \sim \text{Uniform}(0, 1)$. Compute the normalizing constant $Z = \Phi(\beta) - \Phi(\alpha)$, where $\Phi$ is the standard normal CDF. The adjusted probability is then $q = \Phi(\alpha) + U \cdot Z$. Finally, the variate is $X = \mu + \sigma \cdot \Phi^{-1}(q)$, where $\Phi^{-1}$ is the inverse standard normal CDF (quantile function). This yields $X$ distributed as truncated normal on $[a, b]$.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) Computing the variates requires reliable implementations of $\Phi$ and $\Phi^{-1}$, which are standard in numerical libraries. For instance, SciPy provides `scipy.special.ndtr` for $\Phi$ and `scipy.special.ndtri` (the percent point function, or ppf) for $\Phi^{-1}$, enabling efficient evaluation in Python. Similar functions exist in R (`pnorm` and `qnorm`) and MATLAB (`normcdf` and `norminv`). These routines typically use approximations like those from Beasley and Springer (1977) for the inverse, ensuring accuracy across the domain.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) The method is exact, generating one valid sample per uniform draw without rejection, which makes it efficient for moderate sample sizes and narrow truncation intervals where $Z \approx 0$, as the computation avoids iterative acceptance steps. However, it can become slow for high-volume sampling due to the expense of repeated $\Phi^{-1}$ evaluations, which involve iterative or table-based approximations; it is best suited for low-dimensional or one-off generations rather than large-scale simulations.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) Numerical stability requires attention in narrow intervals where $Z$ is small, as $q$ clusters near $\Phi(\alpha)$ or $\Phi(\beta)$, potentially amplifying floating-point errors in $\Phi^{-1}$ near the tails. Implementations should use double-precision arithmetic and validated approximations to mitigate precision loss, particularly when $\alpha$ or $\beta$ exceed 5 in absolute value.[](https://people.sc.fsu.edu/~jburkardt/presentations/truncated_normal.pdf) Historically, the inversion method builds on foundational work for normal variate generation, such as the Box-Muller transform (1958), but its adaptation for truncation appears in 1970s simulation literature, including methods by Ahrens and Dieter for modified normals used in related distributions like the Poisson.[](https://apps.dtic.mil/sti/tr/pdf/ADA091343.pdf) ### Rejection Sampling Rejection sampling provides a straightforward approach to generating random variates from the [truncated normal distribution](/page/Truncated_normal_distribution) by proposing candidates from a simpler distribution and accepting them with a probability proportional to the target density. In the basic setup, samples are drawn from the untruncated [normal distribution](/page/Normal_distribution) $N(\mu, \sigma^2)$ and accepted only if they lie within the truncation interval $[a, b]$. The acceptance probability for each proposal is the normalizing constant $Z = \Phi\left(\frac{b - \mu}{\sigma}\right) - \Phi\left(\frac{a - \mu}{\sigma}\right)$, where $\Phi$ is the cumulative distribution function of the standard [normal](/page/Normal_distribution). This method is unbiased but inefficient for severe truncation, where $Z$ is small, as the expected number of proposals needed per accepted sample is $1/Z$, potentially leading to impractical computation times.[](https://www.rob-mcculloch.org/2025_cs/webpage/Geweke.pdf)[](http://www.cs.fsu.edu/~mascagni/Devroye.pdf) To improve efficiency, tailored envelope functions are employed as proposal distributions $g(x)$ over $[a, b]$, ensuring the target density $p(x) = f(x)/Z$ (where $f(x)$ is the untruncated normal density) satisfies $p(x) \leq M g(x)$ for some constant $M$, with the optimal $M = \sup_{x \in [a,b]} p(x)/g(x)$. Common envelopes include piecewise uniform distributions or scaled beta distributions fitted to the interval, which approximate the shape of $f(x)$ more closely than the untruncated normal. The acceptance step then uses probability $f(x)/(M Z g(x))$, and the expected acceptance rate is $1/M$, which approaches 1 for tight envelopes. For example, a single piecewise uniform envelope can achieve acceptance rates exceeding 50% for mild truncations where the interval captures a substantial portion of the untruncated mass.[](http://www.cs.fsu.edu/~mascagni/Devroye.pdf) Specific variants adapt the envelope to the truncation type. For one-sided truncation (e.g., $a > \mu$, $b = \infty$), an exponential proposal $g(x) = \lambda e^{-\lambda (x - a)}$ for $x \geq a$ is effective, with the rate $\lambda$ optimized (e.g., $\lambda \approx (a - \mu)/\sigma^2$) to touch the target density at its mode and minimize $M$. This yields acceptance rates significantly higher than the naive $Z$, particularly in the tails. For two-sided narrow truncation where $[a, b]$ is short relative to $\sigma$, a uniform proposal $g(x) = 1/(b - a)$ on $[a, b]$ works well, with $M = (b - a) \sup_{x \in [a,b]} f(x)$; here, the acceptance rate $1/M$ is near 1 if $f(x)$ is nearly constant over the interval.[](https://link.springer.com/content/pdf/10.1007/BF00143942.pdf)[](http://www.cs.fsu.edu/~mascagni/Devroye.pdf) Efficiency analysis shows that while the naive method's acceptance rate equals $Z$ (often below 10% for heavy [truncation](/page/Truncation)), tailored envelopes like the [exponential](/page/Exponential) or [uniform](/page/Uniform) can boost rates to 20-80% depending on truncation severity, reducing computational cost. For instance, the [exponential](/page/Exponential) envelope for one-sided cases achieves up to twice the [efficiency](/page/Efficiency) of basic rejection in tail regions. In practice, [hybrid](/page/Hybrid) approaches combine rejection with the [inversion method](/page/Method): use inversion for wide intervals where $Z > 0.5$ (fast exact sampling via inverse CDF), and switch to rejection-based envelopes for narrow or extreme cases. Implementations include the `truncnorm` package in [R](/page/R), which employs an optimized accept-reject sampler for both one- and two-sided cases, and custom Python routines using libraries like [NumPy](/page/NumPy) for envelope proposals, often achieving efficient sampling for moderate sample sizes up to $10^6$.[](https://www.rob-mcculloch.org/2025_cs/webpage/Geweke.pdf)[](https://link.springer.com/content/pdf/10.1007/BF00143942.pdf)[](https://cran.r-project.org/web/packages/truncnorm/truncnorm.pdf)

References

  1. [1]
    [PDF] The Truncated Normal Distribution - Florida State University
    The truncated normal distribution is a normal distribution with a finite range, created to avoid extreme values, while preserving the normal distribution's ...
  2. [2]
    Truncated Normal Distribution | Real Statistics Using Excel
    Describes the truncated normal distribution and how to calculate its pdf, cdf, inverse function and key properties in Excel.
  3. [3]
    Chapter 19 Censored and Truncated Data - Bookdown
    Truncated data differ from censored data in that we only observe y and x if y is above (below) a certain cutoff. In censored data, we always observed x.
  4. [4]
    The truncated normal distribution: Applications to queues with ...
    The truncated normal distribution arises as the heavy traffic diffusion limit for the stationary single server queue with impatient customers.
  5. [5]
    [PDF] Chapter 4 Truncated Distributions
    The first five sections of this chapter provide the theory needed to compare the different confidence intervals. Many of these results.Missing: properties | Show results with:properties
  6. [6]
  7. [7]
    [PDF] A Simple Approximation to the Lower Truncated Cumulative Normal ...
    The cumulative distribution function for the standard normal distribution can be ... truncated normal distribution. International Conference on Quality ...
  8. [8]
    Continuous norming of psychometric tests: A simulation study ... - NIH
    Sep 17, 2019 · In this simulation study, we compared parametric with semi-parametric continuous norming methods in psychometric tests by constructing a fictitious population ...<|separator|>
  9. [9]
    An analytical computation method for statistical tolerance analysis of ...
    An analytical computation method for statistical tolerance analysis of assemblies with truncated normal mean shift. Chang-Hsin Kuo Department of Mechanical ...
  10. [10]
    On Estimating the Mean and Standard Deviation of Truncated ... - jstor
    The problem considered is that of estimating the mean and standard deviation of a normally distributed population from a truncated sample when neither count ...
  11. [11]
    Approximating a Truncated Normal Regression with the Method of ...
    In this note we show that a fairly powerful technique for truncated normal distributions, first suggested over 70 years ago by Karl Pearson and Alice Lee [9], ...
  12. [12]
    Tables for Maximum Likelihood Estimates: Singly Truncated and ...
    This paper provides tables for maximum likelihood estimates of mean and variance for singly truncated or censored samples from a Normal distribution, extending ...
  13. [13]
    Algorithm for the maximum likelihood estimation of the parameters of ...
    Jul 24, 2014 · This paper describes a simple procedure to estimate the parameters of the univariate truncated normal and lognormal distributions by maximum ...Missing: seminal | Show results with:seminal
  14. [14]
    Non-Steepness and Maximum Likelihood Estimation Properties of ...
    Mar 17, 2023 · This article considers exponential families of truncated multivariate normal distributions with one-sided truncation for some or all coordinates.<|control11|><|separator|>
  15. [15]
    Em algorithm of the truncated multinormal distribution with linear ...
    Mar 8, 2018 · A new expectation-maximization (EM) algorithm is proposed to estimate the parameters of the truncated multinormal distribution with linear ...
  16. [16]
    [PDF] Non- Uni form - Random Variate Generation
    Library of Congress Cataloging in Publication Data. Devroye, Luc. Non-uniform random variate generation. Bibliography: p. Includes index. 1. Random variables. I ...
  17. [17]
    [PDF] Random Variate Generation - DTIC
    Butler (1970) discusses a general, although approximate, method for generating random variates from any continuous distribution via numerical integration of the ...
  18. [18]
    [PDF] Efficient Simulation from the Multivariate Normal and Student-t ...
    It is well recognized that rejection sampling from a univariate normal distribution is impractical. Inverse c.d.f. sampling (Devroye, 1986) is a feasible ...
  19. [19]
    Simulation of truncated normal variables
    The need for simulation of truncated normal variables appears in Bayesian inference for some truncated para- meter space problems.
  20. [20]
    [PDF] truncnorm: Truncated Normal Distribution
    Title Truncated Normal Distribution. Description Density, probability, quantile and random number generation functions for the truncated normal distribution.