# Statistics - (Average|Mean) Squared (MS) prediction error (MSE)

The residual is a measure of prediction error in case of regression based on the residual and is a measure of model accuracy.

## 3 - Formula

### 3.1 - 1

(Average|Mean) Squared (MS) prediction error (of variance) of Mean Squared Error

$$\begin{array}{rrl} \text{Mean Squared Error (MSE)} & = & \frac{\displaystyle \sum_{i=1}^{\href{sample_size}{N}}{(\href{raw_score}{Y}_i- \href{target}{\hat{Y}}_i)^2}}{\displaystyle \href{degree_of_freedom}{\text{Degree of Freedom}}} \\ & = & \frac{\displaystyle \sum_{i=1}^{\href{sample_size}{N}}{(\href{residual}{\text{Residual}}_i)^2}}{\displaystyle \href{degree_of_freedom}{\text{Degree of Freedom}}} \\ & = & (\href{Standard_Deviation}{\text{Standard Deviation}})^2 \end{array}$$

### 3.2 - 2

The mean squared error is the squared bias plus the variance.