You are here: Project Scarlet » Statistical Inference » Linear Regression » OLS Slope Estimate
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 effect size, also known as the slope, is a measure of the effect of the independent variable on the dependent variable. It is the β1 in the model above. There are different methods for estimating this effect. 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 #533: Let us examine the effect of the thickness of the leaf on its weight. 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 | 7.5 | 8.6 |
2 | 7.7 | 9.6 |
3 | 4.6 | 10.8 |
4 | 5.4 | 9 |
5 | 3.2 | 7.1 |
6 | 7.3 | 9.2 |
7 | 6.5 | 8.9 |
8 | 7 | 7.8 |
9 | 6.6 | 7.7 |
With this information, estimate the effect of leaf thickness on weight.
To summarize the above, the values of import are:
\( \bar{x} \) | = | 6.2 |
---|---|---|
\( \bar{y} \) | = | 8.7444 |
In the box below, please enter the OLS estimate of the effect of leaf thickness on weight for the 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. 2024. All rights reserved. | . | |