Margin of Error and Hypothesis Tests
A radio station asks 100 randomly chosen people in Cork whether they support a new cycle lane, and 54 say yes. Does that mean a majority of everyone in Cork supports it? A different sample might give 48 or 60. How far can we trust one sample? By the end of this page you will be able to answer that.
Sample proportion and sampling variability
A population is the whole group we want to know about. A sample is the part of it that we actually ask. A random sample gives every member of the population the same chance of being picked.
The sample proportion is the fraction of the sample with the feature we are interested in:
$$\text{sample proportion} = \frac{\text{number with the feature}}{\text{sample size}}$$We usually write it as a percentage. Different random samples give different proportions. This is called sampling variability. It is not a mistake. It is just chance at work.
In a random sample of $200$ students, $120$ said they travel to school by bus. Find the sample proportion, as a percentage.
In a random sample of $200$ students, $120$ said they travel to school by bus.
Find the sample proportion, as a percentage.
The margin of error
How big is the typical gap between a sample proportion and the true population proportion? It depends on the sample size $n$. Bigger samples vary less.
Notice the effect of $n$. To halve the margin of error you need four times the sample size.
| Sample size $n$ | $\sqrt{n}$ | Margin of error |
|---|---|---|
| 100 | 10 | 10% |
| 400 | 20 | 5% |
| 900 | 30 | 3.3% |
| 1,600 | 40 | 2.5% |
A random sample of $100$ people is taken. a) Use the formula $\dfrac{1}{\sqrt{n}}$ to find the margin of error as a percentage. b) Find the margin of error for a sample…
A random sample of $100$ people is taken.
- a) Use the formula $\dfrac{1}{\sqrt{n}}$ to find the margin of error as a percentage.
- b) Find the margin of error for a sample of size $400$.
A poll of $625$ voters finds that $48\%$ support a proposal. Find the margin of error and write down the interval within which the population proportion is likely to…
A poll of $625$ voters finds that $48\%$ support a proposal.
Find the margin of error and write down the interval within which the population proportion is likely to lie, to one decimal place.
A survey of $900$ randomly selected adults in Ireland found that $54\%$ own a bicycle. a) Find the margin of error as a percentage, correct to one decimal place. b) Find…
A survey of $900$ randomly selected adults in Ireland found that $54\%$ own a bicycle.
- a) Find the margin of error as a percentage, correct to one decimal place.
- b) Find the $95\%$ confidence interval for the population proportion.
- c) A newspaper claims that the majority of adults own a bicycle. Is this supported by the interval? Explain.
Choosing the sample size
Sometimes we work backwards. A council wants a margin of error of no more than $3\%$. How many people must it ask?
A local council wants a margin of error of no more than $2\%$ in a poll. a) Find the smallest sample size required. b) The council instead samples $1{,}600$ people. Find…
A local council wants a margin of error of no more than $2\%$ in a poll.
- a) Find the smallest sample size required.
- b) The council instead samples $1{,}600$ people. Find the margin of error.
Hypothesis tests for a proportion
A hypothesis test uses a sample to decide whether a claim about a population is believable.
-
The null hypothesis, $H_0$, is the claim being tested. For example, "the coin is fair", so the proportion of heads is $50\%$.
-
The alternative hypothesis, $H_1$, is what we accept if we reject $H_0$. For example, "the coin is not fair".
Always state the conclusion in context. Say "there is no evidence that the coin is unfair", not just "accept".
A coin is tossed $100$ times and lands on heads $59$ times. A student wishes to test whether the coin is fair. a) State the null hypothesis. b) Find the margin of error…
A coin is tossed $100$ times and lands on heads $59$ times. A student wishes to test whether the coin is fair.
- a) State the null hypothesis.
- b) Find the margin of error and the interval around the sample proportion.
- c) Decide whether to accept or reject the null hypothesis at the $5\%$ level, and give a reason.
A manufacturer in Waterford claims that $90\%$ of its light bulbs last more than $1{,}000$ hours. In a random sample of $400$ bulbs, $351$ last more than $1{,}000$…
A manufacturer in Waterford claims that $90\%$ of its light bulbs last more than $1{,}000$ hours. In a random sample of $400$ bulbs, $351$ last more than $1{,}000$ hours.
- a) State the null hypothesis and the alternative hypothesis.
- b) Find the sample proportion and the margin of error.
- c) Test the claim at the $5\%$ level of significance, stating your conclusion in context.
Comparing polls and judging reliability
Interpreting an interval is as important as finding it.
Majority claims. A claim that "the majority" support something means more than $50\%$. It is supported only if the whole interval lies above $50\%$. For the bicycle survey the interval was $50.7\%$ to $57.3\%$, which is entirely above $50\%$, so a majority is supported (just).
Consistent polls. Two polls are consistent if their intervals overlap. Then both could be estimating the same true value.
Finding the sample size that rejects a claim. A candidate claims $50\%$ support, but a sample shows $56\%$. The claim is rejected when $50\%$ falls outside $56\% \pm \dfrac{1}{\sqrt{n}}$. That happens when $\dfrac{1}{\sqrt{n}} < 6\% = 0.06$, so $\sqrt{n} > 16.67$ and $n > 277.8$. The smallest whole number is $n = 278$. With a smaller sample the interval is wide enough to include $50\%$, so the claim cannot be rejected.
A Type I error means rejecting a null hypothesis that is actually true. In the candidate example, it would mean deciding she does not have $50\%$ support when she really does. At the $5\%$ level, this happens about $5\%$ of the time.
Two polls on a local election are carried out. Poll A has $400$ people and shows $46\%$ support for a candidate. Poll B has $1{,}600$ people and shows $44\%$ support. a)…
Two polls on a local election are carried out. Poll A has $400$ people and shows $46\%$ support for a candidate. Poll B has $1{,}600$ people and shows $44\%$ support.
- a) Find the margin of error for each poll.
- b) Explain whether the results of the two polls are consistent with each other.
- c) Explain why Poll B is more reliable, referring to sampling variability.
A candidate says that $50\%$ of voters in her constituency support her. In a random sample of $n$ voters, $56\%$ support her. a) Find the smallest sample size $n$ for…
A candidate says that $50\%$ of voters in her constituency support her. In a random sample of $n$ voters, $56\%$ support her.
- a) Find the smallest sample size $n$ for which the claim of $50\%$ would be rejected at the $5\%$ level of significance, correct to the nearest whole number.
- b) Explain why a smaller sample would not allow the claim to be rejected.
- c) Explain what is meant by a Type I error in this context.
Back to the start: $54$ out of $100$ gives a margin of error of $10\%$, so the interval is $44\%$ to $64\%$. That includes values below $50\%$, so the radio station cannot claim a majority.