2025-10-26

The SLR Model (Math)

We assume a straight-line relationship between \(x\) and \(y\):

\[ y = mx + b \]

where:
- \(b\) is the intercept (the value of \(y\) when \(x = 0\))
- \(m\) is the slope (how much \(y\) changes for every 1 unit increase in \(x\))
- The difference between the actual \(y\) and predicted \(y\) is called the error.

Interpretation:
- \(b\): starting value of the line
- \(m\): how steep the line is
- error: how far each point is from the line

Interpreting the Regression Line (Math)

A simple linear regression can be written as:

\[ y = mx + b \]

  • \(m\) = slope → how much \(y\) changes for every 1 unit increase in \(x\)
  • \(b\) = intercept → the value of \(y\) when \(x = 0\)

Example: \[ y = 35 + 0.5x \]

  • \(b = 35\) → predicted \(y\) when \(x = 0\)
  • \(m = 0.5\) → \(y\) increases by 0.5 for each 1 unit increase in \(x\)

Scatterplot with Regression Line

This plot shows the relationship between height (x) and weight (y) for women. The red line represents the fitted linear regression model, which predicts weight based on height.

Residual Plot

This residual plot shows how far the actual values are from the regression line. It helps us check whether the linear model is appropriate and if the residuals are randomly distributed.

Interactive Regression Plot

This interactive plot shows how the fitted regression line models the relationship between height and weight. You can hover over points to see the exact data values, making it easier to explore how well the line fits the data.

The Regression Equation

\[ \hat{y} = mx + b \]

For the women dataset:

\[ \hat{y} = -87.52 + 3.45x \]

  • \(m = 3.45\): For every 1 inch increase in height, weight increases by about 3.45 lbs.
  • \(b = -87.52\): The intercept (starting point of the line).
  • The equation lets us make predictions without showing raw numbers.

Summary of Simple Linear Regression

  • Fits a straight line to describe the relationship between two variables.
  • Equation: \(y = mx + b\) (slope \(m\), intercept \(b\)).
  • Scatterplot shows the relationship between height and weight.
  • Residual plot checks model fit and assumptions.
  • Interactive plot lets us explore the data dynamically.
  • The model can be used to make predictions for new values of \(x\).

Simple Linear Regression is a powerful yet interpretable tool for understanding relationships between variables.