The mean squared error or mean squared deviation of a sample is the mean of the squares of the errors:
where is the -th sample, is the sample mean and is the sample size. Alternatively, in the case of an estimator over the sample, it can also be written as
where is the bias of the estimator and is the sample variance. If the estimator is unbiased, it coincides with the sample Variance.