2025-06-06

What is Simple Linear Regression?

Simple linear regression models the relationship between a dependent variable \(y\) and an independent variable \(x\) using a straight line.

The model has the form: \[ y = \beta_0 + \beta_1 x + \varepsilon \] Where:
\(\beta_0\) is the intercept
\(\beta_1\) is the slope
\(\varepsilon\) is the random error term

Why use Simple Linear Regression?

  • It clarifies relationships between variables
  • Provides a way to form predictive models
  • It is simple to compute and interpret
  • Is the groundwork for more complex modeling systems.

Example Dataset

It can be difficult to understand a meaningful relationship between two variables when we only have raw data.

x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20

y = 2, 6, 3, 10, 7, 14, 11, 17, 13, 22,
18, 27, 20, 30, 24, 29, 35, 28, 38, 32

Simple Linear Regression Model Summary

The output of the simple linear regression model on the previous slides data:

Term Estimate Std..Error t.value Pr…t..
(Intercept) Intercept 0.889 1.586 0.561 0.582
x Slope 1.753 0.132 13.245 0.000

Simple Linear Regression Modeal Explanations

  • Regression Equation: \(y = 0.89 + 1.75x\)

  • R-squared: 0.91 or 91% of the variation in y is explained by x

  • p-value for slope (β₁): 1.01e-10 so The relationship is statistically significant

  • Interpretation: For each 1 unit increase in x, y increases by approximately 1.75 units.

Example Plot For the Dataset

Conclusion

  • Simple linear regression helps model and predict relationships between two variables
  • The regression line summarizes the best linear fit
  • Key outputs include the intercept, slope, R-squared, and p-value
  • A significant slope indicates a strong linear relationship
  • Even simple models like this can provide valuable insights into the relationship among variables