01 / 21

Likelihood
Manipulation

Master the art of manipulating likelihoods and log-likelihoods to derive maximum likelihood estimators: the workhorse of statistical inference.

Statistics Graduate Level

What Is a Likelihood Function?

Given observed data \( \mathbf{x} = (x_1, x_2, \ldots, x_n) \) and a parametric model \( f(x \mid \theta) \), the likelihood function treats the joint density as a function of the parameter:

The likelihood is not a probability distribution over \( \theta \). It quantifies how well each candidate \( \theta \) explains the observed data.

The Log-Likelihood Transform

Products are hard to differentiate and numerically unstable. Taking the natural logarithm converts products into sums:

✓ Monotonic
\(\ln\) is strictly increasing, so \(\arg\max_\theta L(\theta) = \arg\max_\theta \ell(\theta)\).
✓ Simpler Calculus
Sum derivatives are easier than product derivatives via the product rule.

Why Likelihood Manipulation Matters

MLE
Maximum Likelihood Estimation is the most widely used point estimation method across all of statistics.
Inference
Likelihood ratios underpin hypothesis tests, confidence intervals, and model comparison (AIC, BIC).
Bayesian
The likelihood is the bridge between prior and posterior: \( p(\theta \mid \mathbf{x}) \propto L(\theta)\, p(\theta) \).

The MLE Recipe: Core Theorem

1
Write the log-likelihood \(\ell(\theta)\).
2
Differentiate with respect to \(\theta\) and set the score equation to zero: \( \ell'(\theta) = 0 \).
3
Solve for \(\hat{\theta}\).
4
Verify it is a maximum: check \( \ell''(\hat{\theta}) < 0 \).

Score Function and Fisher Information

Score Function
$$ S(\theta) = \frac{\partial}{\partial \theta} \ell(\theta) $$ At the true \(\theta_0\): \(\; E[S(\theta_0)] = 0\).
Fisher Information
$$ \mathcal{I}(\theta) = -E\!\left[\frac{\partial^2}{\partial \theta^2} \ell(\theta)\right] $$ Measures the curvature of \(\ell\) at \(\theta\).

Likelihood vs Log-Likelihood

\( L(\theta) \) \( \ell(\theta) \)
Form Product of densities Sum of log-densities
Differentiation Product rule (messy) Sum rule (clean)
Numerical Stability Underflow for large \( n \) Stable sums
Same Maximizer? Yes: \(\ln\) is monotone increasing
Common Usage Theoretical definitions All practical computation

Step-by-Step MLE Derivation

1
Specify the model: write \( f(x_i \mid \theta) \) for one observation.
2
Form the likelihood: \( L(\theta) = \prod_{i=1}^n f(x_i \mid \theta) \).
3
Take the log: \( \ell(\theta) = \sum_{i=1}^n \ln f(x_i \mid \theta) \). Simplify using log rules.
4
Differentiate: compute \( \frac{d\ell}{d\theta} \) and set equal to zero.
5
Solve: isolate \( \hat{\theta} \) algebraically.
6
Verify: confirm \( \ell''(\hat{\theta}) < 0 \) to ensure a maximum.

Example 1: Bernoulli MLE

Let \( X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Bernoulli}(p) \). Find \( \hat{p}_{\text{MLE}} \).

Bernoulli Log-Likelihood Curve

\(p\)
\(\ell(p)\)
0 0.5 1
\(\hat{p} = 0.7\)
ℓ(p) concave → unique max

Example 2: Normal Mean MLE

Let \( X_1, \ldots, X_n \overset{\text{iid}}{\sim} \mathcal{N}(\mu, \sigma^2) \) with \(\sigma^2\) known. Find \( \hat{\mu}_{\text{MLE}} \).

Example 3: Exponential MLE

Let \( X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Exp}(\lambda) \) with density \( f(x \mid \lambda) = \lambda e^{-\lambda x} \) for \( x \geq 0 \).

Multiparameter: Normal \((\mu, \sigma^2)\)

When both \(\mu\) and \(\sigma^2\) are unknown, take partial derivatives and solve the system simultaneously.

\(\frac{\partial \ell}{\partial \mu} = 0\)
$$ \hat{\mu} = \bar{x} $$
\(\frac{\partial \ell}{\partial \sigma^2} = 0\)
$$ \hat{\sigma}^2 = \frac{1}{n}\sum_{i=1}^n(x_i - \bar{x})^2 $$

Visualizing the Log-Likelihood Surface

\(\mu\)
\(\sigma^2\)
MLE
\(\ell = c_1\)
\(c_2\)
\(c_3\)
\(\bar{x}\)
\(\nabla\ell\)
\(\nabla\ell\)

Common Mistakes

✕ Forgetting the Log
Differentiating \(L(\theta)\) directly instead of \(\ell(\theta)\) leads to a product-rule nightmare and frequent algebraic errors.
✕ Dropping Constants
Constants like \(-\frac{n}{2}\ln(2\pi)\) don't affect the maximizer, but dropping terms that contain \(\theta\) ruins the answer.
✕ Not Checking \(\ell''\)
Setting \( \ell'(\theta) = 0 \) only finds critical points. Without checking \( \ell'' < 0 \), you might find a minimum or saddle point.
✕ Domain Errors
For bounded parameters (e.g., \( p \in (0,1) \) or \( \lambda > 0 \)), critical points outside the domain are meaningless. Check boundary behavior.
✕ Confusing \(n\) and \(n-1\)
The MLE of \(\sigma^2\) divides by \(n\). The unbiased estimator \(S^2\) divides by \(n-1\). These are different estimators with different goals.

Summary of Key MLEs

Distribution Parameter MLE
Bernoulli(\(p\)) \(p\) \(\bar{x}\)
Poisson(\(λ\)) \(λ\) \(\bar{x}\)
Exp(\(λ\)) \(λ\) \(1 / \bar{x}\)
Normal(\(μ, σ^2\)) \(μ\) \(\bar{x}\)
Normal(\(μ, σ^2\)) \(σ^2\) \(\frac{1}{n}\sum(x_i - \bar{x})^2\)
Uniform(0, \(θ\)) \(θ\) \(x_{(n)} = \max(x_i)\)

Question 1 of 5

If \( X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Poisson}(\lambda) \), what is the MLE \(\hat{\lambda}_{\text{MLE}}\)?

Question 2 of 5

Why do we maximize \(\ell(\theta) = \ln L(\theta)\) instead of \(L(\theta)\) directly?

Question 3 of 5

For \(X_1, \ldots, X_n \overset{\text{iid}}{\sim} \mathcal{N}(\mu, \sigma^2)\) with both parameters unknown, the MLE of \(\sigma^2\) is:

Question 4 of 5

Which condition must you verify after solving \(\ell'(\hat{\theta}) = 0\) to confirm that \(\hat{\theta}\) is indeed a maximum?

Question 5 of 5

For \(X_1, \ldots, X_n \overset{\text{iid}}{\sim} \text{Uniform}(0, \theta)\), the MLE of \(\theta\) is: