Hypothesis Testing Fundamentals
Master the language and concepts of statistical hypothesis testing
SPEC 5.1 • STATISTICAL HYPOTHESIS TESTING
What is Hypothesis Testing?
Definition
Hypothesis testing is a statistical method for making decisions about a population based on sample data.
We use hypothesis testing when we want to determine whether there is enough evidence to support a claim about a population parameter.
The Logic
We start by assuming something is true (our default position), then collect data to see if there's sufficient evidence to reject this assumption.
Real-World Examples
Quality control: Has a manufacturing process changed?
Medical trials: Is a new drug more effective than existing treatment?
Market research: Has customer satisfaction improved?
Null and Alternative Hypotheses
NULL HYPOTHESIS (H₀)
The default assumption
States that nothing has changed or there is no effect
Always contains "="
ALTERNATIVE HYPOTHESIS (H₁)
What we are testing for
States that something has changed or there is an effect
Contains <, >, or ≠
Key Point
We either reject H₀ (in favour of H₁) or do not reject H₀. We never "accept" H₀ or "prove" anything.
Important
The null hypothesis H₀ must always include the equality. For example: H₀: p = 0.3, not H₀: p > 0.3
Writing Hypotheses
Hypotheses are written in terms of population parameters:
ParameterSymbolExample H₀Used For
Population proportionpH₀: p = 0.5Binomial tests
Population meanμH₀: μ = 100Normal tests
Population correlationρH₀: ρ = 0Correlation tests
Exam Tip
Always define your parameter in words before stating your hypotheses. For example: "Let p be the probability that a customer prefers Brand A."
One-Tailed vs Two-Tailed Tests
One-Tailed Test
Tests for change in a specific directionH₁: p > 0.5 or H₁: p < 0.5Critical region at one end of distribution
Two-Tailed Test
Tests for change in either directionH₁: p ≠ 0.5Critical region at both ends of distribution
How to Identify from Context
Keywords suggesting ONE-TAILEDKeywords suggesting TWO-TAILED"increased", "improved", "greater than", "more than", "higher""changed", "different", "altered", "not equal to""decreased", "reduced", "less than", "lower", "fewer""whether there is a difference", "if there has been any change"
Visualising Test Types
Two-Tailed Note
For a two-tailed test at significance level α, the critical region is split: α/2 in each tail. For example, at 5% significance, there is 2.5% in each tail.
Significance Level
Definition
The significance level (α) is the probability of rejecting H₀ when it is actually true.
Significance LevelAs PercentageInterpretation
α = 0.1010%Less strict, easier to reject H₀
α = 0.055%Most common level used
α = 0.011%More strict, need stronger evidence
Key Insight
A smaller significance level means we require stronger evidence to reject H₀. The significance level equals the size of the critical region.
Exam Tip
The question will always tell you the significance level to use. If not specified, assume 5%.
Test Statistic and Critical Values
Test Statistic
A value calculated from your sample data that is used to make a decision about H₀.
Examples: sample proportion, sample mean, number of successes
Critical Value
A boundary value from statistical tables that separates the critical region from the acceptance region.
Depends on: significance level and test type
Decision Rule
Compare the test statistic to the critical value:
If test statistic is in the critical region → Reject H₀
If test statistic is not in the critical region → Do not reject H₀
Critical Region and Acceptance Region
Critical Region
The set of all values of the test statistic that would lead us to reject H₀.
Also called the rejection region.
Acceptance Region
The set of all values of the test statistic that would lead us to not reject H₀.
Complements the critical region.
Example: One-tailed test (right) at 5% significance
Important
We say "do not reject H₀" rather than "accept H₀" because failing to reject doesn't prove H₀ is true—it just means we don't have enough evidence against it.
The p-value
Definition
The p-value is the probability of obtaining a result at least as extreme as the observed result, assuming H₀ is true.
Decision Rule Using p-value
If p-value < significance level → Reject H₀
If p-value ≥ significance level → Do not reject H₀
Interpreting p-values
p-valueEvidence against H₀p > 0.10Little or no evidence0.05 < p ≤ 0.10Weak evidence0.01 < p ≤ 0.05Moderate evidencep ≤ 0.01Strong evidence
Common Misconception
The p-value is NOT the probability that H₀ is true. It's the probability of getting our observed result (or more extreme) if H₀ were true.
Evaluating a Hypothesis Test
There are two equivalent methods to decide whether to reject H₀:
Method 1: Critical Value Approach
Compare the test statistic to the critical value
Find the critical value(s) that define the rejection region
If test statistic falls in the critical region → Reject H₀
If test statistic falls in the acceptance region → Do not reject H₀
Method 2: P-Value Approach
Compare the p-value to the significance level (α)
Calculate P(getting result this extreme or more extreme | H₀ true)
If p-value < α → Reject H₀
If p-value ≥ α → Do not reject H₀
Key Point
Both methods will always give the same conclusion. Use whichever the question requires or whichever you find easier. The p-value method is often preferred as it shows exactly how significant the result is.
Conducting a Hypothesis Test
Here is the complete structure for answering a hypothesis test question:
Example Problem
A coin is claimed to be fair. To test this, the coin is tossed 20 times and 15 heads are observed. Test at the 5% significance level whether the coin is biased towards heads.
Step-by-Step Solution
Step 1: Define the parameter and state hypotheses
Let p = probability of obtaining a head
H₀: p = 0.5 (coin is fair)
H₁: p > 0.5 (coin is biased towards heads)
Step 2: State the distribution under H₀
Under H₀, X ~ B(20, 0.5) where X = number of heads
Step 3: Calculate the p-value (or find critical region)
P(X ≥ 15) = 1 − P(X ≤ 14) = 1 − 0.9793 = 0.0207
Step 4: Compare and conclude
0.0207 < 0.05, so reject H₀
Step 5: Write conclusion in context
There is sufficient evidence at the 5% significance level to conclude that the coin is biased towards heads.
Worked Example01
A coin is suspected of being biased towards heads. Let p be the probability of obtaining a head when the coin is tossed. Write down suitable null and alternative hypotheses to test this claim.
1
Identify what we're testing: The claim is that the coin is biased towards heads, meaning p is greater than for a fair coin.
2
For a fair coin, p = 0.5. This is our default assumption (null hypothesis).
3
Since we're testing if the coin is biased towards heads specifically, this is a one-tailed test (p > 0.5).
AnswerH₀: p = 0.5 (the coin is fair)
H₁: p > 0.5 (the coin is biased towards heads)
Worked Example02
A factory claims that the mean weight of their chocolate bars is 50g. A quality controller suspects the bars are underweight. Let μ be the population mean weight. Write down suitable hypotheses.
1
The claim is that the mean weight equals 50g. This is our null hypothesis.
2
The quality controller suspects the bars are underweight, meaning μ < 50.
3
Since we're testing for a specific direction (underweight), this is a one-tailed test.
AnswerH₀: μ = 50 (mean weight is 50g as claimed)
H₁: μ < 50 (mean weight is less than 50g)
Worked Example03
A company believes that 30% of its customers prefer online shopping. After a marketing campaign, they want to test whether this proportion has changed. State suitable hypotheses.
1
Let p = the proportion of customers who prefer online shopping.
2
The original claim is that p = 0.30. This is our null hypothesis.
3
The word "changed" suggests testing for any difference—increase OR decrease. This is a two-tailed test.
AnswerH₀: p = 0.30 (proportion is unchanged at 30%)
H₁: p ≠ 0.30 (proportion has changed)
Worked Example04
In a hypothesis test, the p-value is calculated to be 0.032. State whether you would reject H₀ at: (a) the 1% significance level, (b) the 5% significance level.
1
Recall: Reject H₀ if p-value < significance level.
2
(a) At 1% level (α = 0.01):
p-value = 0.032 > 0.01
Since 0.032 > 0.01, do NOT reject H₀.
3
(b) At 5% level (α = 0.05):
p-value = 0.032 < 0.05
Since 0.032 < 0.05, reject H₀.
Answer(a) Do not reject H₀ at 1% level
(b) Reject H₀ at 5% level
Worked Example05
A manufacturer claims 20% of products are defective. A sample of 50 products contains 15 defective items. The p-value for testing H₀: p = 0.2 against H₁: p > 0.2 is 0.048. Interpret this result at the 5% level.
1
Compare p-value to significance level: 0.048 < 0.05
2
Since p-value < α, we reject H₀.
3
Write conclusion in context:
Note: Always state the conclusion in context of the original problem!
AnswerThere is sufficient evidence at the 5% significance level to reject the manufacturer's claim. The data suggests that the proportion of defective products is greater than 20%.
Practice
Question 1: A teacher believes that more than 60% of students prefer morning classes. Let p be the proportion who prefer morning classes. State suitable null and alternative hypotheses, and identify the type of test.
Solution:
The teacher believes the proportion is more than 60%, so this is testing for an increase (one direction).
H₀: p = 0.60 (proportion is 60%)
H₁: p > 0.60 (proportion is greater than 60%)
Type: One-tailed test (upper tail)
Practice
Question 2: For a one-tailed test at the 5% level with H₁: p < 0.3, the test statistic follows B(25, 0.3) under H₀. The observed value is X = 4. Given that P(X ≤ 3) = 0.0332 and P(X ≤ 4) = 0.0905, determine whether to reject H₀.
Solution:
For H₁: p < 0.3, we need the critical region in the lower tail.
Critical region: values where P(X ≤ c) ≤ 0.05
P(X ≤ 3) = 0.0332 < 0.05 → 3 is in critical region
P(X ≤ 4) = 0.0905 > 0.05 → 4 is NOT in critical region
Critical region: X ≤ 3
Observed value X = 4 is NOT in the critical region.
Conclusion: Do not reject H₀
Practice
Question 3: In a hypothesis test of H₀: μ = 50 against H₁: μ ≠ 50, the calculated p-value is 0.042. State the conclusion at the 5% level and at the 1% level, writing each conclusion in context.
Solution:
At 5% level: p-value = 0.042 < 0.05
Reject H₀. There is sufficient evidence at the 5% significance level to conclude that the population mean is not equal to 50.
At 1% level: p-value = 0.042 > 0.01
Do not reject H₀. There is insufficient evidence at the 1% significance level to conclude that the population mean is different from 50.
Summary
Key Terminology
TermDefinition
H₀ (Null hypothesis)Default assumption; contains equality
H₁ (Alternative hypothesis)What we test for; contains <, >, or ≠
Significance level (α)P(reject H₀ | H₀ true); typically 1%, 5%, 10%
Critical regionValues leading to rejection of H₀
p-valueP(result as extreme as observed | H₀ true)
Key Exam Skills
Always define your parameter before stating hypotheses
Use context clues to determine one-tailed vs two-tailed
Compare p-value to significance level (not to 0.5!)
Write conclusions in context of the original problem
Next: What is Hypothesis Testing?