Skip to main content

Welcome to a Grasp lesson

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

Lesson 32

MMSE Estimator as Posterior Mean

Recommended resources

Introduction

Welcome back to our journey into Bayesian inference. In the previous lesson, we accomplished a crucial task: deriving the full posterior distribution for a parameter, specifically the mean of a Gaussian model. We saw that the posterior, , represents our complete, updated state of knowledge about the parameter after observing data.

However, in many engineering and scientific applications, we need to distill this full distribution down to a single "best guess" or point estimate. For instance, what is our single best estimate for a vehicle's position, or a component's temperature? This lesson addresses exactly that question.

Our learning outcome is to derive the Minimum Mean Square Error (MMSE) estimator as the mean of the posterior distribution. We will define what "mean square error" is, prove that the estimator minimizing this error is the conditional expectation of the parameter, and connect this result directly to the posterior distribution we've been working with.


1. From Posterior Distributions to Point Estimates

We have a posterior distribution, which is great, but how do we choose a single value from it? Consider the posterior distribution shown below. What single point best represents it?

Mode, Median, and Mean of a Skewed Posterior Distribution
This graph shows a right-skewed posterior distribution, \(f(\theta|x)\). Three common choices for a point estimate are highlighted: the mode (the peak), the median (which splits the area in half), and the mean (the center of mass). Each one corresponds to optimizing a different objective.

As the image suggests, there are several candidates (mean, median, mode). The "best" choice depends on how we define and penalize error. Today, we focus on a widely used and powerful criterion: the Mean Squared Error (MSE).

The MSE of an estimator is defined as the expected squared difference between the estimator and the true value of the parameter :

Here, the expectation is taken over both the data (which makes random) and the parameter (which is a random variable in the Bayesian framework).

Using squared error is common in many fields of engineering and science. It penalizes large errors much more heavily than small ones, which is often a desirable property. Our goal is to find the estimator that makes this value as small as possible. This is the Minimum Mean Square Error (MMSE) estimator.


2. Deriving the MMSE Estimator

We want to find the estimator, which is a function of our data , let's call it , that minimizes the MSE.

The key to this derivation is the Law of Total Expectation, which allows us to break down the expectation into manageable parts. We can write the overall expectation as an expectation over the data , of the conditional expectation of the error given the data:

To minimize the overall expression, we can focus on minimizing the inner conditional expectation for every possible observed dataset :

Let's expand the term inside the conditional expectation. For a given , is just a constant value.

Using the linearity of expectation, this becomes:

This expression is a simple quadratic in . To find the value of that minimizes it, we can take the derivative with respect to and set it to zero, a standard optimization technique you'll be familiar with from calculus.

Setting this to zero gives the solution:

The second derivative is , which is positive, confirming this is a minimum.

This is a profound result. It states that for any given data , the estimate that minimizes the squared error is the conditional expectation of given the data. Therefore, the MMSE estimator is:

This is exactly the mean of the posterior distribution !

Derivation of the Minimum Mean Square Error (MMSE) Estimator
This image visually summarizes the derivation we just performed. It shows the process of minimizing the conditional expected squared error by taking the partial derivative with respect to the estimate \(\hat{\theta}\) and setting it to zero, leading to the conclusion that the optimal estimate is the conditional expectation.

The following PDF provides a formal write-up of this proof.

Bayesian Statistical Inference

The following chapter from a textbook on probability for computing formally defines and proves that the MMSE estimator is the mean of the posterior distribution. This will solidify the derivation we just walked through.

Please read Section 17.4, 'Minimum Mean Square Error Estimator' (starting on page 295). This section first defines the MMSE estimator (Definition 17.8) and then provides the formal proof in Theorem 17.12 that this estimator minimizes the MSE over all other estimators. Pay attention to how the proof structure matches our derivation.


3. A Comprehensive Video Walkthrough

Now that you have seen the derivation from first principles, let's watch a video that ties all these concepts together. It re-derives the result using a slightly different but equivalent algebraic method ("completing the square") and discusses several important properties of the MMSE estimator.

Probability 7.1 MMSE Estimation (2022)

This video from Bobak Nazer's lecture series provides an excellent and concise overview of MMSE estimation. It covers the setup, the rationale for using MSE, the derivation of the estimator, and its key properties.

Please watch the video from the beginning to 09:09. Focus on the following segments: (00:00 - 03:02): The problem setup and terminology (prior, observation model, estimator). (03:02 - 04:50): The motivation for using Mean Squared Error (MSE) as a performance metric. (04:50 - 07:32): The core derivation showing that the MMSE estimator is the conditional expectation of X given Y. Notice how this proof uses 'completing the square' to achieve the same result as our differentiation method. (07:32 - 09:09): A summary of key properties of the MMSE estimator, including unbiasedness and the orthogonality principle.


4. Properties of the MMSE Estimator

As mentioned in the video, the MMSE estimator has several elegant properties that are worth highlighting.

Unbiasedness

The MMSE estimator is unbiased in the Bayesian sense. This means that, on average, the estimation error is zero.

The proof is a simple application of the law of total expectation:

The Orthogonality Principle

This is a particularly important property with a nice geometric interpretation. The estimation error of the MMSE estimator is orthogonal to any function of the observations. Mathematically:

This is analogous to vector projections in linear algebra. The MMSE estimator can be seen as the projection of the random variable onto the space of all possible functions of the data . The error vector is therefore orthogonal (perpendicular) to that space. This principle is fundamental in signal processing and is the basis for deriving the famous Kalman filter.


5. Example: MMSE for the Gaussian-Gaussian Model

Let's bring this back to the example from our last lesson. We were estimating the mean of a Gaussian, and we derived the posterior distribution to be another Gaussian:

We've just proven that the MMSE estimate is the mean of this posterior distribution. For a Gaussian , the mean is simply .

Therefore, the MMSE estimator for the mean of a Gaussian with a conjugate Gaussian prior is:

This confirms the beautiful intuition from our last lesson: the "best" estimate in a mean-squared-error sense is the precision-weighted average of our prior belief and the evidence from the data.


Conclusion

In this lesson, we established a formal procedure for obtaining a single point estimate from a full posterior distribution.

Key Takeaways:

  • Point estimation aims to provide a single "best guess" for an unknown parameter based on data.
  • The choice of "best" depends on the cost function used to penalize errors.
  • Minimizing the Mean Squared Error (MSE), , is a common and powerful choice.
  • We formally derived that the estimator that minimizes the MSE is the conditional expectation of the parameter given the data, .
  • Crucially, this conditional expectation is precisely the mean of the posterior distribution, .

Preview of the Next Lesson:

We have now seen that the mean of the posterior gives us the MMSE estimate. What about the mode? In the next lesson, we will formally define the Maximum A Posteriori (MAP) estimator, which corresponds to the mode of the posterior distribution. We will derive it, explore its properties, and uncover its fascinating and practical connection to Maximum Likelihood Estimation (MLE) and L2 regularization (Ridge Regression), bridging our Bayesian journey back to the frequentist concepts we've already mastered.