Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 21

MLE for Common Distributions

Recommended resources

Introduction

In our last lesson, we discovered the Rao-Blackwell theorem, a powerful method for improving an existing unbiased estimator by conditioning it on a sufficient statistic. This naturally leads to the question: How do we find a good estimator in the first place, without relying on guesswork?

Welcome to the lesson on Maximum Likelihood Estimation (MLE). This is arguably the most important and widely used method for deriving parameter estimators in statistics. The core idea is beautifully simple: given your observed data, what are the parameter values for your chosen probability model that make the data most likely?

This approach reframes estimation as an optimization problem. Your experience with modeling physical systems in engineering involves identifying parameters that best fit observed behavior; MLE provides a formal, probabilistic framework for this very task.

In this lesson, you will learn the principle of maximum likelihood and apply it to derive the estimators for the parameters of three fundamental distributions: the Normal, Exponential, and Poisson. This will fulfill your request for detailed mathematical derivations and provide a cornerstone for much of the statistical modeling we will encounter later in the course.


1. The Principle of Maximum Likelihood

Before we start deriving estimators, let's formally define the core concepts. We need to distinguish between a probability distribution and a likelihood function, and understand why we almost always work with the log-likelihood.

[PDF] Chapter 6 Likelihood Inference

This reading from a statistics textbook by Evans and Rosenthal provides the formal definitions we need. It introduces the likelihood function, explains its interpretation, and defines the Maximum Likelihood Estimator (MLE).

Please read the following sections: Section 6.1: The Likelihood Function (pages 297-300). Focus on the distinction between the probability function f_θ(s) and the likelihood function L(θ|s). Understand that likelihood provides a belief ordering on the parameter values. Section 6.2: Maximum Likelihood Estimation (pages 308-311). Pay close attention to Definition 6.2.1 (MLE), Definition 6.2.2 (log-likelihood), and the general calculus-based procedure for finding the MLE by solving the 'score equation' S(θ|s)=0.

To summarize the key ideas from the reading:

  • Likelihood Function, L(θ|x): For an observed dataset , the likelihood function is the joint probability density (or mass) function treated as a function of the parameter . For i.i.d. data, this is .
  • Maximum Likelihood Estimator (MLE), : The MLE is the value of from the parameter space that maximizes the likelihood function.
  • Log-Likelihood Function, l(θ|x): To make the math easier, we maximize the natural logarithm of the likelihood, . Since log is a monotonically increasing function, this gives the same result. For i.i.d. data, this conveniently turns the product into a sum:
  • The Procedure:
    1. Write the log-likelihood function.
    2. Take its derivative with respect to the parameter . This derivative is called the score function.
    3. Set the score function to zero and solve for .
    4. Verify that the solution is a maximum (usually by checking that the second derivative is negative).

Now, let's apply this procedure to our three target distributions.


2. MLE for the Normal Distribution

We'll start with the most common continuous distribution, the Normal distribution, which has two parameters: the mean and the variance . The derivation involves partial derivatives with respect to both parameters.

The following video provides an exceptionally clear, step-by-step walkthrough of this derivation.

Maximum Likelihood For the Normal Distribution, step-by-step!!!

This StatQuest video with Josh Starmer is a masterclass in explaining the MLE derivation for a Normal distribution. It visually and mathematically breaks down every step, from building the likelihood function to using the log-likelihood trick and solving the score equations.

Watch the entire video (00:48 - 19:29). It perfectly covers the learning outcome for the Normal distribution. Follow along with the algebraic manipulations, especially the simplification of the log-likelihood and the calculus steps.

As the video proved, for a sample from a Normal distribution :

  1. The log-likelihood function is:

  2. Taking the partial derivative with respect to and setting to zero gives the MLE for the mean:

  3. Taking the partial derivative with respect to and setting to zero gives the MLE for the variance:

The MLE for the mean is the sample mean, and the MLE for the variance is the sample variance with a denominator of .


3. MLE for the Exponential Distribution

Next, let's tackle the Exponential distribution, which models the time between events in a Poisson process. This is a simpler, single-parameter case.

Maximum Likelihood for the Exponential Distribution, Clearly Explained!!!

This StatQuest video provides an equally clear explanation for deriving the MLE of the rate parameter λ in an Exponential distribution.

Watch the video from 00:31 to 09:04. It covers the definition of the distribution, building the likelihood, and the full derivation of the MLE for λ.

As derived in the video and in Example 6.2.3 of the textbook (LINK), for a sample from an Exponential distribution with rate parameter , the PDF is .

  1. The log-likelihood function is:

  2. Taking the derivative with respect to and setting it to zero gives:

The MLE for the rate parameter is the reciprocal of the sample mean. This is intuitive: if the average time between events () is long, the rate of events () is low.


4. MLE for the Poisson Distribution

Finally, let's derive the MLE for a discrete distribution: the Poisson. This distribution models the number of events occurring in a fixed interval of time or space.

Maximum Likelihood Estimators for Poisson Distribution
This diagram illustrates the core idea of MLE for the Poisson distribution. We have some data points (X_i), and we want to find the parameter λ that maximizes the likelihood of observing this specific dataset.

We'll work through this derivation together, applying the principles we've just learned. This task corresponds to Exercise 6.2.4 in the textbook (LINK).

Let be an i.i.d. sample from a Poisson() distribution. The probability mass function (PMF) is:

  1. Write the likelihood function. The joint probability of observing our sample is:

  2. Write the log-likelihood function.

    Using logarithm rules to simplify:

    Summing over the terms:

  3. Take the derivative with respect to . The last term, , does not depend on , so its derivative is zero.

  4. Set the derivative to zero and solve.

The Maximum Likelihood Estimator for the rate parameter of a Poisson distribution is simply the sample mean.


Conclusion

In this lesson, we established a general and powerful principle for finding estimators. By maximizing the likelihood (or log-likelihood) function, we can derive estimators for the parameters of a wide variety of statistical models.

Key Takeaways:

  • Maximum Likelihood Estimation (MLE) finds the parameter values that make the observed data most probable.
  • The log-likelihood function is a critical computational tool that simplifies the optimization problem by converting products into sums.
  • We derived the MLEs for three key distributions:
    • Normal : and .
    • Exponential(): .
    • Poisson(): .

You may notice that these estimators are often functions of the sufficient statistics we identified in the previous lesson (e.g., and ). This is a deep and important property of MLEs that we will revisit.


Self-Test

Let's test your understanding of the MLE procedure. Consider a random sample of size , , from a Bernoulli() distribution, where is the unknown probability of success. The PMF is for .

  1. Write down the log-likelihood function .
  2. Take the derivative of the log-likelihood with respect to .
  3. Set the derivative to zero and solve to find the MLE for . Does the result seem intuitive?

Preview of the Next Lesson:

We have now seen how to derive estimators for the parameters of specific probability distributions. In the next lesson, we will shift our focus to a different but related problem: modeling the relationship between variables. We will introduce Ordinary Least Squares (OLS) and derive the famous Normal Equations using matrix calculus. We will then discover a profound connection: for a linear model with normally distributed errors, the OLS estimator is identical to the Maximum Likelihood Estimator. This will bridge the gap between probabilistic estimation and linear regression.