Skip to main content
Statistical foundations
Lesson 45 of 75
Review

Simple linear regression

Objective. Fit and diagnose a linear model.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Simple linear regression models the relationship between a response variable y and a single predictor x using the equation ŷ = b₀ + b₁x, where the coefficients are chosen to minimise the sum of squared residuals Σ(yᵢ − ŷᵢ)² via the least squares method. The slope b₁ = Σ(xᵢ − x̄)(yᵢ − ȳ)/Σ(xᵢ − x̄)² measures the average change in y per unit increase in x, while the intercept b₀ = ȳ − b₁x̄ ensures the line passes through the data's centroid. Diagnosing the fit involves examining residuals eᵢ = yᵢ − ŷᵢ for patterns, since a good model shows residuals scattered randomly around zero rather than any systematic curve or trend. The coefficient of determination R² reports the proportion of variance in y explained by the linear model.

Worked example

A simple linear regression gives slope b₁ = 2 and intercept b₀ = 5. Find the predicted value ŷ when x = 4.

2 … 5
Illustrated card showing 2 … 5
  1. 1Recall the regression equation ŷ = b₀ + b₁x.
  2. 2Substitute the given values: ŷ = 5 + 2(4).
  3. 3Compute the product: 2 × 4 = 8.
  4. 4Add to the intercept: ŷ = 5 + 8.

Answer: ŷ = 13

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. Students fit a line and assume a high R² proves the model is appropriate without checking a residual plot; a strong curved relationship can still yield high R² while clearly violating the linearity assumption.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard