In statistics the mean squared prediction error or mean squared error of the predictions of a smoothing or curve fitting procedure is the expected value of the squared difference between the fitted values implied by the predictive function g ^ {displaystyle {widehat {g}}} and the values of the (unobservable) function g. It is an inverse measure of the explanatory power of g ^ , {displaystyle {widehat {g}},} and can be used in the process of cross-validation of an estimated model. In statistics the mean squared prediction error or mean squared error of the predictions of a smoothing or curve fitting procedure is the expected value of the squared difference between the fitted values implied by the predictive function g ^ {displaystyle {widehat {g}}} and the values of the (unobservable) function g. It is an inverse measure of the explanatory power of g ^ , {displaystyle {widehat {g}},} and can be used in the process of cross-validation of an estimated model. If the smoothing or fitting procedure has projection matrix (i.e., hat matrix) L, which maps the observed values vector y {displaystyle y} to predicted values vector y ^ {displaystyle {hat {y}}} via y ^ = L y , {displaystyle {hat {y}}=Ly,} then