Skip to main content
2 of 3
added 51 characters in body
Arya McCarthy
  • 9k
  • 1
  • 24
  • 58

You’re asking how to estimate the maximum likelihood parameters of a normal distribution from data. That is—you want the parameters with highest likelihood, given the data.

How you find these is up to you; there are several optimization procedures you could turn to. You could start at some initial guess of $\mu$ and $\sigma$, then climb the gradient of the log-likelihood to iteratively improve these values. You could even use the Hessian, to similar effect. (These work because the Gaussian likelihood is convex.) But you said you don’t want that. Besides, there’s a faster, exact solution. So let’s try something else.

It turns out, there are closed-form expressions for the optimal parameters.

$$\hat{\mu} = \overline{x} \equiv \frac{1}{n}\sum_{i=1}^n x_i$$

$$\hat{\sigma}^2 = \frac{1}{n} \sum_{i=1}^n (x_i - \overline{x})^2$$

The best mu is just the sample mean. The best sigma is just the standard deviation.


(I did trick you a bit here. There’s no way to get out of using calculus—because the maximum is where the gradient of the likelihood is zero. But you can trust, for a Gaussian distribution, that someone’s already done that work. If you trust this, you can use their closed-form solution.)

Arya McCarthy
  • 9k
  • 1
  • 24
  • 58