Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mean squared error
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Predictor=== If a vector of <math>n</math> predictions is generated from a sample of <math>n</math> data points on all variables, and <math>Y</math> is the vector of observed values of the variable being predicted, with <math>\hat{Y}</math> being the predicted values (e.g. as from a [[least-squares fit]]), then the within-sample MSE of the predictor is computed as :<math>\operatorname{MSE}=\frac{1}{n} \sum_{i=1}^n \left(Y_i-\hat{Y_i}\right)^2</math> In other words, the MSE is the ''mean'' <math display="inline">\left(\frac{1}{n} \sum_{i=1}^n \right)</math> of the ''squares of the errors'' <math display="inline">\left(Y_i-\hat{Y_i}\right)^2</math>. This is an easily computable quantity for a particular sample (and hence is sample-dependent). In [[Matrix_multiplication|matrix]] notation, :<math>\operatorname{MSE}=\frac{1}{n}\sum_{i=1}^n(e_i)^2=\frac{1}{n}\mathbf e^\mathsf T \mathbf e</math> where <math>e_i</math> is <math> (Y_i-\hat{Y_i}) </math> and <math>\mathbf e</math> is a <math> n \times 1 </math> column vector. The MSE can also be computed on ''q ''data points that were not used in estimating the model, either because they were held back for this purpose, or because these data have been newly obtained. Within this process, known as [[Cross-validation (statistics)|cross-validation]], the MSE is often called the [[test MSE]],<ref>{{cite book |first1=James |last1=Gareth |first2=Daniela |last2=Witten |first3=Trevor |last3=Hastie |first4=Rob |last4=Tibshirani |date=2021 |title=An Introduction to Statistical Learning: with Applications in R |url=https://www.statlearning.com/ |publisher=Springer |isbn=978-1071614174 }}</ref> and is computed as :<math>\operatorname{MSE} = \frac{1}{q} \sum_{i=n+1}^{n+q} \left(Y_i-\hat{Y_i}\right)^2</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)