1.3.16 · D1Probability & Statistics

Foundations — Maximum likelihood estimation (MLE)

3,131 words14 min readBack to topic

Before you can read Maximum likelihood estimation (MLE) comfortably, you must be able to look at every squiggle on the page and hear a plain sentence. This note builds each squiggle from nothing, in the order they depend on each other. Never take a symbol on faith — if you meet it below and it isn't defined yet, that's a bug; tell me.


1. A data point:

Picture: dots sitting on a horizontal number line; each dot carries a tag and a dashed box drawn around all of them is the whole dataset.

Figure — Maximum likelihood estimation (MLE)
Figure 1 — Six orange dots on a horizontal value-axis, tagged through ; a plum dashed rectangle encloses them all and is labelled . If the image fails: imagine a ruler with six beads on it, lassoed together by a loop marked "".

Why the topic needs it: MLE is a method for explaining data. Data is nothing but a bag of these dots, so this is the atom everything is built from.


2. The whole dataset:

So if you flipped a coin 10 times, and holds all 10 results.

Picture: the dashed box in Figure 1 — the box is , the number of dots inside is .

Why the topic needs it: MLE scores a guess by how well it explains the entire bag , not one dot. The count later becomes the number of factors we multiply and the number of terms we add.


3. i.i.d. — the assumption that lets us multiply

Picture: two dials that don't touch, each spitting out dots — no wire connects them.

Why the topic needs it: Without i.i.d. the joint probability of the whole dataset would be a tangled mess. i.i.d. lets us write it as one clean product (Section 8).


4. Probability of a value:

Two brand-new symbols live here: and . Take them one at a time.

Picture: a bell curve whose shape/position is controlled by the dial ; the height of the curve above a point is — how strongly the machine "votes" for that value.

Figure — Maximum likelihood estimation (MLE)
Figure 2 — A teal bell curve labelled . A vertical orange dashed line rises from a point on the axis up to the curve; the dot where it meets the curve is annotated "height = how strongly the dial votes for this x". A plum note near the summit says " sets the shape/position". If the image fails: picture a hill; the taller the hill is directly above your data point, the happier that dial is with that point.

Why the topic needs it: This height is the currency of MLE. A good dial setting makes the curve tall exactly where your data dots landed.


5. The likelihood: same numbers, flipped viewpoint

Why the topic needs it: This is the conceptual heart. MLE = turn the dial until the seen data scores highest.


6. The product symbol

Picture: a chain of boxes joined by signs.

Why the topic needs it: Section 3 said independent ⇒ multiply. With independent dots, the joint probability is heights multiplied — exactly a .


7. The sum symbol and the logarithm

Figure — Maximum likelihood estimation (MLE)
Figure 3 — Two curves over the same dial-axis : a teal "likelihood (scaled)" and a plum "log-likelihood (scaled)". Both peak at the same orange dashed vertical line marked . If the image fails: two differently-shaped hills whose summits stand at the exact same spot on the ground.


8. Assembling the likelihood function

Now every piece is defined, so the parent formula is just Lego:


9. Finding the peak: slope, gradient, and

Figure — Maximum likelihood estimation (MLE)
Figure 4 — A teal log-likelihood hill . An orange flat bar sits on the summit (slope = 0); a plum uphill tangent on the left is marked "slope > 0" and a plum downhill tangent on the right "slope < 0". If the image fails: a hill where the tangent stick tilts up on the way up, tilts down on the way down, and lies perfectly flat at the very top.


10. Two health warnings the parent page relies on silently


How the foundations feed the topic

Data point x_i

Dataset X and count n

i.i.d. assumption

Distribution p of x given theta

Likelihood viewpoint flip

Product sign multiplies

Likelihood L of theta

Natural log turns product into sum

Log-likelihood ell

Slope or gradient equals zero

Interior peak check plus boundaries

argmax gives best dial

Estimate theta-hat MLE

Read top-to-bottom: dots become a dataset, i.i.d. lets us multiply heights into a likelihood, the natural tidies it into a sum, the flat-slope (or zero-gradient) condition plus a boundary check finds its peak, and hands back .


11. The hat:

Why the topic needs it: Keeping truth () and guess () visually separate is exactly what lets us later ask honest questions like "is our guess biased?" (Bias-Variance Tradeoff) or "how jumpy is it?" (Fisher Information, Cramér-Rao Bound).


Once these atoms are solid, the parent page and its neighbours reuse them: Method of Moments is an alternative recipe for the same "find the dial" goal; EM Algorithm runs MLE when some data is hidden; Loss Functions in ML shows that minimising a loss is often maximising a likelihood in disguise; and Likelihood Ratio Test compares two dial-settings using the very built in §8. Prefer Hindi? See the Hinglish version.


Equipment checklist

Cover the right-hand side and see if you can say each aloud.

What does stand for, and what does the subscript do?
One measured number; is just its name tag (1st, 2nd, …).
What do the curly braces in mean, and what is ?
A set/bag of all measurements; counts how many there are.
What are the TWO promises inside "i.i.d."?
Independent (values don't influence each other) and identically distributed (same source machine).
Why does independence let us multiply probabilities?
For independent events, P(both) = P(one) × P(other).
How do you read out loud?
"Probability/density of , given the dial setting ."
What is , physically, and can it be more than one number?
The parameter(s) — dial settings; yes, it can be a vector (e.g. μ and σ²).
What's the difference between and ?
First = likelihood of data given dial (MLE); second = probability of dial given data (Bayesian).
What is the "flip" that turns a probability into a likelihood?
Fix the seen data, treat as the variable you wiggle.
What does tell you to do?
Multiply all the terms from to .
What does tell you to do?
Add all the terms from to .
Which base does "" mean in MLE, and why?
Natural log (base ), because with no extra constant.
Which log identity turns the likelihood product into a sum?
.
Why is taking the log allowed without changing the answer?
is monotonically increasing, so the location of the peak (best ) is unchanged.
What is the symbol and what must you not confuse it with?
Script-ell = log-likelihood; not the digit 1 or a plain letter l.
What does return — a value or a location?
The location (the that maximises ), not the max value.
What replaces the single slope when is a vector?
The gradient (all partial slopes); peak needs .
What replaces "second derivative negative" in the vector case?
The Hessian being negative definite (curves down in every direction).
Why isn't zero slope enough to be sure it's a maximum?
Valleys/shelves are also flat; also the true peak may be on a boundary.
Give an example where "slope = 0" fails to find the MLE.
3 heads in 3 flips → climbs to the edge ; no zero-slope point.
Name two regularity conditions the clean recipe assumes.
Smoothness of in , and an interior (not boundary) concave peak.
What does the hat in signify?
It's an estimate from data, not the true unknown .