WHAT we do: every head multiplies in a factor p (its probability), every tail multiplies in (1−p).
L(p)=6p⋅p⋯p⋅2(1−p)⋅(1−p)=p6(1−p)2.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 log(ab)=loga+logb and log(ak)=kloga:
ℓ(p)=6logp+2log(1−p).
Recall Solution 1.2
False. MLE maximises P(data∣θ)=L(θ) — the probability of the data given the parameter. The phrase "probability of the parameters given the data" is P(θ∣data), the posterior, which belongs to Bayesian Estimation / MAP, not MLE. MLE treats θ as a fixed unknown constant, not a random thing.
Step — differentiate. Using dpdlogp=p1 and dpdlog(1−p)=−1−p1:
dpdℓ=p6−1−p2.WHY this tool (the derivative)? The peak of the ℓ-hill is the one flat spot; the derivative is the slope, so setting it to 0 locates the peak (see the figure above).
Step — set to zero and solve.p6=1−p2⇒6(1−p)=2p⇒6=8p⇒p^=86=0.75.
Sanity check: p^=flipsheads=86 — exactly the observed frequency, as intuition demands.
Recall Solution 2.2
The general Gaussian-mean result (parent note, Example 2) is μ^MLE=xˉ=n1∑xi. WHY the mean: maximising the log-likelihood means minimising ∑(xi−μ)2 (the rest is constant in μ); the point that minimises total squared distance to a set of numbers is their average.
μ^=44+7+9+10=430=7.5.
Note σ2 never entered — for the mean, the known variance cancels out.
σ^2=422+(−1)2+32+(−4)2=44+1+9+16=430=7.5.Why differentiate in σ2, not σ? The log-likelihood contains σ2 only through the two clean pieces log(σ2) and σ21. Treat the whole blockv=σ2 as one variable: dvdlogv=v1 and dvdv1=−v21 are painless. Differentiating in σ forces extra chain-rule factors and gives the identical answer with more mess. (By invariance of the MLE, σ^=σ^2 regardless.)
Recall Solution 3.2
Log-likelihood.logp(x∣λ)=logλ−λx, so
ℓ(λ)=∑i=1n(logλ−λxi)=nlogλ−λ∑i=1nxi.Differentiate & solve.dλdℓ=λn−∑xi=0⇒λ^=∑xin=xˉ1.Curvature check:ℓ′′=−λ2n<0 ⇒ maximum. For x={2,4,6}: ∑xi=12, n=3,
λ^=123=0.25.
Intuition: a large total wait ⇒ small rate. The rate is the reciprocal of the average wait — dimensionally and physically sensible.
Log-likelihood in two unknowns:ℓ(μ,σ2)=−2nlog(2π)−2nlog(σ2)−2σ21∑i=1n(xi−μ)2.Partial in μ (only the last term depends on μ):
∂μ∂ℓ=σ21∑i=1n(xi−μ)=0⇒μ^=xˉ.
The positive factor σ21 can never make the sum zero, so μ^=xˉregardless of σ2 — that is why we can solve μ first.
Partial in σ2, then substitute μ=xˉ:
∂(σ2)∂ℓ=−2σ2n+2(σ2)21∑(xi−μ^)2=0⇒σ^2=n1∑i=1n(xi−xˉ)2.
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
μ^=xˉ=52+4+4+4+6=520=4.
Squared deviations: (2−4)2=4,0,0,0,(6−4)2=4, sum =8.
σ^MLE2=58=1.6,s2=48=2.0.Why they differ: the MLE reuses xˉ — estimated from the same data — so the deviations are slightly too small (the data hugs its own mean). Dividing by n−1 instead of n corrects this. MLE variance is biased low but consistent (bias →0 as n→∞). See Bias-Variance Tradeoff.
Log-likelihood (for a valid θ, i.e. θ≥maxixi):
ℓ(θ)=∑i=1n(log(2xi)−2logθ)=const−2nlogθ.Differentiate:dθdℓ=−θ2n, 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 xi must satisfy xi≤θ, so θ≥maxixi. Pushing θ below maxxi makes the likelihood 0 (that data would be impossible).
The maximum sits on the boundary (see figure):
θ^MLE=imaxxi.
This is a support boundary MLE — the peak is a corner, not a smooth summit. Compare with Method of Moments, which would instead solve E[X]=32θ=xˉ⇒θ=23xˉ — a different estimator, showing MLE and MoM need not agree.
Recall Solution 5.2
Asymptotic normality (parent note property 2) says the variance of λ^ is approximately I(λ)−1=nλ2, so the standard error is
SE(λ^)≈nλ^2=nλ^=30.25≈0.1443.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 n=3 this is only a rough approximation; the guarantee is a large-n statement.)
Recall Quick self-test (reveal answers)
MLE maximises P(data∣θ) or P(θ∣data)? ::: P(data∣θ), the likelihood.
Bernoulli MLE for 6 heads in 8 flips ::: p^=0.75.
Gaussian MLE mean of {4,7,9,10} ::: μ^=7.5.
Exponential MLE for {2,4,6} ::: λ^=0.25.
MLE variance of {2,4,4,4,6} (n1) ::: σ^2=1.6; unbiased s2=2.0.
Triangular-on-[0,θ] MLE ::: θ^=maxixi (boundary!).
Why divide by n−1 for unbiased variance? ::: estimating the mean costs one degree of freedom.