Statistics
Linear Regression Simulator with Noise
Create or manipulate points and watch the fitted line, R², and errors update live.
Data plane
Drag points or the manual line to compare fits.
Residuals are colored from blue to red based on magnitude.
Point generation
Click to add points, double click or right click to remove. Drag to move them.
Live metrics
Outlier mode
Insert an extreme point and see how the line gets pulled.
Model comparison
Turn on the manual line and try to beat least squares by eye.
About this tool
Linear regression seeks the relationship that best fits the observed data. The ordinary least squares (OLS) method estimates the coefficients as minimizing the sum of squared residuals Despite its conceptual simplicity, it remains a reference model: interpretable, efficient, and surprisingly competitive when the underlying relationship is approximately linear.
The coefficient of determination measures what proportion of the variance in the response variable the model explains. A high does not guarantee that the model is valid: residuals must be analyzed to verify that the assumptions of homoscedasticity, independence, and normality hold. A systematic pattern in the residuals indicates that the linear model is not capturing all the structure in the data.
This tool lets you fit a linear regression visually and interactively. Add or move points and observe in real time how the regression line, coefficients, , and residual distribution change. Especially useful for building intuition about the effect of outliers and data dispersion.
Articles published on the blog
