I am trying to use the chi-square test for identifying random data. I have 256 categories, i.e. 255 degrees of freedom and count the occurrence of byte-values (0-255). As suggested by Knuth, the observed sequence of bytes is random, if the chi-square value is between the chi-square-values of p=5% and p=95% (I read these value from the table). the test works but I am trying to understand why :)
I have no idea about statistics, this is my problem right now. I am trying to understand what the p-value actually is and its relation to alpha. It is said that the null-hypothesis is rejected if the computed chi-statistic is above the chi-square value depending on alpha.
Knuth has a table where all chi-square-values are listed depending on the p-value. can anybody explain to me why? Why does he say that the calculated chi-square-statistic MUST be between p=5% and p=95% if data is random?
Thank you guys very much for any answer!