2024-09-23

Simple Linear Regression

Simple linear regression is a predictor for a two dimensional sample set. It creates a linear function that best predicts a dependent variable in response to an independent variable.

Linear Regression Equation

The relationship between the independent variable is modeled by the equation \(y= \alpha + \beta x\) where \(\alpha\) represents the y intercept and \(\beta\) represents the slope.

Types of Correlations

Linearly, sets have either a positive correlation between variables, a negative correlation between variables, or a weak enough correlation it could be said to be statistically insignificant.

Positive Correlation

## Warning: Ignoring 37 observations

Explanation

This graph is an example of a positive correlation between two variables. It is indicated by the increasing linear function.

Negative Correlation

Explanation

This graph is an example of a positive correlation between two variables. It is indicated by the increasing linear function.

No Correlation

plot(air$Wind, air$Temp, xlab = "Wind", ylab = "Temperature", main = 
       "Temperature by Wind")
legend("topright", legend = c("data", "fitted"), text.col = c("red", "black")) 
abline(90.13, -1.23)

Explanation

This graph is an example of a positive correlation between two variables. It is indicated by the increasing linear function.