When a sample result beats the old average, we need a way to tell whether something genuinely changed or we just saw a lucky streak.
1
The Null Hypothesis and the p-Value
Suppose a friend who has always made 50% of their free throws claims they improved over the summer, and then makes 15 out of 20 shots (75%). A significance test checks whether a streak that good is likely to happen by pure luck if nothing actually changed.
The Null Hypothesis and the p-Value
Text solution
Split the baseline and the claim into competing hypothesesBecause we can only calculate probabilities from a single exact number, we start with the baseline assumption that nothing changed and set it against the claim we want to test.
(The subscript 0 stands for zero change, and p is the friend's true shooting proportion across all shots, not the p-value.)
Find the tail probability of our sample under H0Assuming the friend is still a true 50% shooter, we find the probability of making 15 or more shots out of 20 by random luck alone.
chance of a streak at leastthis good by luckp-value=P(15 or more made out of 20∣p=0.50)≈0.02
So if the friend hasn't improved at all, a streak of 15 or more out of 20 happens only 2% of the time by pure luck.
Under the p=0.50 curve, the tail from a just-above-average result like 11 or 12 shots up to 20 holds a large share of the dots, so results like those happen all the time by luck, while the tail from 15 up to 20 holds almost no dots:
On the "Nothing Changed" curve, making just over 10 shots happens all the time by luck, while making 15 or more barely ever happens.
2
Rejecting vs. Failing to Reject the Null
Once we know how rarely our result happens by luck, we need a cutoff for when to stop blaming luck. That preset cutoff is called the significance level α (usually 0.05, or 5%).
Rejecting vs. Failing to Reject the Null
Text solution
Compare the 15-shot p-value to the cutoff αBecause a 2% tail chance is smaller than our 5% threshold, a streak of 15 out of 20 is too unlikely to blame on pure luck, so we reject H0.
statistically significantp-value≈0.02<α=0.05⟹convincing evidence for Ha:p>0.50Reject H0
Compare the 12-shot p-value to the cutoff αWhen the friend makes 12 out of 20 (60%), a 50% shooter hits a streak at least that high 25% of the time, so ordinary luck cannot be ruled out.
plausible by luckp-value≈0.25≥α=0.05⟹not enough evidence for HaFail to reject H0
So 15 out of 20 convinces us the friend improved, whereas 12 out of 20 leaves the question open because 20 shots isn't enough to tell a 50% shooter apart from someone who improved slightly to 55%.
Even when the friend's true shooting percentage goes up to 55% or 60%, most of their 20-shot results still fall to the left of the 15-shot cutoff where we fail to reject H0:
Even when a shooter really improves by a little, most of their tries still fall short of the cutoff and fail to reject H₀.
3
Writing Hypotheses: Parameters and Tails
To set up a significance test for a new problem, we write the baseline claim and the question we are asking as H0 and Ha. Whether we are testing a proportion p or an average μ, the hypotheses always describe the true value of the whole population, never the sample we just measured.
Writing Hypotheses: Parameters and Tails
Text solution
Write H0 using the true population parameter and the baseline numberTo test a phone company's 10-hour battery claim after measuring 30 phones with sample average xˉ=9.2 hours, we set the true population average μ equal to the 10-hour baseline.
true population averageequals baselineH0:μ=10(never H0:xˉ=9.2)
Match the direction of Ha to the change that matters before looking at the dataA phone buyer only cares if battery life drops below 10 hours (left tail), a free-throw shooter only cares if accuracy rises above 0.50 (right tail), and a bolt maker aiming for 10 mm has to catch bolts that are either too small or too large (both tails).
Always pick one-sided or two-sided from the problem's goal before reading the sample number: even if a sample of bolts averages xˉ=9.5 mm, the hypothesis is still Ha:μ=10 because bolts that are too wide or too narrow both fail.
Key concepts
Every significance test follows the same logic:
Name the population parameter and set H0 to the baseline
Use p for a true population proportion (H0:p=0.50) and μ for a true population average (H0:μ=10). The null hypothesis always gets an = sign because we need a single exact number to calculate probabilities from. We can never build the curve from Ha (p>0.50 is an infinite range of numbers), and we never put the sample result (xˉ=9.2) inside a hypothesis.
Set the direction of Ha from the question, not the sample
Use a one-sided alternative when only one direction counts as the change you are looking for (Ha:μ<10 if only shorter battery life is a problem; Ha:p>0.50 if testing for improvement) and a two-sided alternative (Ha:μ=10) whenever missing the target on either side matters.
Compare the p-value to the cutoff α
The p-value is the tail probability of getting a sample at least as extreme as ours by pure luck when H0 is true.
If p-value<α (like 0.02<0.05), the result is statistically significant: reject H0 (convincing evidence for Ha).
If p-value≥α (like 0.25≥0.05), fail to reject H0 (not enough evidence to tell a real change apart from random luck; never say H0 is proven true).
4
Practice
1
A delivery service has historically arrived on time for 80% of its orders. After switching to new routing software, the manager wants to test whether the on-time rate has improved. In a sample of 50 deliveries with the new software, 44 (88%) arrive on time. Write the null and alternative hypotheses and define the parameter you use.
Are we tracking an average measurement or the proportion of deliveries that arrive on time, and which percentage is the historical baseline versus the sample result?
We are testing a population proportion, so we let p be the true proportion of all deliveries that arrive on time with the new software. The historical baseline is 0.80, and the manager is testing for an improvement (>). Be careful not to plug the sample result 0.88 into the hypotheses (writing H0:p=0.88 or Ha:p=0.88); 0.88 is just the evidence from the 50 sampled deliveries and is only used later to find the p-value.
H0:p=0.80Ha:p>0.80
where p is the true proportion of all deliveries that arrive on time with the new software.
2
A coffee machine is supposed to dispense an average of 8 ounces per cup. If it dispenses too little, customers complain; if it dispenses too much, the cups overflow. A technician measures a sample of 25 cups and finds a sample average of xˉ=8.3 ounces. Write the null and alternative hypotheses to test whether the machine is off target, and state whether this is a one-sided or two-sided test.
Before looking at xˉ=8.3, ask whether going below 8 ounces, above 8 ounces, or both causes a problem for the coffee machine.
We are testing a population average, so we let μ be the true average amount of coffee (in ounces) dispensed by the machine across all cups, with a target baseline of 8 ounces. Don't let the sample average xˉ=8.3 trick you into writing a one-sided test (Ha:μ>8) or putting xˉ in the hypothesis. Because dispensing too little or too much both cause problems, we have to check both tails regardless of which side the sample landed on.
H0:μHa:μ=8=8(two-sided test)
3
A cereal box is advertised to contain an average of 500 grams. A consumer group weighs 40 boxes, gets a sample average of 491 grams, and writes the hypotheses as H0:xˉ=491 and Ha:xˉ<500. Identify the two mistakes in how these hypotheses are written and give the correct hypotheses.
Check the symbol used for the average (sample vs. population) and the number used in H0 (sample result vs. advertised baseline).
First, the hypotheses are written with the sample average xˉ (which we already know is 491 grams for those 40 boxes) instead of the true population average μ of all boxes made. Second, H0 uses the sample result (491) instead of the advertised baseline claim (500). Be careful not to fix only one of the two mistakes (such as writing H0:xˉ=500 or H0:μ=491); both hypotheses must use the population parameter μ and the baseline number 500:
H0:μ=500Ha:μ<500
4
A trivia player has historically answered 25% of questions correctly (H0:p=0.25). After studying, they claim they have improved (Ha:p>0.25) and answer 11 out of 20 questions right (55%). If a true 25% player takes a 20-question quiz, the chance of getting 11 or more right by pure luck is 0.004 (0.4%). What is the p-value, and what conclusion should you reach using a significance level of α=0.05?
Which number gives the tail chance of the streak happening by luck when H0 is true, and how does it compare to α=0.05?
The p-value is the probability of getting a sample result at least as extreme as 11 out of 20 by luck alone under H0, which is 0.004 (0.4%). Don't confuse the p-value with the sample score 0.55 or the baseline 0.25, and be careful not to misread 0.4% as 0.40>0.05. Because p-value=0.004<α=0.05, the result is statistically significant: we reject H0 and conclude that we have convincing evidence for Ha that the player's true accuracy is now greater than 25%.
5
A teacher tests whether a new study app raises average test scores above the historical baseline of 70 points (H0:μ=70,Ha:μ>70). A sample of 15 students using the app averages 73 points, which gives a p-value of 0.18. Using α=0.05, a school administrator concludes, "This proves the app has zero effect and the true average is still 70." Explain what the administrator got right and what they got wrong.
Compare the p-value 0.18 to α=0.05 first, then ask whether a sample of 15 students is large enough to rule out a small true improvement (like μ=72 or 73).
Because the p-value (0.18) is greater than the cutoff α=0.05, a sample average of 73 or higher happens 18% of the time by normal luck when nothing changed, so the administrator is right that we cannot reject H0. Where the administrator goes wrong is claiming that failing to reject H0 proves H0 is true: the app might have raised the true average slightly (for example, to 72 or 73), and a small sample of 15 students simply isn't large enough to tell a small gain apart from random luck. The proper conclusion is that we fail to reject H0 because we do not have convincing evidence to tell whether test scores improved.
6
When testing whether a coin is biased toward heads (H0:p=0.50,Ha:p>0.50) after getting 16 heads in 20 tosses, a student asks: "Since we want to know if the coin is biased, why don't we build our probability curve assuming Ha is true instead of assuming H0 is true?" Using the logic of a significance test, explain why we cannot build the curve from Ha.
To compute the probability of getting 16 or more heads in 20 flips, what single input number do you need for each flip?
To calculate the probability of getting 16 or more heads in 20 tosses, we need one exact probability p of getting heads on each flip. A common mistake is to try to build the Ha curve using the sample result 2016=0.80, which treats one small sample as if it were the coin's true long-run probability. In reality, Ha:p>0.50 is not a single number. It is an infinite range of numbers (such as 0.52,0.65, or 0.85), each producing a different curve. We must start by assuming H0:p=0.50 because the baseline is the only side with a single, exact number we can build a probability curve from.