How to assess the discrepancy between the results of n tests, classified in nc classes, and a certain distribution law? An idea is to consider:χ²= Σ(_{i = 1 … nc}(O_{i}-E_{i})²/E_{i}Observed andExpectedFrequencies) Consider, for example, 50 throws of a dice game; I got 9 one, 11 two, 5 three, 8 four, 10 five and 7 six. In order to evaluate the discordance from the uniform distribution (corresponding to a balanced die), we calculate its χ². nc = 50 O: 9, 11, 5, 8, 10, 7 E: 50/6, 50/6, 50/6, 50/6, 50/6, 50/6chi2=2.8In the program, instead of 50/6, 50/6, ... I can put 1,1,... or 2,2,...

To evaluate the equity of the die we must compare this value with the theoretical distribution of χ² corresponding to the balanced die. But it is more convenient to use a procedure that does not depend on the particular phenomenon considered: if the number of tests is large (at least a few ten) and in each class there are enough values (let's say, at least 5), every theoretical distribution of χ² is approximated by a distributionχ²(r)dependent only ondegrees of freedomr, that is the amount of experimental frequencies that I have to know directly. In the previous case the degrees of freedom are 5: if I know 5 relative frequencies, I can find the 6th as the difference between 1 and the sum of them. We use the table on the program page. d.f. 5 10 25 50 75 90 9551.15 1.61 2.67 4.35 6.63 9.24 11.1 I see that 2.8 is an almost central value (it corresponds to the 1st quartile). So I can consider plausible (ie do not refuse) the hypothesis that the die is balanced. If instead of 2.8 I would have got 13 I would have grave doubts about the fact that the die isbalanced: the 95th percentile is 11.1. Another example. A friend tells me: This coin is fair. In fact on 1000 throws I got 499 "heads" and 501 "tails". What can I conclude on the likelihood of what my friend said? How many degrees of freedom are there in this case? Also in this case I have only one known condition: the number of classes. The degrees of freedom are 2-1 = 1. From the tabulation I have that 0.004 corresponds approximately to the 5th percentile. This is therefore a rather abnormal value. It is reasonable to assume that the friend has told us alie. d.f. 5 10 25 50 75 90 9510.00393 0.0158 0.102 0.455 1.32 2.71 3.84 Another example. An investigation of theweightof males between 45 and 55 years of a certain nation.The sample is 825 males, in 11 classes: 54-60, 61-70,..,124-130, ie. [53.5,60.5), [60.5,70.5),.., [123.5,130.5). nc = 11 O: 4, 39, 122, 197, 192, 126, 93, 33, 16, 2,1Is it acceptable that the distribution begaussianwith the samemeanandstandarddeviation?With pocket calculator-2 we find: 57*4, 64*39, 71*122, 78*197,85*192, 92*126, 99*93,106*33, 113*16, 120*2, 127*1 n = 825 mean = 84.296 experimental standard dev. = 11.512

see here |