... | ... | @@ -6,13 +6,13 @@ |
|
|
|
|
|
MLE is widely used in various types of models, including linear regression, generalized linear models (GLMs), and more complex models like logistic regression and mixed models. The key idea is to choose the parameter estimates that maximize the likelihood, providing the best fit of the model to the data.
|
|
|
|
|
|
In mathematical terms, given a set of data \(X = \{x_1, x_2, \dots, x_n\}\) and a statistical model with parameter \(\theta\), the likelihood function \(L(\theta)\) is:
|
|
|
In mathematical terms, given a set of data $X = \{x_1, x_2, \dots, x_n\}$ and a statistical model with parameter $\theta$, the likelihood function $L(\theta)$ is:
|
|
|
|
|
|
$$
|
|
|
L(\theta | X) = P(X | \theta)
|
|
|
$$
|
|
|
|
|
|
The goal of MLE is to find the value of \(\theta\) that maximizes \(L(\theta | X)\).
|
|
|
The goal of MLE is to find the value of $\theta$ that maximizes $L(\theta | X)$.
|
|
|
|
|
|
### 2. How to Calculate MLE
|
|
|
|
... | ... | @@ -20,7 +20,7 @@ MLE involves solving an optimization problem, where the likelihood function is m |
|
|
|
|
|
#### Steps to Calculate MLE:
|
|
|
|
|
|
1. **Specify the Likelihood Function**: Define the likelihood function based on the probability distribution of the data. For example, in a normal distribution model, the likelihood function is based on the assumption that the data follows a normal distribution with parameters \(\mu\) (mean) and \(\sigma^2\) (variance).
|
|
|
1. **Specify the Likelihood Function**: Define the likelihood function based on the probability distribution of the data. For example, in a normal distribution model, the likelihood function is based on the assumption that the data follows a normal distribution with parameters $\mu$ (mean) and $\sigma^2$ (variance).
|
|
|
|
|
|
For normally distributed data, the likelihood function is:
|
|
|
|
... | ... | @@ -40,8 +40,8 @@ MLE involves solving an optimization problem, where the likelihood function is m |
|
|
|
|
|
For the normal distribution, the maximum likelihood estimates are:
|
|
|
|
|
|
- \(\hat{\mu} = \frac{1}{n} \sum_{i=1}^{n} x_i\) (the sample mean)
|
|
|
- \(\hat{\sigma}^2 = \frac{1}{n} \sum_{i=1}^{n} (x_i - \hat{\mu})^2\) (the sample variance)
|
|
|
- $\hat{\mu} = \frac{1}{n} \sum_{i=1}^{n} x_i$ (the sample mean)
|
|
|
- $\hat{\sigma}^2 = \frac{1}{n} \sum_{i=1}^{n} (x_i - \hat{\mu})^2$ (the sample variance)
|
|
|
|
|
|
4. **Numerical Optimization**: In more complex models, the likelihood function may not have a closed-form solution, requiring numerical optimization techniques such as **gradient descent** or **Newton-Raphson** methods to find the maximum likelihood estimates.
|
|
|
|
... | ... | |