Likelihood
Manipulation
Master the art of manipulating likelihoods and log-likelihoods to derive maximum likelihood estimators: the workhorse of statistical inference.
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:
Why Likelihood Manipulation Matters
The MLE Recipe: Core Theorem
Score Function and Fisher Information
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
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
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.
Visualizing the Log-Likelihood Surface
Common Mistakes
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: