Maximum Likelihood Estimation#
In this simplified explanation, we focus on estimating the parameters of a univariate Gaussian distribution using Maximum Likelihood Estimation (MLE). The univariate Gaussian distribution is defined as:
where:
\(\mu\) is the mean,
\(\sigma^2\) is the variance.
Given a dataset \(\mathcal{D} = \{x_1, x_2, \dots, x_n\}\) of \(n\) i.i.d. samples, the goal is to estimate \(\mu\) and \(\sigma^2\) by maximizing the likelihood function.
Likelihood Function#
The likelihood function is the probability of observing the dataset \(\mathcal{D}\) given the parameters \(\mu\) and \(\sigma^2\):
Log-Likelihood Function#
To simplify the computation, we take the logarithm of the likelihood function (log-likelihood):
Simplifying further:
Estimating \(\mu\) and \(\sigma^2\)#
1. Estimating \(\mu\)#
To find the MLE for \(\mu\), we take the derivative of \(\ell(\mu, \sigma^2)\) with respect to \(\mu\) and set it to zero:
Solving for \(\mu\):
The MLE for \(\mu\) is the sample mean.
2. Estimating \(\sigma^2\)#
To find the MLE for \(\sigma^2\), we take the derivative of \(\ell(\mu, \sigma^2)\) with respect to \(\sigma^2\) and set it to zero:
Multiplying through by \(2\sigma^4\):
Solving for \(\sigma^2\):
The MLE for \(\sigma^2\) is the sample variance (with denominator \(n\) instead of \(n-1\)).
Summary#
The MLE estimates for the parameters of a univariate Gaussian distribution are:
Mean: \(\hat{\mu} = \frac{1}{n} \sum_{k=1}^n x_k\)
Variance: \(\hat{\sigma}^2 = \frac{1}{n} \sum_{k=1}^n (x_k - \hat{\mu})^2\)
These estimates maximize the likelihood of observing the given dataset under the assumed Gaussian model.