Skip to main content

Welcome to a Grasp lesson

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

Lesson 40

Estimating Estimator Variance and MSE via Simulation

Continuing from our previous discussion on estimator bias, this lesson introduces the other critical dimensions for evaluating an estimator: its variance and Mean Squared Error (MSE). An estimator that is correct on average (unbiased) is desirable, but if its individual estimates are wildly scattered, it may not be very reliable. Variance captures this inconsistency. MSE provides a single, comprehensive measure of an estimator's quality by combining both its bias and its variance.

In our last session, you learned to numerically estimate the bias of an estimator by simulating datasets and comparing the average estimate to the true parameter value. Today, we will use the exact same simulated datasets and estimates to calculate the variance and MSE. This will give us a more complete picture of each estimator's performance and prepare us for the crucial concept of the bias-variance tradeoff in our next lesson.

Estimator Variance and Mean Squared Error

Let's formally define these two concepts before we begin our calculations.

  • Variance of an Estimator (): This measures the spread or dispersion of the estimates around their own average value. It quantifies the estimator's inconsistency. A high variance means the estimate you get from any single sample could be far from the average estimate. The formal definition is:

    When we have a set of estimates from our simulation (), we can estimate this variance using the standard formula for sample variance:

  • Mean Squared Error (MSE): This is perhaps the most important single measure of an estimator's quality. It measures the average squared difference between the estimate and the true parameter value (). It captures the total error, regardless of whether that error comes from systematic bias or random variance. The formal definition is:

    We can estimate this directly from our simulation by averaging the squared errors:

A fundamental identity in statistics connects these three concepts:

This equation shows that an estimator's total error is a sum of its variance (random error) and its squared bias (systematic error). We will use this relationship to verify our calculations.

Now, let's apply these formulas to the two scenarios from our previous lesson.



Application 1: Estimating Bra Band Elasticity

Recall: We are estimating the true mean stretch factor, , using two estimators based on samples of size .

  • Estimator 1 (, the sample mean):

    • Estimates: {1.82, 1.88, 1.78, 1.90}
    • Average Estimate (): 1.845
    • Estimated Bias:
  • Estimator 2 (, the trimmed mean):

    • Estimates: {1.7625, 1.825, 1.725, 1.825}
    • Average Estimate (): 1.784375
    • Estimated Bias:

Task: Estimate the variance and MSE for both estimators.

Calculation for Estimator 1: Sample Mean ()

  1. Estimate the Variance: We calculate the squared deviations of each estimate from their average (1.845).

  2. Estimate the MSE: We calculate the squared deviations of each estimate from the true value ().

Calculation for Estimator 2: Trimmed Mean ()

  1. Estimate the Variance: We calculate the squared deviations of each estimate from their average (1.784375).

  2. Estimate the MSE: We calculate the squared deviations of each estimate from the true value ().

Interpretation:
Let's summarize our findings for the bra-fitting scenario:

Estimator Estimated Bias Estimated Variance Estimated MSE
Sample Mean () +0.045 0.00303 0.0043
Trimmed Mean () -0.0156 0.00243 0.00207

In our simulation, the trimmed mean () has a lower variance and a lower MSE than the standard sample mean. Even though the trimmed mean is biased, its combined error (MSE) is smaller, suggesting it might be a better overall estimator in this context. This is a practical demonstration of why a biased estimator can sometimes be preferable.



Application 2: Estimating Relationship Satisfaction

Recall: We are estimating the true proportion of "highly satisfactory" weeks, , using two estimators based on simulated outcomes from samples of size .

  • Estimator 1 (, the sample proportion):

    • Estimates: {0.7, 0.5, 0.6, 0.4, 0.8}
    • Average Estimate (): 0.6
    • Estimated Bias: 0
  • Estimator 2 (, the Laplace estimator):

    • Estimates: {0.667, 0.500, 0.583, 0.417, 0.750}
    • Average Estimate (): 0.5834
    • Estimated Bias:

Task: Estimate the variance and MSE for both estimators.

Calculation for Estimator 1: Sample Proportion ()

  1. Estimate the Variance: Deviations from the average (0.6).

  2. Estimate the MSE: Deviations from the true value (). Since the average estimate is exactly 0.6, these deviations are the same.

    Since the estimated bias is zero, the estimated MSE is simply the estimated variance (adjusted for the denominator, ).

Calculation for Estimator 2: Laplace Estimator ()

  1. Estimate the Variance: Deviations from the average (0.5834).

  2. Estimate the MSE: Deviations from the true value ().

Interpretation:
Let's summarize our findings for the relationship satisfaction scenario:

Estimator Estimated Bias Estimated Variance Estimated MSE
Sample Prop. () 0 0.025 0.020
Laplace () -0.0166 0.01735 0.01415

Here again, the Laplace estimator (), despite its small negative bias, shows both a lower variance and a lower MSE. By "pulling" the extreme estimates closer to the center, it reduces the overall spread, resulting in a more consistently accurate estimate as measured by MSE.


Conclusion

In this lesson, you have extended your analysis of estimators from bias to include variance and Mean SquaredError. By performing these hand-calculations, you can see concretely how these abstract statistical properties manifest in practice.

Key Takeaways:

  • Estimator Variance measures the consistency or spread of estimates. We estimate it by calculating the sample variance of the estimates generated during a simulation.
  • Mean Squared Error (MSE) is a comprehensive measure of an estimator's total error, combining both variance and bias via the formula .
  • We can estimate MSE directly by averaging the squared differences between our estimates and the true parameter value.
  • A biased estimator can sometimes be superior to an unbiased one if it has a sufficiently smaller variance. The MSE allows us to make this comparison formally.

We have now established the three core metrics for evaluating an estimator: bias, variance, and MSE. In our next lesson, we will synthesize these ideas to explore the famous bias-variance tradeoff, a central dilemma in statistics and machine learning where attempts to decrease one type of error often lead to an increase in the other.