Least-Squares Lines
A free Statistics and Data Analysis lesson from the “Two-Variable Data” unit, with a worked example and practice problems including step-by-step solutions.
A least-squares line is a linear model for paired data. Its slope gives the predicted change in y for one more unit of x, and its intercept gives the predicted y-value when x is zero, when that context is meaningful. This lesson builds the habit of reading the context first, choosing the right statistical tool, calculating carefully, and then writing what the result means. By the end, students should be able to do the computation and explain why that computation answers the question.
What you'll learn
- Use a regression line for prediction
- Interpret slope and intercept in context
- Connect the line to the scatter plot
Worked example
Problem. In a two-way table, 9 of 23 students in the first row chose yes. What is the row relative frequency for yes?
- Use the row total as the denominator.
- 9/23 simplifies to 9/23.
Answer: 9/23
Lesson preview: this page shows 5 practice items. The interactive activity contains 28 practice items and 15 quiz items (typed response and multiple choice). Counts include repeated prompts and variants.
Practice problems
1. Practice case A: In a two-way table, 9 of 23 students in the first row chose yes. What is the row relative frequency for yes?
Show solution
- Use the row total as the denominator.
- 9/23 simplifies to 9/23.
Answer: 9/23
2. Practice case B: A scatter plot with points rising left to right shows:
Choices: positive association · negative association · no association · a categorical variable only
Show solution
- When x increases and y tends to increase, the direction is positive.
- That is positive association.
Answer: positive association
3. Practice case C: Correlation by itself can prove:
Choices: that there are no outliers · association, not causation · cause and effect every time · that the sample was random
Show solution
- Correlation measures association.
- It does not prove causation without a stronger design.
Answer: association, not causation
4. Practice case D: A regression line is y = 2x + 9. Predict y when x = 7.
Show solution
- Substitute x = 7.
- 2(7) + 9 = 23.
Answer: 23
5. Practice case E: A model predicts 29, but the actual value is 27. Find the residual using actual - predicted.
Show solution
- Residual = actual - predicted.
- 27 - 29 = -2.
Answer: -2
Practice this interactively with instant feedback and an AI tutor.
Practice Least-Squares Lines Take the free placement check