A goodness-of-fit test: Example: A group of rats, one by one, proceed down a ramp to one of three doors. We wish to test the hypothesis that the rats have no preference in choosing a door. Therefore, we want to test: H0: p1=p2=p3=1/3 Ha: At least one not equal to 1/3. Suppose the rats were sent down the ramp n=90 times and the observed frequencies are: n1=23, n2=36, n3=31. The expected cell frequencies are: n1=1/3 * 90=30 n2=1/3 * 90=30 n2=1/3 * 90=30 Test statistic: It is based on the chi-squared distribution with k-1=3-1=2 degrees of freedom, where k=# of cell probabilities. To compute the test statistic we use: Y = (n1-E(n1))^2 / E(n1) + (n2-E(n2))^2 / E(n2) + (n3-E(n3))^2 / E(n3) =(23-30)^2 /30 + (36-30)^2 /30 + (31-30)^2 /30 = 2.87. Using alpha=0.05 we find that the critical value (from the chi-squared table) is 5.99. Therefore, we don't reject the null hypothesis.