# Mean squared error definition

I'm currently working through (part of) a textbook on non-parametric regression techniques. Regarding the choice of smoothing parameter the book starts out explaining the MSE which is defined as:

$MSE(\hat f(x)) = E[(\hat f(x)-f(x))^{2}]$

Would this really be the MSE? The book also mentions the mean squared error of prediction (separately) but doesn't give a definition other than to explain that MSEP is for new values $(x^{*},y^{*})$.

I'm a bit confused as I've seen the term MSEP applied to the definition of MSE given by the book.

Thanks!

• There is potential for confusion due to different possible interpretations of what is meant by $f$, $\hat{f}$, $x$, and even $E$ (what probability distribution does it refer to?). Please define these terms to make this question capable of having objective answers.
– whuber
May 10, 2013 at 13:26
• $(fx)$ is the true (unknown) regression function (evaluated at x). $\hat f(x)$ is the estimated regression function. $x$ is the independent/explanatory variable. $E$ is the expected value operator. I hope that helps! May 11, 2013 at 12:12
• Thanks, that's a start. I was wondering whether the expectation is to be taken with respect to the (implicit) probability distribution assumed by the regression model, conditional on the values of the independent variates, or whether it is taken with respect to the empirical distribution. I believe it's the former, but thought it worthwhile to point out there are possible alternative interpretations, because often that can help resolve questions like this.
– whuber
May 11, 2013 at 14:04
• I agree with you on the interpretation of the expectation in this case. Maybe it's just a question of how different authors define MSE vs. MSEP? May 12, 2013 at 9:13
• There's a good explanation of the difference between MSE and MSEP at stats.stackexchange.com/questions/20741/….
– whuber
May 15, 2013 at 20:34

I might be telling you something you already know, but keep in mind that really

$\hat{f}(x)=\hat{f}(x,\{X_k\})$,

where $\{X_k\}$ is the set of sample points over which you build your estimate. For most non-parametric estimators, the $X_k$ are assumed independent, and the method is additive, so you can just look at the $MSE$ of $\hat{f}(x,X_k)$ and then take an average.

Then your formula is interpreted as

$MSE(\hat f(x)) = E[(\hat f(x)-f(x))^{2}]=\int_\Omega(\hat{f}(x,z)-f(x))^2f(z)dz$,

which yes, is the MSE error at the point $x$.

As for the $MSEP$, I'm not entirely sure what your question is, but there are surely various ways to predict this. If you want to know the error expected at $x^*$, then I guess it probably does line up with the $MSE$, however, you might want to know for example the prediction error for a random $X^*$, in which case you might assume it is drawn from a $f(x)$ distribution, then you would want the $MISE$.

Hope that helps clarify something.