EXAMPLE 16 Comparing Simulation Results to Theory

Return to the scenario in which the population proportion who would respond “Agree” to some statement is . in Example 15, we used computer simulation to generate 1000 samples of size 1500 from this population and record the sample proportion of “Agree” responses for each sample. Figure 7.7 (page 316) shows one histogram of these -values. However, the histogram in Figure 7.9 (based on the same data) gives a better sense of the overall shape of the data. We also computed the mean and standard deviation of the -values: and .

image
Figure 7.9: Figure 7.9 Histogram of the same data used for Figure 7.7. The horizontal scale has been changed to better show the normal shape of the data.

Next, we look at what the theorem tells us about the sampling distribution of . The distribution of in many samples

  • Is close to normal
  • Has mean 0.6
  • Has standard deviation 0.0126

To show our work for the last number, note that , and the square root of 0.00016 is approximately 0.0126:

319

Finally, we compare the simulation results to the results from the theorem. First, the normal curve in Figure 7.9 does a reasonable job of summarizing the shape of the histogram. Second, the mean of 0.60 and standard deviation of 0.0126 from the mathematics are very close to the mean of 0.59982 and standard deviation of 0.01255 we observed in our simulation data. if the simulation used more than 1000 trials, the results would be still closer to the mathematical theory.