What are the maximum likelihood estimates of μ and σ2 from independent samples x1,…,xn of N(μ,σ2), and how do you derive them?

Probability and statistics, Estimation
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can write a log-likelihood, take partial derivatives cleanly, and check that you found a maximum.

Key idea

Maximise the log-likelihood ℓ(μ,σ2)=−n2log⁡(2πσ2)−12σ2∑i(xi−μ)2. Setting both partial derivatives to zero gives μ^=xˉ (the sample mean) and σ^2=1n∑i(xi−xˉ)2.

Steps

  1. Write the likelihood, the probability density of the whole sample: ∏i12πσ2exp⁡ ⁣(−(xi−μ)22σ2). Take logs: this turns the product into a sum, and since log is increasing, the maximiser does not change. You get ℓ(μ,σ2) above.
  2. Differentiate with respect to μ: ∂ℓ∂μ=1σ2∑i(xi−μ)=0, so μ^=xˉ.
  3. Treat v=σ2 as the variable, so you do not have to differentiate through a square: ∂ℓ∂v=−n2v+12v2∑i(xi−μ)2=0, so v^=1n∑i(xi−μ^)2.
  4. Check that it is a maximum. ∂2ℓ/∂μ2=−n/σ2<0. At v^, with ∑i(xi−μ^)2=nv^: ∂2ℓ/∂v2=n2v^2−nv^v^3=−n2v^2<0.
  5. Add a remark. σ^2 divides by n, so it is biased: E[σ^2]=n−1nσ2. It is still consistent (correct as n→∞). In several dimensions the same steps give Σ^=1n∑i(xi−xˉ)(xi−xˉ)⊤.

Common mistakes

How long your answer should be

Half a page; 3–4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probability and statistics: Is KL divergence a distance, and why is minimising cross-entropy the same as maximum likelihood?
Next in Probability and statistics: Why is 1n∑i(xi−xˉ)2 a biased estimator of σ2, and why does dividing by n−1 instead remove the bias?