---
title: "Regression and Median-Fit Lines | FiveStudy"
description: "Compare least-squares regression and median-fit lines, calculate residuals, interpret technology output, and judge linear fit from residual patterns."
url: https://fivestudy.com/guides/algebra-1-04-07-regression-and-median-fit-lines
---

[Algebra 1](https://fivestudy.com/algebra-1) · Study guide

# Regression and Median-Fit Lines

Algebra 1 · Data lab 04.07

# One cloud of points. Two ways to draw the trend.

Least-squares regression and median-fit lines both summarize a linear association. They answer the same modeling question with different priorities: smallest total squared error versus resistance to extreme values.

**Observed y**The output actually measured.

**Predicted ŷ**The output the fitted line predicts.

**Residual**The vertical miss: observed minus predicted.

Model 1 · Least squares

## Regression chooses the line with the smallest squared misses

For every point, measure the vertical residual \(y-\widehat y\). Square those residuals, add them, and choose the line that makes that total as small as possible.

### Why square?

Positive and negative misses cannot cancel, and a large miss receives more weight than several tiny misses.

### What the hat means

\(\widehat y=mx+b\) is a prediction rule. It is an estimate from observed data, not a guarantee for every case.

Residual sign

## Read each miss from the point to the line

Residual always means **observed − predicted**. Switching the order reverses every sign and breaks the interpretation.

Calculator translation

## Turn output symbols into a model with meaning

Suppose technology runs **LinReg** in the form \(y=ax+b\) and reports these values.

**LinReg(ax+b)**a = 4.82
b = 12.6
r = 0.94

**Model**\(\widehat y=4.82x+12.6\)

**Slope 4.82**Predicted y rises 4.82 units for each 1-unit increase in x.

**Intercept 12.6**Predicted y when x = 0—interpret only if x = 0 makes sense in context.

**r = 0.94**Strong positive linear association; it does *not* prove causation.

Model 2 · Median-fit

## Compress the cloud into three resistant summary points

Sort all points from smallest x to largest x.

Split them into three nearly equal groups.

Find median x and median y in each group.

Use the outside medians for slope; average three intercepts.

The median x and median y are found within each group. They form a summary point; it does not have to be one of the original observed pairs.

Outlier stress test

## Extreme points pull the two methods differently

### Least squares

Large residuals are squared, so an extreme point can exert strong pull on the fitted line.

### Median-fit

Group medians depend on rank and usually change less when one value becomes extreme.

Model check

## A residual plot should look boring

A reasonable linear model leaves residuals scattered above and below zero with no clear shape. A curve, fan, or long run of one sign signals structure the line did not capture.

!

**One small residual does not certify the model.**

Judge the full residual plot. A line can hit one point perfectly and still miss the overall shape.

## Choose, compute, judge

**Need a reproducible standard fit?**Use least-squares regression and report the equation with units.

**Worried about an extreme value?**Compare a resistant median-fit line instead of deleting the point silently.

**Either method chosen?**Inspect residuals, stay within the data range, and never turn association into causation.
