Introduction
Welcome to the final lesson in our module on Maximum Likelihood and Least Squares Estimation. In the past few lessons, you've become proficient at finding Maximum Likelihood Estimators (MLEs), both by solving the score equation analytically for simpler models and by using numerical optimization for more complex, custom distributions in Python.
So far, our focus has been on estimating the direct parameters of a model, such as and for a Normal distribution, or and for a Beta distribution. But what if we are interested in a function of these parameters? For example, we might estimate the variance , but ultimately need the standard deviation . Or, in a classification context, we might estimate a probability , but the model is more naturally expressed in terms of log-odds, .
Does this mean we need to re-write the entire likelihood function in terms of the new parameter and start the optimization process all over again? Fortunately, the answer is no. Maximum Likelihood Estimation possesses an elegant and powerful feature called the invariance property. This lesson is dedicated to analyzing this property, which provides a remarkable shortcut for finding the MLE of transformed parameters.
1. The Principle of Invariance
The invariance property of Maximum Likelihood Estimators is straightforward to state:
If is the Maximum Likelihood Estimate of a parameter , and is some function of , then the Maximum Likelihood Estimate of is simply .
Let's make this concrete with a simple example you're already familiar with. For i.i.d. data from a Normal distribution , we found the MLEs to be:
Now, suppose we are interested in the standard deviation, . This is a function of the variance: . According to the invariance property, the MLE for is:
This result is intuitive, but it's not a trivial property that holds for all types of estimators. For MLE, it's a guaranteed and exceptionally useful feature.
To get a clear conceptual overview of this property, please watch the following short segment from a video by zedstatistics.
Maximum Likelihood Estimation (MLE) | Score equation | Information | Invariance
This video provides a concise explanation of several properties of MLEs. We will focus specifically on the segment that introduces and explains the invariance property.
Please watch from 23:45 to 25:03. The narrator gives a clear, high-level summary of what the invariance property is and why it's useful.
2. A Formal Proof
Given your interest in mathematical rigor, let's now formally prove this property. The proof is quite elegant and relies directly on the definition of the MLE as the parameter value that maximizes the likelihood function. We'll focus on the case where the transformation function is one-to-one, as this is the clearest and most common scenario.
A.6.5 The Invariance Principle
The following document, from a course at the University of Toronto, contains a section dedicated to the invariance principle. It provides a clean, step-by-step proof that is excellent for understanding the formal justification behind the property.
Please read the text in Section A.6.5, starting from the beginning down to the end of the proof (before the exercises). This section begins with the title 'The Invariance Principle' and the proof concludes with the line '...this can only happen if bθ′1 = bθ′2'. Focus on how the maximization of the original likelihood L(θ) relates to the maximization of the reparameterized likelihood L'(θ').
Let's summarize the logic of the proof you just read:
-
Setup: Let be the unique MLE of , meaning it maximizes the likelihood function . Let be a one-to-one reparameterization, which implies an inverse function exists.
-
Reparameterize the Likelihood: The likelihood can be expressed in terms of the new parameter as .
-
The Maximizer: Let be the MLE for , meaning it maximizes . Our goal is to show that .
-
Proof by Contradiction: Assume .
- This implies that . Let's call .
- Since is the unique maximizer of , it must be that .
- Now, let's substitute the functions back in: .
- Using the definition of our reparameterized likelihood, this means .
- This simplifies to .
-
Conclusion: The last inequality, , states that the likelihood evaluated at is greater than the likelihood evaluated at . This contradicts our initial statement that is the value that maximizes the function . Therefore, our assumption was wrong, and it must be that .
While this proof is for a one-to-one function, it's worth noting that the property holds even when the function is not one-to-one.
3. Invariance in Action: From Probability to Log-Odds
Let's see how this property saves us work in a more complex scenario. Consider data from a Bernoulli process (e.g., coin flips), where we estimate the probability of success, . The MLE for is the sample mean: .
In many statistical models, particularly logistic regression, it is more convenient to work with log-odds instead of probability. The odds are defined as , and the log-odds are . This transformation, , maps the probability from to the entire real line , which has desirable properties for linear modeling.
Without the invariance property, you would have to:
- Express in terms of .
- Substitute this into the Bernoulli likelihood function to get .
- Differentiate with respect to .
- Set the derivative to zero and solve for .
With the invariance property, the solution is immediate. The MLE for the log-odds is:
The following video segment walks through this exact example and also introduces an important related concept: how to find the variance of this new, transformed estimator using the Delta Method. This connects beautifully to our next module, where we will rigorously evaluate the performance of estimators.
Maximum Likelihood Estimation (MLE) | Score equation | Information | Invariance
Let's return to the zedstatistics video to see the log-odds example in action. Pay attention to how the invariance principle simplifies finding the new MLE. Also, note the introduction of the Delta Method, which uses the derivative of the transformation function to approximate the variance of the new estimator.
Please watch from 24:44 to 27:45.
The Delta Method provides a way to perform a first-order Taylor approximation to find the variance of a transformed random variable. For a transformed estimator , its variance is approximately:
This is a very useful technique in statistical inference, and we will see more of these concepts when we discuss the performance and properties of estimators in detail.
4. Hands-on Application
Let's apply the invariance principle to the coding exercise from our previous lesson. You wrote a script to find the MLEs for the parameters and of a Beta distribution.
A key property of the Beta distribution is its mean, which is given by the function:
Exercise:
Modify your Python script from the last lesson. After finding the MLEs and , use the invariance property to calculate the MLE for the mean of the Beta distribution, .
Add the following lines to the end of your script:
# ... (previous code for finding result.x)
# 7. Apply the invariance property to find the MLE for the mean
if result.success:
estimated_alpha, estimated_beta = result.x
# The function is g(alpha, beta) = alpha / (alpha + beta)
estimated_mean_mle = estimated_alpha / (estimated_alpha + estimated_beta)
# For comparison, calculate the actual sample mean
sample_mean = np.mean(data)
print(f"\nMLE for the mean (via invariance): {estimated_mean_mle:.4f}")
print(f"Actual sample mean: {sample_mean:.4f}")
You will notice that the MLE for the mean, calculated via the invariance property, is exactly equal to the sample mean of the data. This is not a coincidence! It turns out that for the Beta distribution, the Method of Moments estimator for the mean and the Maximum Likelihood Estimator for the mean are identical. The invariance property allows us to see this connection easily.
Conclusion
In this lesson, we explored the invariance property, a cornerstone of Maximum Likelihood Estimation. It provides a powerful and convenient method for finding the MLE of any function of a parameter without re-running the entire estimation procedure.
Key Takeaways:
- Invariance Property: If is the MLE of , the MLE of is simply .
- Utility: This property greatly simplifies reparameterization, a common task in statistical modeling (e.g., converting variance to standard deviation, or probability to log-odds).
- Justification: The property is backed by a formal proof based on the definition of the MLE as a maximizer of the likelihood function.
Preview of the Next Module:
This lesson concludes our exploration of how to find estimators. We are now equipped with the Method of Moments, analytical MLE, and numerical MLE. The next module, "Optimality and Performance of Estimators," shifts our focus from finding estimators to evaluating them. We will ask critical questions: Is our estimator biased? What is its variance? Is there a theoretical "best" possible estimator? Answering these will lead us to two of the most important results in classical estimation theory: the Cramér-Rao Lower Bound (CRLB) and the Gauss-Markov theorem. These concepts will provide the rigorous benchmarks needed to assess the quality of the estimators you derive.