Simulate many samples and look at the spread
Margin of error Use the SD of the simulated statistics, not the SD of the original data. — margin of error ≈ 2 × (SD of the simulated sample statistics)
The estimate — estimate = sample statistic ± margin of error
A poll of 100 students finds that 56 prefer a later start time, so the sample proportion is 0.56. We want to estimate the proportion of all students.
To simulate, act as if the whole population has a proportion of 0.56. Draw 1000 random samples of size 100 from it and record each sample proportion. The graph shows all 1000 results. Each bar counts how many samples gave that proportion.
The 1000 results are centered at about 0.559 and have a standard deviation (SD) of about 0.050. The dashed line marks the observed 0.56.
The thick green bar runs from 2 SD below the center to 2 SD above it. In this simulation, 952 of the 1000 samples (about 95%) landed inside it. The few orange bars outside are the unusual samples.
Example
Use the simulation above to estimate the proportion of all students who prefer a later start time.
SD of the 1000 simulated proportions ≈ 0.050.
Margin of error ≈ 2 × 0.050 = 0.10.
Estimate: 0.56 ± 0.10, so from 0.46 to 0.66.
We estimate that between 46% and 66% of all students prefer a later start.
Trap: Using the SD of the original yes/no answers, or just using the sample proportion with no margin at all. The margin of error comes from the spread of the simulated sample proportions.