Interactive demo · Statistical Methods for Modern Biology · Chapter 2

Pearson's chi-square statistic: simulation against theory

For G genes and the K = 4 letters, Pearson's statistic X2 = Σ (O − E)2/E compares the observed letter counts with those expected if all genes shared one composition p. If p is known, X2 is approximately χ2 with G(K − 1) degrees of freedom; if p is estimated from the same table (as it must be for real data) it loses K − 1 of them and is approximately χ2 with (G − 1)(K − 1). Simulate tables in your browser and see which reference fits. The last view computes the exact permutation distribution behind Chargaff's rule.

View

Composition p in the simulated tables

Number of genes G

Scale the gene lengths by

Simulated tables B

Random permutations

Scoreboard

Try these

In the lecture notes