When we survey a random sample of people, our sample result almost never lands right on the true population number, because pure luck makes every random sample vary a little bit.
1
What Margin of Error Is
The margin of error is the "give or take" distance we attach to either side of our sample result. For the roughly 95% intervals here, about 95% of intervals built this way from repeated random samples would contain the true population value. To see how wide that interval needs to be, we first look at how much random samples of size 100 naturally vary around a known true value in a computer simulation.
What Margin of Error Is
Text solution
Double the step size to get the margin of errorBecause about 95% of sample results in an approximately normal pile fall within two standard deviations ("two steps") of the center, we estimate the margin of error as twice the size of one step.
Margin of Error=2×(size of 1 step)=2×5%=10%
Add and subtract from the sample resultStarting at our single survey result of 58% and going two steps (10%) in both directions gives the plausible interval for the true school percentage.
sample58%±Margin of Error10%=48% to 68%
In our simulation, whenever a sample lands in the middle 95% of the pile, going two steps out reaches far enough to catch the supposed 60% center. Even though we don't know the true school percentage, we only miss the true value when our sample lands out in the 5% tails.
Every sample in the middle 95% of the pile has a two-step interval that reaches the true 60% center, while samples in the outer 5% tails miss it.
2
Finding Margin of Error from a Simulation
To build that interval in a problem, we need the size of two steps. When we are given a computer simulation of many random samples, we either double the given standard deviation of the sample dots or find the middle 95% of the dots directly on a dot plot.
Finding Margin of Error from a Simulation
Text solution
When the simulation gives the standard deviation directlyDouble the standard deviation of the sample dots to get the two-step margin of error right away.
Margin of Error=2×0.04=0.08=8%
When given a dot plot, cross off the outer 5% of the dotsTake 5% of the 80 total dots and split them evenly between the two tails, crossing off the 2 lowest dots (0.46 and 0.48) and the 2 highest dots (0.70 and 0.74).
0.05×80=4 extreme dots⟹cross off 2 lowest and 2 highest dots
Measure from the center to the edge of the middle 95%The remaining middle 95% of the dots run from 0.52 to 0.68, so the margin of error is the distance from the 0.60 center to the edge, or half the width of the middle 95%.
Margin of Error=0.68−0.60=0.08=8%(or 20.68−0.52=20.16=0.08)
3
Finding Margin of Error from a Single Sample
In real life we usually do not have a computer simulation of hundreds of samples, because we only have our single sample of n people. We find the size of one step directly from how spread out the individuals are and how many people n we surveyed.
Finding Margin of Error from a Single Sample
For the large random samples we use here, dividing the individual standard deviation by n estimates one step for the sample average or proportion:
1 step=how many you askednSpread of Individuals,Margin of Error=2×nSpread of Individuals
Text solution
Find the interval for an average (100 backpacks, mean 15 lbs, individual spread 3 lbs)Divide the individual standard deviation by n to get one step, double it for the margin of error, and add and subtract from the sample average.
1 step⟹Margin of Error⟹15±0.6=1003=103=0.3 lbs=2×0.3=0.6 lbs=14.4 to 15.6 lbs
Find the interval for a percent (100 students, 58% yes and 42% no)Estimate the individual standard deviation for responses recorded as 1 for yes and 0 for no using (yes)(no), divide by n, and double it.
1 step⟹Margin of Error=100individual spread0.58×0.42≈100.49≈0.05=5%=2×5%=10%
Use the n1 shortcut near a 50–50 splitBecause 2×0.50×0.50=2×0.50=1, we can estimate the margin of error for a percent in one step as n1.
Margin of Error≈n1=1001=101=0.10=10%
Test a claim using the plausible interval (48% to 68%)A claimed value inside the interval is consistent with the survey, while a value outside it gives evidence against the claim.
52%40% is inside 48% to 68% (plausible), is outside 48% to 68% (not plausible)
Note: The n1 shortcut is great when no sample percent is given yet or the split is close to 50–50, but if a problem gives an uneven split like 80% yes and 20% no (or asks for the individual spread), use (yes)(no) on top.
4
Finding Sample Size for a Target Margin of Error
When a margin of error is too wide to be useful, we can choose a smaller target margin of error first and solve the same formula backwards to find the sample size n we need.
Finding Sample Size for a Target Margin of Error
Text solution
Solve for sample size n with a target percent margin of error (4%=0.04)Write the target percent as a decimal in the n1 shortcut, isolate n, and square both sides.
0.04⟹n⟹n=n1=0.041=25=252=625 students
Solve for sample size n with a target average margin of error (0.2 lbs when s=3 lbs)Set the target margin of error equal to n2×s, solve for n, and square both sides.
0.2⟹n⟹n=n2×3=n6=0.26=30=302=900 backpacks
Because n sits inside a square root, making the margin of error 2 or 3 times smaller requires 22=4 or 32=9 times the original sample size.
Shrinking the margin of error around the 15 lb average makes the number of backpacks we need grow as a square.
5
Testing a Treatment Difference by Reshuffling
Now we ask the same question in an experiment comparing two groups: how much can random luck change the numbers? When Group A (Medicine) beats Group B (Sugar Pill), we want to know whether the treatment actually worked or whether Group A just got dealt the people who were going to improve anyway by the luck of the shuffle. To find out how big a gap pure luck can create on its own, we assume the medicine did nothing, write everyone's results on cards, and reshuffle them into fake groups.
Testing a Treatment Difference by Reshuffling
Text solution
Find the real experiment's difference in averagesSubtract Group B's average blood pressure drop (0,3,9) from Group A's average drop (9,12,15).
Group AGroup B⟹Group A−Group B=39+12+15=12,=30+3+9=4=12−4=+8 points
Reshuffle all 6 cards into two fake groups and subtractDeal all six outcomes (0,3,9,9,12,15) randomly into Fake Group A and Fake Group B to see what difference happens with zero medicine effect.
Most deals mix high and low cards into both groups, so the difference lands near 0. Reaching +8 only happens when the three biggest drops (9,12, and 15) all get dealt to Fake Group A at once.
The reshuffled difference ranges from −8 to +8, and +8 occurs in 2 of the 20 equally likely deals.
6
Deciding if a Treatment Difference Is Significant
A statistically significant result is one that would be unusual if the treatment had no effect. Here we are testing whether Medicine produces a larger average drop than Sugar Pill, so we count reshuffled differences at least as large as the observed Medicine-minus-Sugar-Pill difference. In our 6-volunteer pilot, reaching +8 or higher happened in 2 of the 20 deals (10%), which is above the usual 5% cutoff, so that result is not statistically significant. In a separate hypothetical study with 20 volunteers, we illustrate this test using 200 reshuffles.
Deciding if a Treatment Difference Is Significant
Text solution
Test whether Medicine outperforms Sugar Pill (+8 points)Count the fraction of random shuffles that reach +8 or higher and compare it with the 5% cutoff.
200 total shuffles2 shuffles=1%<5%⟹Statistically significant (evidence that the medicine helps)
Test a smaller difference (+3 points)When more than 5% of random shuffles reach the experiment's difference just by chance, we cannot rule out luck.
200 total shuffles35 shuffles=17.5%>5%⟹Not statistically significant (could be a lucky shuffle)
Key concepts
Both margin of error and treatment testing use random variation to judge what our data support. Unusual results can still occur by chance, so these methods provide evidence with a chance of error.
When you have a simulation of samples
the dots already show how whole samples vary. If given the standard deviation of the dots (0.04), just double it (Margin of Error=2×0.04=0.08). If given a dot plot (80 dots centered at 0.60), cross off the outer 5% of dots (2 lowest and 2 highest) and measure from the center to the edge of the remaining middle 95%(0.68−0.60=0.08).
When you only have a single sample of size n
divide the individual spread by n to get one step, then double it: Margin of Error=2×nSpread of Individuals. For an average (100 backpacks, s=3 lbs), the individual spread is given (2×1003=0.6 lbs). For a yes/no percent (80% yes, 20% no, n=64), compute the individual spread as (yes)(no)=0.80×0.20=0.40, or when no split is given use the 50–50 shortcut Margin of Error≈n1. Don't divide by n again if a problem already gave you the simulation standard deviation of the sample pile.
When solving backwards for sample size n
plug your target margin of error (as a decimal for percents, like 0.04=n1) into the margin of error equation, solve for n, and square both sides (n=252=625). Making the margin of error k times smaller multiplies the required sample size by k2.
When judging a claim or an experiment
use the interval or tail count appropriate to the question. In a survey, a claim inside Sample±Margin of Error is consistent with the data, while a claim outside it gives evidence against the claim. In an experiment testing whether A does better than B, count reshuffled A-minus-B differences at least as large as the observed difference. A fraction below our 5% cutoff gives evidence that A does better, while a rare chance result remains possible.
7
Practice
1
A survey of 150 random commuters found that 64% take the train to work. In a computer simulation of 500 samples of size 150, the standard deviation of the sample proportions is 0.04. Find the margin of error and the plausible interval for the true percent of commuters who take the train.
A common mistake is dividing 0.04 by 150 or 500, which would give 0.33% or 0.18%; don't divide by n when a simulation already gives the spread of the samples.
Does the 0.04 come from individual commuters or from the simulated pile of 500 sample proportions, and how many steps make up the margin of error?
Because 0.04(4%) is already the standard deviation of the simulated sample proportions, one step is 4%. (A common mistake is dividing 0.04 by 150 or 500, which would give 0.33% or 0.18%; don't divide by n when a simulation already gives the spread of the samples.) Doubling one step gives the margin of error:
Margin of Error=2×4%=8%
Adding and subtracting 8% around the 64% sample gives the plausible interval:
64%±8%=56% to 72%
2
A computer simulation of 120 random samples produces a bell-shaped dot plot of sample proportions centered at 0.55. At the low end, there is 1 dot at 0.42,2 dots at 0.44, and 5 dots at 0.46. At the high end, there are 5 dots at 0.64,2 dots at 0.66, and 1 dot at 0.68. All other dots lie between 0.46 and 0.64. Estimate the margin of error from this dot plot.
Watch out for crossing off 6 dots from each end instead of 3, or using the full range 0.68−0.55=0.13 without crossing off the outer tails.
How many total dots make up the outer 5% of 120 samples, and how many do you cross off from each end?
The outer 5% of the 120 dots is 0.05×120=6 dots. Split those 6 extreme dots evenly between the two tails by crossing off the 3 lowest dots (1 at 0.42 and 2 at 0.44) and the 3 highest dots (1 at 0.68 and 2 at 0.66). (Watch out for crossing off 6 dots from each end instead of 3, or using the full range 0.68−0.55=0.13 without crossing off the outer tails.) The middle 95% of dots runs from 0.46 to 0.64, so the distance from the 0.55 center to the edge is:
Margin of Error=0.64−0.55=0.09=9%
3
A quality-control inspector tests a random sample of 64 batteries from a factory. The sample has a mean lifespan of 42 hours and an individual standard deviation of 6 hours. Find the margin of error and the plausible interval for the true mean lifespan, and decide whether the factory's claim of a 40-hour average lifespan is plausible.
Don't forget to multiply by 2, because stopping at 0.75 hours would give a 1-step interval of 41.25 to 42.75 hours.
First find the size of one step for a sample of 64 batteries using the individual standard deviation of 6 hours.
Divide the individual spread by n to get one step:
1 step=646=86=0.75 hours
Double one step to find the margin of error (don't forget to multiply by 2, because stopping at 0.75 hours would give a 1-step interval of 41.25 to 42.75 hours):
Margin of Error=2×0.75=1.5 hours
The plausible interval is 42±1.5=40.5 to 43.5 hours. Because 40 hours is outside 40.5 to 43.5 hours, the factory's claim is not plausible.
4
In a random survey of 64 residents in a town, the reported percentages are 80% supporting a new library and 20% opposing it, rounded to the nearest whole percent. Use these rounded percentages and the individual spread formula (yes)(no) to find the margin of error and the plausible interval, and determine whether a town councilor's claim that 72% of residents support the library is plausible.
Be careful not to forget the square root and use 0.16 as the individual spread, which would give a margin of error of 4%.
Convert 80% and 20% to decimals to find the individual spread (yes)(no), then divide by 64 and double it.
Using decimals (0.80 and 0.20), the individual spread is:
0.80×0.20=0.16=0.40
(Be careful not to forget the square root and use 0.16 as the individual spread, which would give a margin of error of 4% instead of 10%.) Divide by 64 to find one step and multiply by 2 for the margin of error:
1 stepMargin of Error=640.40=80.40=0.05=5%,=2×5%=10%
The plausible interval is 80%±10%=70% to 90%. Because 72% is inside 70% to 90%, the councilor's claim is plausible.
5
A polling organization wants to estimate the percent of voters who favor a ballot measure with a margin of error of 2.5%. Using the n1 shortcut, how many voters do they need to survey?
Write 2.5% as a decimal before setting it equal to n1.
Convert 2.5% to 0.025 (be careful not to plug in 2.5 without moving the decimal two places) and set it equal to n1:
0.025⟹n=n1=0.0251=40
Square both sides to find the sample size:
n=402=1,600 voters
6
In a study of commute times, individual commuters have a standard deviation of 12 minutes. A first survey of 36 commuters gives a margin of error of 4 minutes. How many commuters must be surveyed to cut the margin of error down to 1 minute, and how many times larger is this new sample?
Set the target margin of error (1 minute) equal to 2×n12, or look at how many times smaller the new margin of error is compared to 4 minutes.
Set the target margin of error equal to two steps:
1⟹n⟹n=n2×12=n24=24=242=576 commuters
Because the margin of error is made 4 times smaller (from 4 minutes down to 1 minute), the required sample size is 42=16 times as large (36×16=576), not just 4 times as large (36×4=144).
7
In a pilot experiment testing a plant fertilizer, 3 plants given Fertilizer A grew 8,10, and 12 cm, while 3 plants given Plain Water (Group B) grew 2,4, and 6 cm. Find the experiment's difference in averages (Group A−Group B). Then, in a random reshuffle of all 6 cards, Fake Group A is dealt 2,6, and 10 cm, and Fake Group B is dealt 4,8, and 12 cm. Find the reshuffled difference (Fake A−Fake B).
Find the average of the 3 cards in each group first, then subtract in the exact order asked (A−B).
In the real experiment, the group averages and difference are:
Group AGroup B⟹Group A−Group B=38+10+12=10 cm,=32+4+6=4 cm=10−4=+6 cm
In the random reshuffle, the fake group averages and difference are (keep the subtraction order Fake A−Fake B so you don't flip the sign to +2 cm):
An experiment is designed to test whether Study Method A gives higher average scores than Study Method B, with 30 students randomly split into two groups of 15. On the midterm, Group A beats Group B by +2.8 points. In 200 random shuffles of the midterm scores, 22 shuffles reach +2.8 or higher. On the final exam, Group A beats Group B by +5.2 points. In 200 random shuffles of the final exam scores, only 3 shuffles reach +5.2 or higher. Which result is statistically significant, and what can you conclude?
Find the percentage of the 200 random shuffles that reached each score gap and compare each percentage against the 5% cutoff.
Divide the number of extreme shuffles by all 200 shuffles for each test (don't compare the count of 22 or 3 directly to 5 without dividing by 200 first, which would misread 22 as 22% and 3 as 3%):
The final exam result (+5.2 points) is statistically significant because only 1.5% of random shuffles produce a difference of +5.2 points or higher. This gives convincing evidence that Study Method A caused higher final exam scores. For the midterm, 11% of shuffles produce a difference of +2.8 points or higher, so that result is not statistically significant and could easily be due to the luck of the shuffle.