For Students · Linear Regression
Linear Regression for a batting average
Built for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition. Simulate a batting average live below — adjust the inputs and watch it respond, right in your browser.
Linear RegressionLive
least squares & R²
Controls
Presets
Ordinary least squares finds the line that minimizes the sum of squared vertical residuals (the gray drop-lines). R² measures the fraction of variance the line explains — 1 is perfect, 0 is useless. Add noise or remove points to watch the fit and R² degrade.
Data Inspector
Fitted slope0.000
Intercept0.000
R²0.000
Correlation r0.000
Governing equation
Reading this result: R² = 0.00: noise (2) swamps the signal, so least squares can barely tell the slope from flat — adding data points would tighten the estimate.
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
Also for:ResearchersEducatorsEngineersHobbyists & MakersK-12 StudentsFirst RespondersGeneral version →
More with Linear Regression
Linear Regression for an A/B testLinear Regression for a survey sampleLinear Regression for a poll marginLinear Regression for a quality-control chartLinear Regression for a clinical trialLinear Regression for a customer churnLinear Regression for a click-through rateLinear Regression for an exam-score curve
Frequently asked questions
- Is this good for students?
- Yes — this version of "Linear Regression for a batting average" is framed for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.