Skip to content
Home / Statistics Topics

Module 6 · Regression & Correlation · Topic 5

Least Squares Method

Least Squares. The least squares method finds the line that minimizes the sum of the squared residuals (SSE = Σ(yᵢ − ŷᵢ)²). This produces the best-fitting line in terms of vertical distances from data points.

This is the opening of a Premium lesson. The full lesson, with its 4 sections, reads in the interactive course; the module's first lesson is free.

Open the interactive lessonAll topics

In the full lesson

  • Slope via Least Squares (formula)
  • Why Squared? (text)
  • Conceptual Example (example)

Open the Regression & Correlation lessons or see what Premium includes.

Key formulas

From the Regression & Correlation formula sheet

  • Least-Squares Regression Line: yhat = a + bx - Line that minimizes the sum of squared residuals.
  • Pearson Correlation: r = sum((x_i-xbar)(y_i-ybar)) / sqrt(sum((x_i-xbar)^2)sum((y_i-ybar)^2)) - Measures direction and strength of a linear association.

See the full formula reference

Related glossary terms

  • Residual: The observed value minus the predicted value. Example: If y = 12 and yhat = 9, the residual is 3.

Browse the full glossary

Go interactive

Work this topic in StatRise

This module opens on its first lesson free; the rest of it unlocks with Premium. Every calculator and simulation below is free.

Regression & Correlation lessons (first free)Regression calculatorsRegression Lab simulationPractice questions

Free statistics guides

Related in-depth guides

  • How to Choose the Right Statistical Test8 min read
  • Hypothesis Testing Explained: The Five Steps, Worked Through8 min read

Keep reading

More topics

Previous: Simple Linear RegressionNext: R-SquaredAll statistics topics
StatRiseStatistics, worked step by step.
CalculatorsLessonsPracticeSimulationsGuidesTopicsFormulasPremiumRestore purchaseAboutMore toolsPrivacyTerms

© 2026 StatRise. Calculators, lessons, practice, and simulations for intro statistics and AP Statistics. Progress stays in your browser - no account required.

Results are a study aid. Check anything that matters before you rely on it.