← Gallery

Least-Squares Regression & Residuals

by Anonymous

Drag the line to find where the sum of squared residuals is smallest, then vary the spread to see how correlation r behaves and why extrapolation is risky.

πŸ”— Open in a new tab

About this app

An interactive statistics lesson on least-squares regression and residuals. Adjust a line's slope and intercept to see vertical residuals, compare squared-residual sums, and identify the least-squares line. A separate correlation section shows how spread affects r and illustrates the difference between interpolation and risky extrapolation.

Use cases

  • High school students learning regression and residuals
  • Teachers demonstrating least-squares concepts in class
  • Learners practicing slope and intercept adjustment
  • Statistics review for correlation and prediction

Features

  • Interactive slope and intercept controls for fitting a line
  • Visual residuals showing point-minus-line distances
  • Squared residual areas and a minimum sum of 12
  • Correlation coefficient r with adjustable point spread
  • Prediction control showing interpolation and extrapolation zones
  • Mission-based activities with reset and next controls