🎯 Monte Carlo Importance Sampling (2D)
A 2D companion to the 3D importance-sampling lab: watch naive Monte Carlo and importance-sampled estimators race to estimate the rare-tail probability P(X>t) live, sample by sample, and inspect the importance weights that make it work.
This 2D companion runs the same estimators as the 3D original — naive Monte Carlo and a shifted-Gaussian importance sampler — over a live, incrementally-drawn plot instead of a static scene. Each frame draws a batch of samples from p=N(0,1) (naive) and q=N(μ_q,σ_q²) (importance-weighted by w=p/q), so you watch both estimates of the rare-tail probability P(X>t) converge sample by sample, plus a Toggle View mode that plots the sorted importance weights themselves to show weight degeneracy directly.
A 2D companion to the 3D Monte Carlo Importance Sampling simulation: live incremental sampling compares naive Monte Carlo against a shifted-Gaussian importance sampler estimating P(X>t), with a weight-distribution view exposing degeneracy.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install