1.3.16 · D4Probability & Statistics

Exercises — Maximum likelihood estimation (MLE)

1,901 words9 min readBack to topic

Before we start, the three symbols we reuse in every problem — defined in plain words:

Figure — Maximum likelihood estimation (MLE)

Level 1 — Recognition

Recall Solution 1.1

WHAT we do: every head multiplies in a factor (its probability), every tail multiplies in . WHY: the flips are independent, so the joint probability is the product of the single-flip probabilities. Order does not matter for the value of the product — only the counts (6 and 2) do. Take logs, using and :

Recall Solution 1.2

False. MLE maximises — the probability of the data given the parameter. The phrase "probability of the parameters given the data" is , the posterior, which belongs to Bayesian Estimation / MAP, not MLE. MLE treats as a fixed unknown constant, not a random thing.


Level 2 — Application

Recall Solution 2.1

Step — differentiate. Using and : WHY this tool (the derivative)? The peak of the -hill is the one flat spot; the derivative is the slope, so setting it to locates the peak (see the figure above). Step — set to zero and solve. Sanity check: — exactly the observed frequency, as intuition demands.

Recall Solution 2.2

The general Gaussian-mean result (parent note, Example 2) is . WHY the mean: maximising the log-likelihood means minimising (the rest is constant in ); the point that minimises total squared distance to a set of numbers is their average. Note never entered — for the mean, the known variance cancels out.


Level 3 — Analysis

Recall Solution 3.1

Why differentiate in , not ? The log-likelihood contains only through the two clean pieces and . Treat the whole block as one variable: and are painless. Differentiating in forces extra chain-rule factors and gives the identical answer with more mess. (By invariance of the MLE, regardless.)

Recall Solution 3.2

Log-likelihood. , so Differentiate & solve. Curvature check: ⇒ maximum. For : , , Intuition: a large total wait ⇒ small rate. The rate is the reciprocal of the average wait — dimensionally and physically sensible.


Level 4 — Synthesis

Recall Solution 4.1

Log-likelihood in two unknowns: Partial in (only the last term depends on ): The positive factor can never make the sum zero, so regardless of — that is why we can solve first. Partial in , then substitute : This is a profile likelihood move: freeze the easy parameter at its optimum, optimise the other. The EM Algorithm generalises this "optimise one block, then the next" idea to hidden variables.

Recall Solution 4.2

Squared deviations: , sum . Why they differ: the MLE reuses — estimated from the same data — so the deviations are slightly too small (the data hugs its own mean). Dividing by instead of corrects this. MLE variance is biased low but consistent (bias as ). See Bias-Variance Tradeoff.


Level 5 — Mastery

Recall Solution 5.1

Log-likelihood (for a valid , i.e. ): Differentiate: , which is always negative — it never equals zero! So there is no interior stationary point. WHY the calculus "fails": is strictly decreasing in , so we want as small as possible. But there is a hard wall: every observed must satisfy , so . Pushing below makes the likelihood (that data would be impossible). The maximum sits on the boundary (see figure): This is a support boundary MLE — the peak is a corner, not a smooth summit. Compare with Method of Moments, which would instead solve — a different estimator, showing MLE and MoM need not agree.

Figure — Maximum likelihood estimation (MLE)
Recall Solution 5.2

Asymptotic normality (parent note property 2) says the variance of is approximately , so the standard error is What it means: this is the width of the Gaussian bell describing our uncertainty about . By the Cramér-Rao Bound, no unbiased estimator can beat this variance asymptotically — MLE is efficient. (With this is only a rough approximation; the guarantee is a large- statement.)


Recall Quick self-test (reveal answers)

MLE maximises or ? ::: , the likelihood. Bernoulli MLE for 6 heads in 8 flips ::: . Gaussian MLE mean of ::: . Exponential MLE for ::: . MLE variance of () ::: ; unbiased . Triangular-on- MLE ::: (boundary!). Why divide by for unbiased variance? ::: estimating the mean costs one degree of freedom.