I would like to learn the parameters for a truncated gaussian like this one. enter image description here

I'm using this formula for the probability density $f(x | \mu, \sigma^2) = \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) \times \frac{1}{F(\mu, \sigma)}\times \mathbb{1}_{x>0}$

where $F(\mu, \sigma)$ is a function so that the integral of $f$ over $x$ equals $1$.

I tried to derive the maximum likelihood like we usually do for gaussian mixtures, but then I got stuck : I can't find an easy formula for $\mu$ and $\sigma$. How to find them?

  • 2
    $\begingroup$ This histogram isn't Gaussian in appearance, truncated or not: its right tail is much too heavy. So: would you like answers to the question you asked or would you like advice about how to characterize the data you show? $\endgroup$ – whuber Dec 17 '16 at 18:59
  • $\begingroup$ Thank you for your answer. I am trying to characterize the data. But I would be glad to hear an answer for the first question as well :) $\endgroup$ – Rosome Dec 17 '16 at 19:04
  • $\begingroup$ what kind of data is this ? $\endgroup$ – IrishStat Dec 17 '16 at 19:15
  • $\begingroup$ It is a histogram for a molecule concentration $\endgroup$ – Rosome Dec 17 '16 at 19:25
  • $\begingroup$ taken over time or space ? or does it represent cross-sectional data $\endgroup$ – IrishStat Dec 17 '16 at 19:30

To be clear about what you written in your probability density function, this is a form of truncation. In other words, if $X < 0$, then $X$ does not appear in the data set. As such, it will not be described as a Gaussian Mixture Model.

When treating this as a maximum likelihood problem, there are no constraints on $\mu$ or $\log(\sigma)$. So vanilla optimization algorithms, like Newton Raphsons, should be able to optimize the likelihood without much problem.

Alternatively, if you really wanted to fit an EM algorithm, I believe you could do this by having the dropped $X$'s be your missing data. However, this will be a little tricky; your missing data will not just be values of unobserved $X$, but how many $X$'s are missing. The formula for the expected of number missing $X$'s would be $\frac{n}{1 - \Phi(-\mu / \sigma)} - n$. This will not be a whole number with probability 1!

You should still be able to get a closed form M step by using a weight sample, but this is starting to get considerably more complicated than just using Newton Raphson's at this point.

| cite | improve this answer | |
  • $\begingroup$ Thank you very much for your answer ! I am going to try a Newton Raphsons then. $\endgroup$ – Rosome Dec 17 '16 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.