Hypothesis testing
<p>Learn about Hypothesis testing in this comprehensive lesson.</p>
Why This Matters
Imagine you have a hunch about something – like, 'I bet more than half of my friends prefer pizza over burgers.' How do you figure out if your hunch is actually true, or just a lucky guess? That's exactly what **Hypothesis Testing** helps us do! It's a super important tool used everywhere, from scientists testing new medicines to companies checking if a new advert actually makes more people buy their product. It helps us make decisions based on evidence, not just feelings or guesses. Without it, we'd be making decisions in the dark! In simple terms, hypothesis testing is like being a detective. You have a theory (your hunch), you collect some clues (data), and then you use a special magnifying glass (statistics) to see if your clues strongly support your theory, or if they suggest your theory might be wrong.
Key Words to Know
What Is This? (The Simple Version)
Think of Hypothesis Testing like being a judge in a court case. Someone makes a claim (the 'defendant's' statement, or your hunch), and you, the judge, need to decide if there's enough evidence to say the claim is true, or if it's probably false.
In maths, we start with two opposing statements, like two sides of an argument:
- Null Hypothesis (H₀): This is the 'boring' or 'default' statement. It usually says there's no change, no difference, or no effect. For example, 'The new medicine has no effect on headaches.' Or, 'Exactly half of my friends prefer pizza.' It's like assuming the defendant is innocent until proven guilty.
- Alternative Hypothesis (H₁): This is the exciting one! It's your hunch, the claim you're trying to find evidence for. It usually says there is a change, there is a difference, or there is an effect. For example, 'The new medicine does reduce headaches.' Or, 'More than half of my friends prefer pizza.' This is what you're hoping to prove.
You then collect some data (your evidence) and use statistical tests to see if your data is so unusual that it makes you doubt the Null Hypothesis. If the data is really unusual under the assumption that H₀ is true, then you might 'reject' H₀ in favour of H₁.
Real-World Example
Let's say a company makes a new super-duper long-lasting battery for phones. They claim their new battery lasts longer than their old one, which used to last 10 hours on average.
Here's how hypothesis testing would work:
- The Claim (Alternative Hypothesis, H₁): The company believes the new battery lasts more than 10 hours.
- The Default (Null Hypothesis, H₀): If the new battery isn't better, then it lasts 10 hours or less (or exactly 10 hours, depending on how it's set up).
- Collecting Evidence: The company takes a sample of, say, 50 new batteries and tests how long each one lasts. They find the average (mean) life of these 50 batteries is 10.5 hours.
- The Big Question: Is 10.5 hours enough better than 10 hours to confidently say the new battery is truly better? Or could this 0.5-hour improvement just be a fluke (a random chance occurrence) because they only tested 50 batteries and not all of them?
- The Decision: Using special statistical calculations, they figure out the probability of getting an average of 10.5 hours (or even higher) if the battery actually still only lasted 10 hours. If this probability is very, very small (like less than 5%), it means that getting 10.5 hours by chance is super unlikely. So, they would conclude: "Wow, that's such a big improvement, it's highly unlikely to be random chance. We can confidently say the new battery is better!" They reject H₀.
If the probability was high (e.g., 20%), it means getting 10.5 hours could easily happen by chance even if the battery wasn't truly better. In that case, they'd say: "Hmm, not enough evidence yet. We can't confidently say the new battery is better." They would 'fail to reject' H₀.
How It Works (Step by Step)
Here's the recipe for conducting a hypothesis test:
- State your Hypotheses (H₀ and H₁): Clearly write down the Null and Alternative Hypotheses for your problem.
- Choose a Significance Level (α): This is like setting your 'doubt threshold' – how unlikely does your evidence need to be before you reject H₀? Common values are 5% (0.05) or 1% (0.01).
- Collect your Sample Data: Gather the information you need to test your hypothesis.
- Calculate the Test Statistic: This is a special number calculated from your sample data that helps you measure how far your sample result is from what H₀ would expect.
- Find the p-value (or Critical Value): The p-value is the probability of getting your sample result (or something even more extreme) if H₀ were actually true.
- Make a Decision: Compare your p-value to your significance level (α). If p-value < α, you reject H₀. If p-value ≥ α, you fail to reject H₀.
- Write a Conclusion in Context: Explain what your decision means in simple terms related to the original problem.
Types of Tests (One-tailed vs. Two-tailed)
Imagine you're checking if a new fertiliser makes plants grow taller. You're only interested if they grow taller, not shorter. This is a one-tailed test because your Alternative Hypothesis (H₁) only looks for a change in one direction (e.g., 'mean height is greater than X').
But what if you're checking if a new manufacturing process changes the weight of a chocolate bar? You don't care if it's heavier or lighter, just that it's different from the old weight. This is a two-tailed test because your Alternative Hypothesis (H₁) looks for a change in either direction (e.g., 'mean weight is not equal to Y').
- One-tailed test: H₁ uses '<' or '>'. You're looking for a specific direction of change.
- Two-tailed test: H₁ uses '≠' (not equal to). You're looking for any change, either up or down.
Common Mistakes (And How to Avoid Them)
-
❌ Confusing 'Fail to Reject H₀' with 'Accept H₀': Just because you don't have enough evidence to prove someone guilty doesn't mean they are innocent. It just means there wasn't enough proof. ✅ How to avoid: Always say 'fail to reject H₀'. This means your data doesn't provide enough evidence to say H₀ is false. It doesn't mean H₀ is definitely true.
-
❌ Mixing up Null and Alternative Hypotheses: Putting your claim (what you want to prove) in H₀. ✅ How to avoid: Remember, H₀ is always the 'status quo' or 'no effect' statement. H₁ is what you're trying to find evidence for. H₀ usually includes an '=' sign (e.g., μ=10), while H₁ uses '<', '>', or '≠'.
-
❌ Forgetting to state your conclusion in context: Just saying 'reject H₀' isn't enough. ✅ How to avoid: Always link your statistical decision back to the original problem. For example, instead of just 'Reject H₀', say 'There is sufficient evidence to suggest that the new battery lasts longer than 10 hours.'
-
❌ Not understanding the Significance Level (α): Thinking a 5% significance level means there's a 5% chance your conclusion is wrong. ✅ How to avoid: The significance level (α) is the probability of incorrectly rejecting H₀ when it was actually true (this is called a Type I error). It's your 'risk tolerance' for making that specific mistake.
Exam Tips
- 1.Always state both H₀ and H₁ clearly at the start of your answer, using correct notation (e.g., μ = 10, μ > 10).
- 2.Remember to compare your p-value to the significance level (α) to make your decision. If p < α, reject H₀.
- 3.Your final conclusion must always be in the context of the original problem, explaining what your statistical decision means in real-world terms.
- 4.Be careful with one-tailed vs. two-tailed tests; this affects how you find critical values or interpret p-values (sometimes p-values need to be doubled for two-tailed tests depending on the calculator/table).
- 5.Practice interpreting the significance level: a 5% level means there's a 5% risk of incorrectly rejecting a true null hypothesis.