Talk:Truncated normal distribution

message: The expression for the mean is given as: \mu +  \frac{\phi(\alpha)-\phi(\beta)}{Z}\sigma. This must be incorrect, because it sometimes gives mean values outside the truncation bounds. For example, \mu=0,  \sigma=2,  a=2,  b=10 gives a mean of 1.53. I believe the correct expression is \mu +  \frac{\phi(\alpha)-\phi(\beta)}{Z}\sigma^2. Agreed?
Jtmcg1128 (talk) 18:03, 13 October 2011 (UTC)
thread_title: Mean

message: * I am concerned that  f(x;\mu,\sigma, a,b) = \frac{\frac{1}{\sigma}\phi(\frac{X - \mu}{\sigma})}{\Phi(\frac{b - \mu}{\sigma}) - \Phi(\frac{a - \mu}{\sigma}) },  cannot be the formula for a PDF of a truncated random normal variable. Say there is a left truncated (a = 0) normal random variable with positive mean. If we choose X to be a negative value, then \phi(\frac{X - \mu}{\sigma}) is positive, \Phi(\frac{b - \mu}{\sigma}) is 1 and \Phi(\frac{a - \mu}{\sigma}) is positive. Altogether, the PDF cannot be zero as it should be. Perhaps defining it piecewise is the most logical idea because I cannot think of an explicit formula.
** Well, the article already mentioned that the domain of X is [a,b]. Thus f(x=;\mu,\sigma,a,b) is zero outside a and b. So, in your example, if a = 0, then f(x) is zero. Robbyjo (talk) 20:04, 20 February 2008 (UTC)
replies: text: The correct Density function is this one  f(x;\mu,\sigma, a,b) = \frac{\frac{1}{\sigma}\phi(\frac{X - \mu}{\sigma})}{\Phi(\frac{b - \mu}{\sigma}) - \Phi(\frac{a - \mu}{\sigma}) }. This function is both positive and integrates to 1 (because of change of variables, dz = \frac{dx}{\sigma}). The incorrect version, listed above, integrates to {\sigma}.Iwaterpolo (talk) 01:57, 3 June 2010 (UTC)
thread_title: Regarding the pdf

message: * The Statistics Online Computational Resource provides an interactive truncated normal distribution calculator (Java applet). If may be useful to learners, practitioners and instructors. Iwaterpolo (talk) 17:40, 29 November 2010 (UTC)
thread_title: Interactive calculators

message: Appears to be wrong.  The values from the formula don't agree with numerical computation of of the entropy. I derived the case for a one-sided truncated normal, and that differs from this case, but I haven't had time to go back and derive the two-sided case.  Would be nice if someone can track down a reference for this or find the correct formula. --Jpillow (talk) 17:20, 12 January 2012 (UTC)
thread_title:  Entropy formula 

message: The simulation section appears to be wrong/misleading. I understand the formula as basically simulating rejecting sampling by basically drawing uniformly from the lower and upper bounds of the CDF of the non-truncated normal (with appropriate parameters), then inverting to obtain the actual value. However, in this case the use of \Phi is misleading because it is referring to the CDF of the normal distribution with parameters \mu, \sigma instead of the standard normal.
There are several ways to resolve, this, but I feel that the following would be easiest. Note that using \alpha, \beta with the standard normal CDF instead of a, b would require the result to be multiplied by \sigma then added to \mu.
A random variate x defined as
 x = \Phi'^{-1}( \Phi'(a) + U * (\Phi'(b)-\Phi'(a)))  
with \Phi' the CDF of a normal distribution with mean \mu and variance \sigma^2, and \Phi'^{-1} its inverse, U a uniform random number on (0, 1), follows the distribution truncated to the range (a, b).
Heheman3000 (talk) 23:42, 29 December 2012 (UTC)
thread_title:  Simulation