Home▸Data Science▸Effective Sample Size: Chain Trace and Autocorrelation (2D)

Effective Sample Size: Chain Trace and Autocorrelation (2D)

A trace of an autocorrelated chain with the draws kept after thinning, beside its autocorrelation bars against the theoretical phi to the k. Same shared model and checks as the 3D page.

Data Science2DAdvanced60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Effective Sample Size: Chain Trace and Autocorrelation (2D) ↗ Open standalone

Correlation between a treatment X and an outcome Y is not proof that X causes Y — a hidden confounder U can drive both and bias any naive regression. This simulator generates a synthetic cohort where that is exactly what happens, renders it as a live 3D point cloud (X, Y, and the normally-invisible U as depth), and fits two regression lines side by side: the biased naive OLS line, and a two-stage-least-squares line built from a valid instrument Z that moves the treatment without ever touching the outcome directly. Sliders let you dial the true causal effect, the confounding strength, the instrument's strength, and the noise level, while live readouts track the true β against both estimates and the instrument's relevance — the same diagnostic economists and epidemiologists run before trusting an IV study.

⚙ Under the hood

A trace of an autocorrelated chain with the draws kept after thinning, beside its autocorrelation bars against the theoretical phi to the k. Same shared model and checks as the 3D page.

Effective Sample SizeAutocorrelationMCMC DiagnosticsAR(1) ProcessThinning

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)