Model
How well does the model fit?
- R-squared
- --
- Adjusted R-squared
- --
- Predicted R-squared
- --
- S (typical residual)
- --
- F statistic
- --
- p-value (model)
- --
Calculator Library / Statistics
Fit a simple or multiple linear regression in your browser. Paste your data, pick the response and predictors, and read the equation, the fit statistics, the residual checks, and predictions with intervals.
Tool
Y = b0 + b1X1 + … + bkXk
Paste a table with one column per variable and a header row in the first line. Columns can be separated by tabs, commas, semicolons, or spaces, so you can paste straight from Excel or Minitab. Then choose the response (Y) and the predictors (X).
Everything runs in your browser; nothing is sent to a server, and entries are not saved. The examples are made-up data from the Simple Linear Regression and Multiple Regression pages in Stat Dojo.
Model
Picture
Enter values for the predictors. The calculator gives the fitted value, a 95% confidence interval for the average response at those settings, and a 95% prediction interval for a single new observation.
Instructions
Paste a table of data, choose the response and the predictors, and the calculator fits a least squares regression with up to six predictors. It reports R-squared, adjusted and predicted R-squared, S, the F test, a coefficient table with intervals and VIF, an ANOVA table, and predictions with confidence and prediction intervals.
It also draws the fitted line with its bands (for one predictor) or observed against fitted values, shows the two residual plots, and flags unusual observations, correlated predictors, and extrapolation. It matches the worked examples on the Simple Linear Regression and Multiple Regression pages in Stat Dojo, and agrees with Excel’s Regression tool and Minitab’s Fit Regression Model.
| Output | Calculation | What it tells you |
|---|---|---|
| Coefficients | b = (X′X)−1 X′y | Least squares estimates of the intercept and slopes |
| S | √(SSE / (n − k)) | Typical size of a residual |
| R-squared and adjusted | 1 − SSE/SST; adjusted for the number of terms | Share of variation explained |
| Predicted R-squared | 1 − PRESS/SST, using leave-one-out residuals | Fit to new data; guards against overfitting |
| t test for each term | b / SE(b), with n − k degrees of freedom | Does the predictor add to the model with the others held constant? |
| F test | (SSR/(k−1)) / MSE | Do the predictors together explain more than chance? |
| VIF | 1 / (1 − Rj²), from the predictor correlation matrix | How much a predictor overlaps with the others |
| Confidence and prediction interval | fit ± t √(MSE h) and fit ± t √(MSE (1 + h)) | Where the average, and a single new observation, will fall |
The first example is 12 adhesive bonds with curing temperature and strength. The calculator gives strength = −3.77 + 0.1990 × Temp, R-squared 87.5%, S = 1.42 N, with a slope p-value below 0.0001. At 150 °C the fit is 26.08 N, with a 95% confidence interval for the mean of 25.16 to 27.00 N and a prediction interval for one bond of 22.78 to 29.38 N.
The second example has three predictors. All three look significant alone, but with all in the model the dwell-time coefficient has p = 0.49 and the largest VIF is 2.03. Untick Dwell to refit with Temp and Pressure only: adjusted R-squared rises from 94.3% to 94.5%, and predicted R-squared from 93.3% to 93.7%. The Multiple Regression page explains why.
You need more rows than predictors plus one for the calculation to run, but a common guide for a reliable model is 10 to 15 observations per predictor. The calculator warns when you have fewer.
The confidence interval is for the average response at the settings you enter. The prediction interval is for a single new observation, so it also includes the scatter of individual results around that average, and is wider.
Usually two predictors are perfectly correlated (for example, one is a multiple of another), or one predictor is constant. Remove one of the offending columns.
Yes. Add a column to your data with the squared value, or the product of two predictors, and tick it as another predictor. Keep the original predictors in the model when you keep a squared or interaction term.
No. The calculator runs in your browser, nothing is sent to a server, and your entries are not saved when you leave the page.