Skip to main content

Sum of Squared Vertical Distances

Sum of squared vertical distances is the total of the squared residuals from a regression line in Intro to Statistics. It measures how far the observed data points are from the line, using vertical differences only.

Last updated July 2026•Fiveable Content Team

What is the Sum of Squared Vertical Distances?

Sum of squared vertical distances is the regression error measure you get by adding up the squared vertical gaps between each data point and the line of best fit. In Intro to Statistics, those vertical gaps are the residuals, so this term is basically the total squared residual error for a linear model.

A vertical distance is measured from an observed point straight up or down to the regression line at the same x-value. That matters because the line is being used to predict y from x, so the comparison is always between the actual y-value and the predicted y-value. If a point sits above the line, the residual is positive; if it sits below the line, the residual is negative.

Those distances get squared before you add them. Squaring does two jobs: it makes every error positive, so big misses do not cancel out small misses on the other side of the line, and it punishes larger errors more heavily. A point that is far from the line contributes a lot more to the total than a point that is only a little off.

This is why the sum of squared vertical distances is the quantity the least squares method tries to minimize. Among all possible straight lines, the least-squares regression line is the one with the smallest total squared residuals. That is the formal meaning of best fit in this course, not just a line that looks close by eye.

Here is a quick example. If three residuals are 2, -1, and 3, the sum of squared vertical distances is 2^2 + (-1)^2 + 3^2 = 14. If another line gives residuals 1, 1, and 4, its total is 1^2 + 1^2 + 4^2 = 18, so the first line fits better by this rule even though some individual residuals may look smaller on the second line.

Why the Sum of Squared Vertical Distances matters in Intro to Statistics

This term shows you how regression is built, not just how to read the final equation. When you see a line of best fit in Intro to Statistics, it is not chosen randomly or by eyeballing the scatterplot. It is chosen because it makes the squared vertical errors as small as possible across all the data points.

That connects directly to prediction. If you are using a regression equation to estimate a y-value from an x-value, the sum of squared vertical distances tells you how much error the model is carrying overall. A smaller total means the line is tracking the pattern in the data more closely, which usually makes its predictions more trustworthy.

It also helps you interpret residuals. Residuals are not just random leftovers, they are the pieces that show where the model is overpredicting or underpredicting. When the sum of squared vertical distances is unusually large, you should look more closely for outliers, clusters, curvature, or a line that is not a good model for the relationship.

This idea is part of the bigger regression workflow in the course. You move from scatterplot to line to residuals to fit. If you understand what is being minimized, you can explain why the regression line has the equation it does and why two lines that look similar can still have different fit quality.

Keep studying Intro to Statistics Unit 12

Official unit cheatsheet

open one-pager

How the Sum of Squared Vertical Distances connects across the course

Linear Regression

Sum of squared vertical distances is the fitting rule behind linear regression. The regression line is the line that makes this total as small as possible, so understanding the term helps you see why one line becomes the model instead of another. It is the math behind the phrase "best fit" in a scatterplot.

Residuals

Residuals are the individual vertical differences from each point to the regression line. The sum of squared vertical distances is just what you get when you square each residual and add them together. If you can read residuals point by point, you can build the total error measure for the whole line.

Least Squares Method

The least squares method is the process that chooses the regression line with the smallest sum of squared vertical distances. This is why the word "squares" shows up in the name. The method is about comparing possible lines and selecting the one with the least total squared error.

Sum of Squared Errors (SSE)

Sum of squared vertical distances is often called sum of squared errors because the vertical gaps are prediction errors. In regression, the error is the residual, so the two ideas are closely linked. The exact label can vary by class or software, but the calculation is the same: square the residuals and add them up.

Is the Sum of Squared Vertical Distances on the Intro to Statistics exam?

A quiz or problem-set question usually asks you to identify the residuals from a regression line, square them, and add them to compare fit. You may also be asked which line is better when two candidate lines are shown, and the right move is to use the smaller total squared vertical distance, not the line that just looks closest at one point. If a graph is given, read vertical distances from the points to the line, since regression error is measured in the y-direction. In a calculator or software question, you might be asked to interpret the regression output or connect a smaller error total to a stronger fit. Watch for sign mistakes, because residuals can be positive or negative before squaring, but the final total is always nonnegative.

The Sum of Squared Vertical Distances vs Residuals

Residuals are the individual vertical distances for each data point, while the sum of squared vertical distances is the total after those residuals are squared and added together. If you mix them up, you may describe one point when the question is asking about the whole regression line. Think of residuals as the pieces and the sum as the final error measure.

Key things to remember about the Sum of Squared Vertical Distances

  • Sum of squared vertical distances is the total of the squared residuals from a regression line.

  • The vertical part matters because regression compares each actual y-value to the predicted y-value at the same x-value.

  • Squaring the residuals keeps positive and negative errors from canceling and makes larger misses count more.

  • The least squares regression line is the line that minimizes this total, which is why it is called the best-fitting line.

  • A smaller total usually means the line fits the scatterplot better, but you should still check whether a line is a reasonable model for the data.

Frequently asked questions about the Sum of Squared Vertical Distances

What is sum of squared vertical distances in Intro to Statistics?

It is the sum of each residual squared for a regression line. In other words, it measures how far the data points are from the line of best fit in the vertical direction, then totals those errors after squaring them.

Why do we square the vertical distances?

Squaring makes all the errors positive, so points above and below the line do not cancel each other out. It also gives larger errors more weight, which makes a line with a few big misses look worse than a line with many small misses.

Is sum of squared vertical distances the same as residuals?

Not exactly. A residual is the error for one data point, while the sum of squared vertical distances combines all the residuals into one total. Residuals are the ingredients, and the sum is the full regression error measure.

How do you use sum of squared vertical distances on a statistics problem?

You find each point’s vertical distance from the line, square each one, and add them. If a problem gives two possible lines, the line with the smaller total squared vertical distance is the better fit by the least squares rule.