To find the likelihood function for a normal distribution and subsequently determine the maximum likelihood estimator (MLE) for the parameters μ and σ2, follow these steps:
Step 1: Define the normal distribution probability density function (PDF)
The PDF of a normal distribution with mean μ and variance σ2 is given by:
$f(x_i | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x_i-\mu)^2}{2\sigma^2}}$
Step 2: Define the likelihood function
Given a set of observations x1,x2,…,xn, the likelihood function, , is the product of the individual PDFs:
$L(\mu, \sigma^2 | x_1, x_2, \dots, x_n) = \prod_{i=1}^n f(x_i | \mu, \sigma^2)$
Step 3: Compute the log-likelihood function
Instead of working with the likelihood function directly, it's common to use the log-likelihood function because it simplifies calculations and avoids numerical issues. The log-likelihood function, l(μ,σ2), is the natural logarithm of the likelihood function:
$l(\mu, \sigma^2) = \ln{L(\mu, \sigma^2)} = \sum_{i=1}^n \ln{f(x_i | \mu, \sigma^2)}$
Substitute the normal distribution PDF into the log-likelihood function:
$l(\mu, \sigma^2) = \sum_{i=1}^n \ln{\left(\frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{(x_i-\mu)^2}{2\sigma^2}}\right)}$
Simplify the log-likelihood function:
$l(\mu, \sigma^2) = -\frac{n}{2} \ln{(2\pi\sigma^2)} - \frac{1}{2\sigma^2} \sum_{i=1}^n (x_i - \mu)^2$
Step 4: Find the MLE for the parameters μ and σ2
To find the MLE for μ and σ2, we need to maximize the log-likelihood function with respect to both parameters. We'll do this by taking the partial derivatives with respect to and and setting them equal to zero.
a) MLE for μ:
$\frac{\partial l}{\partial \mu} = \frac{1}{\sigma^2} \sum_{i=1}^n (x_i - \mu) = 0$
Summing over all xi, we get:
$\sum_{i=1}^n x_i - n\mu = 0$
Solving for μ:
$\hat{\mu} = \frac{1}{n} \sum_{i=1}^n x_i$
The MLE for μ is the sample mean.
b) MLE for σ2:
$\frac{\partial l}{\partial \sigma^2} = -\frac{n}{2\sigma^2} + \frac{1}{2(\sigma^2)^2} \sum_{i=1}^n (x_i - \mu)^2 = 0$
Now, we will multiply through by 2σ2 to simplify the equation:
$-n + \frac{1}{\sigma^2} \sum_{i=1}^n (x_i - \mu)^2 = 0$
Next, we will isolate the term σ21:
$\frac{1}{\sigma^2} \sum_{i=1}^n (x_i - \mu)^2 = n$
Now, we can solve for σ2:
$\hat{\sigma^2} = \frac{1}{n} \sum_{i=1}^n (x_i - \mu)^2$
The MLE for σ2 is the sample variance.
In summary, you can follow these steps:
- Define the normal distribution PDF.
- Define the likelihood function.
- Compute the log-likelihood function.
- Find the MLE for the parameters
$\mu$ and $\sigma^2$ by maximizing the log-likelihood function with respect to both parameters.