Chapter 12: Q6SE (page 850)
The \({\chi ^2}\) goodness-of-fit test (see Chapter 10) is based on an asymptotic approximation to the distribution of the test statistic. For small to medium samples, the asymptotic approximation might not be very good. Simulation can be used to assess how good the approximation is. Simulation can also be used to estimate the power function of a goodness-of-fit test. For this exercise, assume that we are performing the test that was done in Example 10.1.6. The idea illustrated in this exercise applies to all such problems.
a. Simulate \(v = 10,000\) samples of size \(n = 23\) from the normal distribution with a mean of 3.912 and variance of 0.25. For each sample, compute the \({\chi ^2}\) goodness of fit statistic Q using the same four intervals that were used in Example 10.1.6. Use the simulations to estimate the probability that Q is greater than or equal to the 0.9,0.95 and 0.99 quantiles of the \({\chi ^2}\) distribution with three degrees of freedom.
b. Suppose that we are interested in the power function of a \({\chi ^2}\) goodness-of-fit test when the actual distribution of the data is the normal distribution with a mean of 4.2 and variance of 0.8. Use simulation to estimate the power function of the level 0.1,0.05 and 0.01 tests at the alternative specified.
Short Answer
a) The estimates are 0.041, 0.0089, and 0.001, respectively, for the \(0.9,0.95,\) and 0.95 quantiles of the chi-square distribution with 3 degrees of freedom.
(b) The estimates are\(0.039,0.0101,\)and 0.014, respectively, for the 0.9, 0.95, and\(0.95\)quantile of the chi-square distribution with 3 degrees of freedom.