Mean squared error


The mean squared error or mean squared deviation of a sample is the mean of the squares of the errors:

MSE=1Ni=1N(xiμ^)2\text{MSE}=\frac{1}{N}\sum_{i=1}^{N} (x_{i}-\hat{\mu})^{2}

where xix_{i} is the ii-th sample, μ^\hat{\mu} is the sample mean and NN is the sample size. Alternatively, in the case of an estimator over the sample, it can also be written as

MSE=b2+σ^2\text{MSE}=b^{2}+\hat{\sigma} ^{2}

where bb is the bias of the estimator and σ^2\hat{\sigma}^{2} is the sample variance. If the estimator is unbiased, it coincides with the sample Variance.