In the first simulation, random samples of size n are drawn from the population one sample at a time. With df=3, the critical value of chi-square for significance at or beyond the 0.05 level is 7.815; hence, any calculated value of chi-square equal to or greater than 7.815 is recorded as "significant," while any value smaller than that is noted as "non-significant." The second simulation does the same thing, except that it draws random samples 100 at a time. The Power of the Chi-Square "Goodness of Fit" Test pertains to the questionable common practice of accepting the null hypothesis upon failing to find a significant result in a one- dimensional chi-square test.
- Prof Dev