Statistics & Probability / Simple Linear Regression (OLS)
FREE TO EXPLORE
LABORATORY 34 · STATISTICS & PROBABILITY

Simple Linear Regression, Ordinary Least Squares, and Gauss-Markov Theorem

Investigate bivariate linear regression, derive Ordinary Least Squares (OLS) normal equations, evaluate residual variance and standard errors, prove the Gauss-Markov Best Linear Unbiased Estimator (BLUE) property, and confirm slope parameter extraction. Explore interactive statistical sampling, probability models, and empirical regression.

SAMPLE · INFER · CONVERGE

Your virtual statistics laboratory.

FITTED RESPONSE VARIABLE Ŷ—
SAMPLING TELEMETRY

Ready to sample with Regressor x = 1.0.

1.0 units
Homoscedastic Gaussian error ε ~ N(0, σ² = 0.25)

Adjust Regressor x, 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

OLS regression measures linear association; non-linear relationships can yield misleading near-zero slopes. The empirical regression of fitted responses against regressor coordinates confirms OLS parameter extraction with slope m = 0.5000 and R² = 1.000000.

Statistical tools & sampling modules.

Bivariate OLS Data Generator

Generates coordinate pairs (x_i, y_i) with controlled linear signal y = β_0 + β_1 x + ε and homoscedastic noise.

Normal Equations Matrix Inverter

Solves the closed-form OLS normal equations β̂_1 = S_xy / S_xx and β̂_0 = ȳ - β̂_1 x̄.

Residual Sum of Squares Decomposer

Partitions total sum of squares SST into regression sum of squares SSR and residual sum of squares SSE.

Gauss-Markov BLUE Benchmark Engine

Synthesizes alternative linear unbiased estimators to empirically demonstrate that OLS achieves minimum variance.

Coefficient of Determination Resolver

Computes Pearson R² = SSR / SST and evaluates root mean square error (RMSE).

OLS Slope Verification Unit

Performs linear regression on fitted model coordinates to confirm the theoretical slope m = 0.500.

FOLLOW THE METHOD

A reason behind every step.

Investigate bivariate linear regression, derive Ordinary Least Squares (OLS) normal equations, evaluate residual variance and standard errors, prove the Gauss-Markov Best Linear Unbiased Estimator (BLUE) property, and confirm slope parameter extraction. Standardized parameter settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 units.

01

Configure Regression Parameters and Noise Level

Set true slope β_1 = 0.500 and residual variance σ^2 = 0.25 on the OLS simulation control interface.

02

Synthesize Bivariate Observations

Draw 10,000 coordinate pairs (x_i, y_i) spanning regressor values x ∈ [0, 10]. Calculate sample means x̄ and ȳ.

03

Solve Ordinary Least Squares Normal Equations

Compute cross-sums S_xx = ∑ (x_i - x̄)^2 and S_xy = ∑ (x_i - x̄)(y_i - ȳ). Evaluate OLS slope β̂_1 = S_xy / S_xx.

04

Evaluate Gauss-Markov Minimum Variance Condition

Generate a competing linear unbiased estimator β̃ = ∑ c_i y_i with c_i ≠ (x_i - x̄)/S_xx. Verify that Var(β̂_OLS) < Var(β̃).

05

Step Regressor Coordinate Across x = 1 to 6

Increment the regressor coordinate across standardized settings x ∈ {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}, recording the fitted response ŷ.

06

Conduct Linear Regression on OLS Model Scaling

Fit a linear regression line y = mx to coordinate pairs (x, ŷ). Confirm that empirical slope m = 0.5000 validates OLS parameter estimation.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into empirical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Simple Linear Regression (OLS) mathematical scaling.

LINEAR REGRESSION FIT · y = mx + b
y = 0.5000 · x
#Independent Regressor Coordinate x (units)Fitted Response Variable ŷ (Response ŷ)Regressor Coordinate xFitted Response Variable ŷRemove

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

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the statistical metrics mean.

What does the Gauss-Markov Theorem prove about the Ordinary Least Squares (OLS) estimator?

For a simple linear regression model with true slope β_1 = 0.500 and zero intercept, what is the expected fitted response ŷ for regressor x = 4.0?

What is the unbiased estimator s² of the residual error variance σ² in simple linear regression?

In simple linear regression, what is the exact mathematical relationship between R² and Pearson correlation r?