Skip to content

Chi-Square Distribution Interactive

Open Chi-Square Distribution Interactive Fullscreen

About This MicroSim

Chapter 1: Genetic Inference and Probabilistic Reasoning

Library: p5.js

Type: Interactive simulation sim-id: chi-square-distribution
Library: p5.js
Status: Specified

An interactive visualization of the chi-square distribution. A slider controls degrees of freedom (1–10). The user can input observed and expected values for up to 4 categories. The calculated chi-square statistic is shown as a vertical line on the distribution curve, with the area to the right shaded to represent the p-value. Critical values at p = 0.05 and p = 0.01 are marked.