You are here: Project Scarlet » Statistical Inference » Linear Regression » OLS Variance Estamate
OLS Regression
In linear regression, we are modeling the dependent variable using this model:
Y = β0 + β1X + ε
Here, Y is the dependent variable, X is the independent variable, β0 is the expected value of Y when X = 0 in the population, β1 is the effect of X on Y in the population, and ε is random variation unexplained by the model.
To perform statistical inference, we make the usual assumption that
ε ~ Normal(0, σ²)
The mean square error is an estimate of that σ². It is also a measure of the variance unexplained by the model and data. There are different methods for estimating this value. Ordinary least squares is one method. Its strengths are that it is easy to perform, it is exact, and that it is straight forward to create the estimators.
Example #338: Let us model (explain) the weight of a leaf using its thickness. To explore this, we collect data. The data consist of two measurements on each unit (leaf): thickness and weight. Thus, our data are
Leaf Number | Thickness [μm] | Weight [g] |
---|---|---|
1 | 6.5 | 1.4 |
2 | 5.5 | 0.5 |
3 | 6 | 1.4 |
4 | 6.2 | 1.2 |
5 | 6.9 | 1.7 |
6 | 3.3 | 1.2 |
7 | 5.1 | 2.3 |
With this information, we estimated the linear model to be
weight = 1.1389 + (0.0437) thickness
What is the mean square error?
To summarize the above, the values of import are:
\( \bar{x} \) | = | 5.6429 |
---|---|---|
\( \bar{y} \) | = | 1.3857 |
\( b_0 \) | = | 1.1389 |
\( b_1 \) | = | 0.0437 |
Note that \( b_0 \) is important in estimating the y-intercept. If you are unsure how to calculate it, or if you would like more practice doing so, please see the OLS estimate of the y-intercept tutorial.
Note also that \( b_1 \) is important in estimating the mean square error. If you are unsure how to calculate it, or if you would like more practice doing so, please see the OLS estimate of the slope tutorial.
In the box below, please enter the mean square error of the model and data, then click on the “Check your answer!” button. Please round your answer to the ten-thousandths place.
Show Formula
Show Solution
Show the R Code
© Ole J. Forsberg, Ph.D. 2025. All rights reserved. | . | |