# 7.2.1 The Sampling Distribution of p ```7.2.1 The Sampling Distribution of p-­‐hat Example – Sampling Candies Effect of n and p on shape, center, and spread How good is the statistic p-­‐hat as an estimate of the parameter p? To find out, we ask, “What would happen if we took many samples?” The sampling distribution of p-­‐hat answers this question. How do we determine the shape, center, and spread of the sampling distribution of p-­‐hat? ACTIVITY: The candy machine Imagine a very large candy machine filled with orange, brown, and yellow candies. When you insert money, the machine dispenses a sample of candies. The figure below shows the result of taking one SRS of 25 candies from a large candy machine in which 45% of the candies are orange. In this Activity, you will use a Java applet to investigate the sample-­‐to-­‐sample variability in the proportion of orange candies dispensed by the machine. 1. Launch the Reese’s Pieces® applet atwww.rossmanchance.com. Notice that the population proportion of orange candies is set to p = 0.45 (the applet calls this value π instead of p). 2. Click on the “Draw Samples” button. An animated simple random sample of n = 25 candies should be dispensed. The figure below shows the results of one such sample. Was your sample proportion of orange candies (look at the value of p-­‐hat in the applet window) close to the actual population proportion, p = 0.45? 3. Click “Draw Samples” 9 more times, so that you have a total of 10 sample results. Look at the dotplot of your p-­‐hat values. What is the mean of your 10 sample proportions? What is their standard deviation? 4. To take many more samples quickly, enter 390 in the “num samples” box. Click on the Animate box to turn the animation off. Then click “Draw Samples.” You have now taken a total of 400 samples of 25 candies from the machine. Describe the shape, center, and spread of the approximate sampling distribution of p-­‐hat shown in the dotplot. 5. How would the sampling distribution of the sample proportion p-­‐hat change if the machine dispensed n = 50 candies each time instead of 25? “Reset” the applet. Take 400 samples of 50 candies. Describe the shape, center, and spread of the approximate sampling distribution. 6. How would the sampling distribution of p-­‐hat change if the proportion of orange candies in the machine was p = 0.15 instead of p = 0.45? Does your answer depend on whether n = 25 or n = 50? Use the applet to investigate these questions. Then write a brief summary of what you learned. The figure below shows one set of possible results from Step 4 of “The Candy Machine” Activity. Below is a description of what is seen: Shape: Roughly symmetric, unimodal, and bell-­‐
shaped. It looks like a Normal curve would approximate this distribution fairly well. Center: The mean of the 400 sample proportions is 0.448.This is quite close to the actual population proportion, p = 0.45. Spread: The standard deviation of the 400 values of p-­‐hat from these samples is 0.103 Example – Sampling Candies Effect of n and p on shape, center, and spread In a similar way, we can explore the sampling distribution of p-­‐hat when n = 50 (Step 5 of the Activity). As the figure below shows, the dotplot is once again roughly symmetric, unimodal, and bell-­‐shaped. This graph is also centered at about 0.45. With samples of size 50, however, there is less spread in the values of p-­‐
hat. The standard deviation in the graph to the right is 0.068. For the samples of size 25 in, it is 0.103. To repeat what we said earlier, larger samples give the sampling distribution a smaller spread. What if the actual proportion of orange candies in the machine were p = 0.15? Figure a below shows the approximate sampling distribution of p-­‐hat when n = 25. Notice that the dotplot is slightly right-­‐skewed. The graph is centered close to the population parameter, p = 0.15. As for the spread, it’s similar to the standard deviation, where n = 50 and p = 0.45. If we increase the sample size to n = 50, the sampling distribution of p-­‐