Simple Linear Regression is method to estimate a linear relationship between two quantitative variable usually in a graph format
Example:
\(y = \beta_1X + \beta_0\)
\(y = 5.06X + 14.8\)
2023-03-14
Simple Linear Regression is method to estimate a linear relationship between two quantitative variable usually in a graph format
\(y = \beta_1X + \beta_0\)
\(y = 5.06X + 14.8\)
The Usually Formula Used for Calculating Simple Linear Regression is: \(y = \beta_0 + \beta_1X + \epsilon\)
\(y\): Predicted Value for any individual X
\(\beta_0\): Intercept, Predicted Value when X = 0
\(\beta_1\): Regression Coefficient
\(X\): Independent Variable
\(\epsilon\): Error Estimation
Simple Linear Regression is used to show the strength of the relationship between two variables. This can also shows how dependent the variables are on each other
Orange Tree Age Vs. Circumference
When using ggplot2 in default settings…
library(ggplot2) data(women) head(women) ggplot(women,aes(height, weight)) + geom_point() + geom_smooth(method='lm', se=True)
For this graph, we can see that the grey area is very small, and very close to the Simple Linear Regression Line meaning that the correlation between the two variables, Woman’s Height and Weight, are closely related.
Number of Murders Vs. Urban Population For this graph, we can see that the grey area is very large meaning that the correlation between the two variables, Number of Murders and Urban Population, aren’t closely related. We can also conclude this based on the data points positions cause they are spread out all over the place.
Overall, Simple Linear Regression is a powerful formula used to determine relationships between variables. Even with its many uses, the formula can also be misused by people by showing correlation between two independent variables, therefore its important to also understand the context of the graph as well as the scale that it is show in.