Set the underlying population proportion p, the desired confidence level, and the sample size n with the sliders, then click SAMPLE to take a sample. On the right you'll see a large dot representing the sample proportion (i.e., the proportion of people in the sample who said they plan to vote for candidate A), and the lines on each side of this dot span the confidence interval. Click SAMPLE 25 take 25 samples all at once. The green line indicates the population proportion p. Intervals that contain p ("hits") will be colored gray; "misses" will be colored red. Click on any confidence interval to reveal the sample proportion and the range of the confidence interval.
Click the "Quiz Me" button to complete the activity.
This applet simulates the process of taking an election poll involving two candidates. Some proportion p of the population plans to vote for candidate A. If we sample n people from the population, the proportion of people in the sample who say they plan to vote for candidate A is our best estimate of the population proportion. We can then construct a level C confidence interval, where C is the probability that the interval actually includes the true value of p. More specifically, the confidence interval is calculated as the sample proportion ± z* times the standard deviation of the sample proportion, where z* is the critical value of z that has (1-C)/2 of the normal distribution to the right of the value, and the standard deviation is .
Excluding voters for third-party candidates, approximately 52% of the voters in Virginia's 2012 presidential election voted for Barack Obama, with the other 48% voting for Mitt Romney. In modern presidential politics, the vote in Virginia this year was not particularly close: Obama fairly easily won more than 50% of the votes, claiming Virginia's 13 electoral college votes.
Use this applet to simulate what might have happened in 25 pre-election polls, with each poll including a sample size of 250 people. First click RESET, then set the Population Proportion to .52, the sample size to 250, and click SAMPLE 25.
Inspect the 95% confidence intervals of these 25 simulated polls. How many of them include the true population proportion of .52?