Drag data points and watch the regression line, residuals, loss function, and R² update live. Click anywhere on the chart to add new points.
Model Metrics
Equation
ŷ = 0.70x + 12.86
Display
Load Dataset
Interactive Scatter Plot
Drag gold dots to move · Click empty area to add point
Loss Landscape (MSE)
The gold dot is always at the minimum: ordinary least squares finds the exact optimal slope analytically.
R² Gauge
R² = fraction of variance in Y explained by X. Drag an outlier far from the line to watch R² drop.
Ordinary Least Squares
Finds the line that minimizes the sum of squared residuals (vertical distances from points to line).
Residuals
The difference between actual y and predicted ŷ. Ideally: small, random, no pattern.
Assumptions
Linearity, independence, homoscedasticity, normality of residuals. Violations hurt inference.