Upper-undergraduate econometrics

Simple OLS Regression

A deterministic simulated-data notebook for simple linear regression, coefficient interpretation, residuals, and the role of noise and sample size.

Econometrics Regression Intermediate EasyEcon / Marimo Regression, identification, and simulated evidence
Focus

Fitted line, residuals, precision, and known truth

Adjust the data-generating process and watch the fitted line, coefficient estimates, and residual behavior move with noise, slope, and sample size.

What to explore

Change parameters and watch the model adjust.

  • True intercept, true slope, noise level, and sample size
  • A deterministic random seed keeps the notebook stable across exports

Core ideas

Interpret the mechanics before you chase the graphs.

  • OLS recovers the average linear relationship in the sample, not each noisy point.
  • More noise weakens fit, while larger samples stabilize the estimate.
  • Residual plots are useful because they expose what the fitted line leaves unexplained.

Learning goals

What this model should help students internalize.

  • Interpret the slope and intercept in a simple linear regression with simulated data.
  • See how noise and sample size affect fit and coefficient precision.
  • Connect residual behavior to the gap between the fitted line and the true data-generating process.

Prerequisites

Concepts to review before diving in.

  • Basic algebra and scatterplot reading
  • Comfort with the idea of a conditional mean relationship

EasyEcon interactive

Simple OLS notebook

EasyEcon / Marimo

On phones, the full-screen view gives the cleanest notebook reading experience.

Open full screen

Deferred notebook load

Fitted line, residuals, precision, and known truth

Adjust the data-generating process and watch the fitted line, coefficient estimates, and residual behavior move with noise, slope, and sample size.

Open full screen
The EasyEcon Marimo/WASM bundle loads only when requested or when the panel scrolls near view on fast connections.

Next models to study

Keep moving through the track.