Click anywhere to add a point (click a point to remove it). The best-fit line, r, and R² update live. Then add an outlier and watch it yank the line.
It's the straight line that minimises the total squared vertical distance from the points to the line — the least-squares line. Its slope tells you how much y changes per unit of x, and its intercept is the predicted y when x = 0. This playground computes it live as you add points.
R² is the proportion of the variation in y that the line explains — from 0 (the line tells you nothing) to 1 (a perfect fit). It's the square of the correlation r. Scatter your points randomly and R² collapses toward 0; line them up and it approaches 1.
Because least-squares minimises squared distances, a point far from the rest contributes a huge squared error and pulls the line toward itself — especially if it's far out along the x-axis (high leverage). Add an outlier here and watch the slope and R² change dramatically. It's a vivid reminder to always plot your data before trusting a regression.
No. A high R² means the line predicts y well from x in this data — not that x causes y. See correlation vs causation.