Math Playground
Data

Least-squares regression

Find the line that minimises total squared error — the line of best fit.

Find the line that minimises total squared error. The 'line of best fit'.

Slope
b = Σ(x−x̄)(y−ȳ) / Σ(x−x̄)²