# Estimating mean and st dev of a truncated gaussian curve without spike

Suppose I have a black box that generates data following a normal distribution with mean m and standard deviation s. Suppose, however, that whenever it outputs a value < 0 it does not record anything (can't even tell that it's outputted such a value). We have a truncated gaussian distribution without a spike.

How can I estimate these parameters?

-
I changed the tag from "truncated-gaussian" to "truncation" because most answers will be potentially useful in situations involving other distributions. –  whuber Aug 23 '10 at 14:21

The model for your data would be:

$y_i \sim N(\mu,\sigma^2) I(y_i > 0)$

Thus, the density function is:

$$f(y_i|-) = \frac{exp(-\frac{(y_i-\mu)^2}{2 \sigma^2})}{\sqrt{2 \pi \sigma}\ (1 - \phi(-\frac{\mu}{\sigma}))}$$

where,

$\phi(.)$ is the standard normal cdf.

You can then estimate the parameters $\mu$ and $\sigma$ using either maximum likelihood or bayesian methods.

-

As Srikant Vadali has suggested, Cohen and Hald solved this problem using ML (with a Newton-Raphson root finder) around 1950. Another paper is Max Halperin's "Estimation in the Truncated Normal Distribution" available on JSTOR (for those with access). Googling "truncated gaussian estimation" produces lots of useful-looking hits.

-