Chi^2 distribution

The chi^2 distribution can be used to compare the goodness of fit of observed frequencies to the frequency that is expected under a hypothetical distribution. A chi^2 distribution with v degrees of freedom is produced from summing the squares of v independent, normally distributed random variables.

Compare the tests Frequency, Poker, Runs and Serial in the menu Analysis \ Analyse Randomness.

A number of reference tables exist for evaluating the probability density of the chi^2 distribution. The table below provides a few selected quantiles for the chi^2 distribution for v degrees of freedom:

v    alpha  = 0.01    alpha  = 0.05    alpha  = 0.1
     (P[X>x]<0.01)    (P[X>x]<0.05)    (P[X>x]<0.1)
          x=               x=               x=

1        6.63              3.84             2.71 
2        9.21              5.99             4.61 
3       11.34              7.82             6.25
4       13.28              9.49             7.78
5       15.09             11.07             9.23
6       16.81             12.59            10.64
7       18.48             14.07            12.01
8       20.09             15.51            13.36
9       21.67             16.92            14.68
10      23.21             18.31            15.98
15      30.58             25.00            22.30
20      37.57             31.41            28.41
30      50.89             43.77            40.25
255    310.40            293.20           284.30

The entry (v = 10, alpha = 0.05, x = 18.31) means that – assuming that X has a chi^2 distribution with 10 degrees of freedom – the probability of obtaining a value for X of 18.31 or more is only 5%.

Reference: Christian Schiestl, Pseudozufallszahlen in der Kryptographie, in Klagenfurt, 1999.