Line of Fit

Fit a straight line through a cloud of points by eye, lock it in, and see how close you came to the least-squares line.

Was this fun?
How to play

You get a scatter of points and a line y = m·x + b, starting flat at y = 0. Set the slope m and the intercept b with the sliders or by dragging the line. A red residual line runs from each point to your line, showing how far it misses. In Exact and Best Fit your error stays hidden while you play: judge the fit by eye, then press Lock in. The result shows your error, the target, your accuracy and the line you were aiming for, drawn dashed.

A worked example

In Exact, read two points off the grid. If they are (0, 3) and (2, 4), the line rises 1 for every 2 across, so m = 0.5, and it crosses the y-axis at 3, so b = 3. Set those, lock in, and the error is 0: accuracy 100%.

In Best Fit, suppose there are 8 points and par is 15.3. Lock in a line with an error of 23.3 and you are 8 over par, 1 per point, so your accuracy is 1 / (1 + 1) = 50%. Lock it in after 30 seconds, when the speed bonus is 75, and you score 0.5 × 975 = 488.

Game modes
Controls
Tips & strategy
What you'll learn

Line of Fit makes linear regression something you can see and feel: what slope and intercept do, what a residual is, and why the best line balances the points rather than passing through them.

Origins

The line the game measures you against is the least-squares line. The first clear account of the method of least squares was published by Adrien-Marie Legendre in 1805, in a work on finding the orbits of comets; in 1809 Carl Friedrich Gauss published his own method and claimed to have had it since 1795 (least squares: history). Gauss's least-squares calculations were the only predictions that let the astronomer Franz Xaver von Zach find the asteroid Ceres again after Giuseppe Piazzi had discovered it in 1801 and followed it for 40 days (least squares: the method).

The word regression comes from Francis Galton, who used it in the 19th century for the way the heights of descendants of tall ancestors tend to move back towards the average (regression analysis: history). Fitting one straight line y = m·x + b to points with one input and one output is simple linear regression (simple linear regression).

About Line of Fit

Line of Fit is an original PlayPendium game. Its points are generated from a seed, so the Daily is the same for everyone, and the least-squares line it compares you with is calculated exactly for each set of points. It runs in the browser with no install or account.

A free, original browser game on PlayPendium. No download, no install.

PlayPendium
About this game ↓
PlayPendium · About · Contact · Privacy · Terms · Cookies · Accessibility · Copyright · Browse all games · Classic arcade games · © 2026