Math & Statistics

Maximum Likelihood Estimation

Finding the parameter values that maximize the probability of observing your collected sample data.

🟡 intermediate4 min readstatisticsestimation
Maximum Likelihood Estimation (MLE) estimates parameters θ of a probability distribution by maximizing the Likelihood function L(θ) = P(X | θ). For i.i.d. data, we maximize Log-Likelihood log L(θ) = ∑ log P(x_i | θ) because log turns products into computationally stable sums. MLE forms the statistical foundation for parameter fitting in OLS Linear Regression (under Gaussian noise), Logistic Regression, and Neural Networks (via Cross-Entropy).

The Likelihood Function

Given i.i.d. observations $X = {x_1, x_2, \dots, x_N}$ from distribution $P(x | \theta)$:

$$L(\theta) = P(X | \theta) = \prod_{i=1}^N P(x_i | \theta)$$

$$\text{Log-Likelihood: } \ell(\theta) = \ln L(\theta) = \sum_{i=1}^N \ln P(x_i | \theta)$$

$$\hat{\theta}{\text{MLE}} = \arg\max\theta \ell(\theta)$$

To find $\hat{\theta}{\text{MLE}}$, solve score equation $\nabla\theta \ell(\theta) = 0$.

MLE Equivalence in ML Models

Asymptotic Properties of MLE

  1. Consistency: As sample size $N \to \infty$, MLE $\hat{\theta}_{\text{MLE}} \to \theta^*$ (converges to true parameter).
  2. Asymptotic Normality: As $N \to \infty$, $\hat{\theta} \sim \mathcal{N}\left(\theta^*, I(\theta)^{-1}\right)$, where $I(\theta)$ is the Fisher Information Matrix.
  3. Efficiency: Achieves the Cramér-Rao lower bound for variance among unbiased estimators.

Say this out loud

"Maximum Likelihood Estimation finds parameter values that maximize the probability of observing the data. We maximize Log-Likelihood because log converts probability products into stable additions. Under Gaussian noise assumptions, maximizing MLE is mathematically identical to minimizing MSE loss in linear regression, while under Bernoulli assumptions it corresponds to Cross-Entropy."

Follow-ups to expect

Check yourself

Question 1 of 3

Why do we maximize Log-Likelihood log L(θ) instead of raw Likelihood L(θ) = ∏ P(x_i | θ) in practice?

More in Math & Statistics

See all →
Bayes’ Theorem4 minCentral Limit Theorem4 minLaw of Large Numbers4 min