In statistics, the mean squared error or MSE of an estimator is the expected value of the square of the "error." The error is the amount by which the estimator differs from the quantity to be estimated. The difference occurs because of randomness or because the estimator doesn't account for information that could produce a more accurate estimate.

## Definition and basic properties

The MSE of an estimator with respect to the estimated parameter is defined as It can be shown that the MSE is the sum of the variance and the bias of the estimator In that sense, the MSE assess the quality of the estimator in terms of its variation and unbiasedness. Note, that the MSE is not equivalent to the expected value of the absolute error.

The root mean squared error (RMSE) (or root mean squared deviation (RMSD)) is then simply defined as the square root of the MSE. The defined MSE (as well as the RMSE) is a random variable, that needs to be estimated itself. This usually done by the sample mean with being realizations of the estimator of size .

## Examples

Suppose we have a random sample of size n from a normally distributed population, .

Some commonly-used estimators of the true parameters of the population, μ and σ2, are:

True value Estimator Mean squared error
θ = μ = the unbiased estimator of the sample mean,  θ = σ2 = the unbiased estimator of the sample variance,  Notice how these examples also illustrate one facet of the bias-variance decomposition. The MSE of unbiased estimators are just their variance. The MSE of a biased estimator would have a non-zero bias term as well as a variance term. Note that the estimator that minimizes the MSE is not necessarily unbiased; it could compensate for the bias with a smaller variance. In the example above, a biased estimator for the variance, , actually has a smaller mean squared error than the formula given, despite being biased by .

## Applications

• In statistical modelling, the MSE is defined as the difference between the actual observations and the response predicted by the model and is used to determine whether the model does not fit the data or whether the model can be simplified by removing terms.