Calculator Inputs
Formula Used
Linear regression estimates coefficients that minimise squared prediction errors. Weighted regression multiplies each squared error by its observation weight. The fitted equation predicts a continuous target from one or more features.
ŷ = β₀ + β₁x₁ + β₂x₂ + ⋯ + βₚxₚ
β̂ = (XᵀWX)⁻¹XᵀWy
R-squared measures explained variation against the total target variation. Adjusted R-squared penalises unnecessary predictors. Prediction intervals are wider because they include individual outcome noise.
How to Use
- Paste a dataset or upload a supported text file.
- Identify the target, predictors, and optional weight column.
- Select preprocessing, polynomial, confidence, and validation settings.
- Add new predictor rows when forecasts are required.
- Submit the form and review coefficients, metrics, diagnostics, and charts.
- Export the completed analysis using copy, CSV, PDF, or print.
Example Data
This example predicts performance using hours, experience, and department. Department is encoded automatically as categorical data. Performance is selected as the continuous target.
| Hours | Experience | Department | Performance |
|---|---|---|---|
| 2 | 1 | Sales | 51 |
| 5 | 2.5 | Engineering | 66 |
| 8 | 5 | Sales | 79 |
| 11 | 7 | Engineering | 92 |
Frequently Asked Questions
What does the slope mean?
The slope estimates the target change for one feature unit. Other included predictors remain fixed during this interpretation. Scaling changes the coefficient’s measurement units.
What does R-squared measure?
R-squared measures the proportion of target variation explained. Higher values indicate closer fitted values within the sample. They do not prove causation or future accuracy.
When should adjusted R-squared be used?
Adjusted R-squared helps compare models with different feature counts. It penalises predictors that add little explanatory value. Use validation metrics before selecting the final model.
Can categorical predictors be entered?
Yes, text predictor columns are detected automatically. The calculator creates dummy variables and selects one baseline. Coefficients compare categories against that baseline.
What is multicollinearity?
Multicollinearity occurs when predictors contain overlapping linear information. It can inflate coefficient uncertainty and reverse interpretations. Inspect VIF and correlation results carefully.
Why are prediction intervals wider?
Confidence intervals estimate uncertainty around the mean response. Prediction intervals include that uncertainty plus individual outcome noise. New observations therefore require wider limits.
Should outliers always be removed?
No, unusual observations may contain important information. Investigate data quality, leverage, and influence before exclusion. Compare models and document every removal decision.
What does the Durbin–Watson statistic show?
It screens residuals for first-order serial correlation. Values near two often indicate weak autocorrelation. Ordered time data requires deeper time-series diagnostics.
Does regression establish causation?
No, regression quantifies conditional association in supplied data. Causal conclusions require design assumptions and subject knowledge. Confounding variables can produce misleading relationships.