Statistics & Probability / Multiple Linear Regression
FREE TO EXPLORE
LABORATORY 35 · STATISTICS & PROBABILITY

Multiple Linear Regression, Matrix Formulation, and Multicollinearity Diagnostics

Formulate multivariate multiple linear regression using matrix projection notation, compute the OLS vector β̂ = (X^T X)^(-1) X^T Y, diagnose multicollinearity via Variance Inflation Factors (VIF), and verify joint regression parameter scaling. Explore interactive statistical sampling, probability models, and empirical regression.

SAMPLE · INFER · CONVERGE

Your virtual statistics laboratory.

PARTIAL FITTED CONTRIBUTION Ŷ_PART—
SAMPLING TELEMETRY

Ready to sample with Regressor x_2 = 1.0.

1.0 units
Two explanatory regressors X_1 and X_2

Adjust Regressor x_2, then execute statistical trial.

Probabilistic samples are evaluated rigorously using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations. Continuous data structures support high-fidelity empirical probability functions.

Statistical assumptions and distribution limits

Multiple regression identifies predictive linear associations, but cannot prove causal relationships without experimental control. The empirical regression of partial fitted contributions against regressor coordinate x_2 confirms multivariate OLS parameter extraction with slope m = 0.2500 and R² = 1.000000.

Statistical tools & sampling modules.

Multivariate Matrix Design Engine

Constructs the n × p design matrix X, appends unit intercept column, and computes the Gram matrix X^T X.

Cholesky Matrix Inverter

Inverts the symmetric positive-definite normal matrix (X^T X) via Cholesky decomposition to evaluate β̂ = (X^T X)^(-1) X^T Y.

Hat Matrix Projection Unit

Computes the orthogonal projection matrix H = X (X^T X)^(-1) X^T and evaluates leverage diagonals h_{ii}.

Variance Inflation Factor (VIF) Meter

Computes auxiliary regressions to calculate VIF_j = 1 / (1 - R_j^2) for diagnosing multicollinearity.

Adjusted R-Squared Optimizer

Computes R^2_adj = 1 - [SSE/(n - p)] / [SST/(n - 1)] to penalize model over-parameterization.

Partial Coefficient Regression Unit

Performs linear regression of partial fitted responses versus x_2 to extract the slope β_2 = 0.250.

FOLLOW THE METHOD

A reason behind every step.

Formulate multivariate multiple linear regression using matrix projection notation, compute the OLS vector β̂ = (X^T X)^(-1) X^T Y, diagnose multicollinearity via Variance Inflation Factors (VIF), and verify joint regression parameter scaling. Standardized parameter settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 units.

01

Construct Multivariate Design Matrix

Set sample size n = 5,000 with p = 2 regressors: X_1 (independent) and X_2 (uncorrelated). Establish true coefficients β = [0.0, 0.500, 0.250].

02

Synthesize Bivariate Predictor Response Data

Generate response Y = 0.500 X_1 + 0.250 X_2 + ε with ε ~ N(0, 0.25). Compute the Gram matrix X^T X and cross-product X^T Y.

03

Execute Matrix OLS Inversion

Invert X^T X and evaluate the coefficient vector β̂ = (X^T X)^(-1) X^T Y. Confirm convergence to [0.000, 0.500, 0.250].

04

Inject Inter-Predictor Multicollinearity

Increase correlation between X_1 and X_2 to r = 0.95. Observe that coefficient standard errors explode while VIF exceeds 10.0.

05

Step Second Regressor Coordinate Across x_2 = 1 to 6

Increment the x_2 coordinate across standardized settings x_2 ∈ {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}, recording the partial contribution ŷ_part.

06

Conduct Linear Regression on Partial Slope

Fit a linear regression model y = mx to coordinate pairs (x_2, ŷ_part). Confirm that empirical slope m = 0.2500 recovers the partial coefficient β_2.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into empirical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Multiple Linear Regression mathematical scaling.

LINEAR REGRESSION FIT · y = mx + b
y = 0.2500 · x
#Second Regressor Coordinate x_2 (units)Partial Fitted Contribution ŷ_part (Contribution ŷ_part)Regressor Coordinate x_2Partial Fitted Contribution ŷ_partRemove

No readings yet. Execute a statistical trial and record it.

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the statistical metrics mean.

In matrix notation, what is the closed-form Ordinary Least Squares estimator for the coefficient vector β̂?

What is the formula for the Variance Inflation Factor (VIF_j) of predictor X_j?

What is a standard threshold indicating severe multicollinearity in Variance Inflation Factor diagnostics?

What mathematical property characterizes the Hat Matrix H = X(X^T X)^(-1) X^T?