ARBIMETRA · Financial intelligence, made practical.

ARBIMETRA LAB

Simple Linear Regression

Estimates a straight-line relationship between two variables with inference, a fitted line and diagnostics.

What it does

Estimates a straight-line relationship between two variables with inference, a fitted line and diagnostics.

Use it to describe or predict one numeric variable from another.

Data you need

  • Dependent variable
  • One independent variable

Supported data: Numeric. Level: Beginner.

Formula and method

Y = β₀ + β₁X + ε

The slope and intercept minimise the sum of squared vertical distances from the line. Standard errors come from the residual variance and the spread of X, and the diagnostics examine what those standard errors assume.

Assumptions

  • Linear in coefficients
  • Errors have mean zero given the regressors
  • Constant error variance for conventional standard errors

Input checks

  • More observations than coefficients
  • Constant variables are rejected

Diagnostics included

VIF and tolerance, Breusch-Pagan, White, Durbin-Watson and Breusch-Godfrey when data are time-ordered, Jarque-Bera, Ramsey RESET, Cook's distance, leverage, residual and Q-Q plots.

How to read the result

The slope is the expected change in Y for a one-unit change in X.

Worked example

Illustrative run on Simulated study data (teaching data). These figures are the actual output of this model on that example, and they say nothing about your own data.

  • Estimated on 240 observations.
  • R-squared = 0.0907, adjusted R-squared = 0.0869.
  • F-statistic = 23.7412, Prob(F) = <0.0001.
  • At the 5% level, hours is statistically associated with post_score, holding the other included variables constant.
  • The R-squared of 0.0907 is low: the included variables explain little of the variation in post_score. That does not automatically invalidate the model. Low R-squared is common with noisy individual-level data, and coefficients can still be informative.

Limitations

  • Association only, unless the design justifies more

Numerical validation

Validated 21 of 21 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.

CheckReferenceResultAbs. errorToleranceSource
Norris intercept-0.26232307-0.262323072.8e-131e-9NIST StRD certified value
Norris slope1.002116821.002116823.1e-151e-9NIST StRD certified value
Norris slope s.e.0.00042980.00042987.5e-181e-9NIST StRD certified value
NoInt1 slope, no intercept2.074380172.074380174.0e-151e-9NIST StRD certified value

Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.

Questions

What does R-squared tell me?

The share of sample variation in Y explained by the line. A high value does not show that the model is correct or causal.

ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.