Linear Regression Examples in Statistics
Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Linear Regression.
This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Statistics.
Concept Recap
A statistical method for modeling the relationship between variables by fitting a line that minimizes the sum of squared distances from data points to the line.
Given scattered points, draw the 'best' line through them. 'Best' means the line that's closest to all points on average. This line lets you predict Y from X.
Read the full concept explanation โHow to Use These Examples
- Read the first worked example with the solution open so the structure is clear.
- Try the practice problems before revealing each solution.
- Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea: Linear regression finds the line that minimizes total squared prediction errors (least squares). The slope tells you how much Y changes per unit increase in X.
Common stuck point: Students extrapolate regression lines far beyond the data range. Predictions outside the observed data are unreliable because the linear relationship may not hold.
Worked Examples
Example 1
hardSolution
- 1 Step 1: Slope = 1.8: for each additional hour studied, the predicted exam score increases by 1.8 points.
- 2 Step 2: Y-intercept = 2.5: when x = 0 (no studying), the predicted score is 2.5. This may or may not be meaningful in context.
- 3 Step 3: The equation predicts scores based on study hours, assuming a linear relationship.
Answer
Example 2
hardPractice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
hardExample 2
hardRelated Concepts
Background Knowledge
These ideas may be useful before you work through the harder examples.