Demos

Browser-side · no install · move the sliders

Interactive widgets that bring the chapter methods to life. Every demo simulates fresh data on every interaction and runs the estimator in Observable JS, client-side. No server, no install.

Distribution sampler

Pick a distribution and its parameters. The PDF / PMF appears on the left; a histogram of 5,000 simulated draws appears on the right. Move the parameter sliders to see how shape, location, and scale change.

Central Limit Theorem animator

Draw many samples of size n from a non-normal source (uniform, exponential, lognormal, t with df=3). Plot the histogram of sample means — watch it converge to a normal as n grows.

OLS by hand

A small simulated dataset of 30 points. The line below is the OLS fit. Drag the parameter sliders to move a candidate line; watch the residual-sum-of-squares update. The optimum (lowest RSS) is the OLS solution.

Bootstrap distribution

Resample a small dataset with replacement (B = 2000 times by default). The histogram of bootstrap medians appears below, with the percentile 95% CI marked.

What’s coming

These are the live ones. The roadmap below tracks demos in progress; each will land in the relevant chapter and be linked here.

  • p-value visualizer (Ch. 5): a test-statistic slider showing the rejection region under the null and the p-value as the shaded tail.
  • Influence and leverage (Ch. 7): drag a point, watch Cook’s distance and DFBETAs update.
  • GLM probabilities (Ch. 8): pick a logit coefficient, see predicted probability curves; marginal effects displayed.
  • PCA explorer (Ch. 10): a 4-variable correlated dataset, click to standardize, see PC1 and PC2 in real time.
  • MCMC trace (Ch. 11): Metropolis-Hastings on a bimodal target, see acceptance rate and convergence diagnostics.