Linear Regression — OLS (continuous y + predictors)

Verified

Advanced & specialized

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.

Loading teaching datasets…

Or use your own dataset

Loading your datasets…

Models a continuous outcome as a linear combination of one or more predictors (continuous or dummy-coded categorical).

Reports per-predictor coefficients (β with SE, t, p, 95% CI, standardised β), overall model fit (R², adjusted R², F, AIC, BIC), Type-III ANOVA, and a full residual / influence diagnostic panel (Breusch-Pagan heteroscedasticity, Durbin-Watson autocorrelation, Cook's D / leverage / studentised residual outliers). The engine auto-switches the inferential basis to HC3 robust standard errors when Breusch-Pagan rejects.

Worked example

How well does study time predict exam score, and by how much?

Exam score (0–100) was regressed on weekly study hours for 80 students.

Result

Study time significantly predicted exam score: each extra hour added ~2.3 points (b = 2.29, β = .64), t(78) = 7.45, p < .001; the model explained 42% of the variance, R² = .42.

How you'd report it (APA)

A simple linear regression showed weekly study time significantly predicted exam score, b = 2.29, 95% CI [1.68, 2.90], β = .64, t(78) = 7.45, p < .001, R² = .42.

Try it yourself: Load this ready-made sample and follow the run above.

When to use it

  • Continuous outcome + k predictors on the same cases
    Predicting exam score from hours studied + prior GPA + sleep hours in 200 students.
  • RCT or experimental design with continuous outcome + covariates
    RCT of new drug at 3 doses (placebo / low / high) with baseline severity as covariate.

When NOT to — use instead

Hypotheses

H₀: β_j = 0 for all predictor coefficients (and overall H₀_F: R² = 0 for the model-fit F test).
Hₐ: at least one β_j ≠ 0.

Parameter tested: vector of population coefficients β

Assumptions (and what to do if they fail)

Residuals are approximately normally distributed. Under the Central Limit Theorem, this matters less as n grows (n ≥ 100 usually robust).medium

Check: Shapiro-Wilk p-value on residuals.

If violated: Non-normal residuals affect p-values and CI for small-n models.

Constant variance of residuals across fitted values (no fan/funnel).high

Check: Breusch-Pagan p-value.

If violated: Heteroscedasticity inflates SEs — CI and p-values become unreliable.

Residuals are independent (no autocorrelation).high

Check: Durbin-Watson statistic in [1.5, 2.5] is OK.

If violated: Autocorrelated residuals bias SEs and can hide trends.

No single case dominates the fit (Cook's D thresholds, leverage, DFFITS).high

Check: Max Cook's D reported.

If violated: An influential case can dominate slope estimates — report fit with and without.

VIF for each predictor is moderate (< 5 preferred; < 10 tolerable).medium

Check: Max VIF across predictors.

If violated: High VIF inflates coefficient SEs — some βs look non-significant when the underlying relationship is real, just shared with another predictor.

Ready to run a Linear Regression — OLS (continuous y + predictors) on your own data?

Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.

Run this test →