Introduction: What is a Hypothesis Test?
Welcome! Today we are looking at one of the most powerful tools in Statistics: Hypothesis Testing. Don't let the name scare you—it’s actually something you do in real life every day!
Imagine your friend claims they can tell the difference between expensive bottled water and tap water just by tasting it. You might be skeptical. To "test" their claim, you’d give them a few cups to taste. If they get all of them right, you might start to believe them. If they get them wrong, you’d say their claim was false. That, in a nutshell, is a Hypothesis Test.
In Mathematics (XMA01), we use this to decide whether a "claim" about a population is likely to be true, or if what we observed happened just by random chance.
1. The Language of Hypothesis Testing
Before we start calculating, we need to learn the "slang" used in statistics. Think of this like a courtroom trial.
The Null Hypothesis \( (H_0) \)
The Null Hypothesis is the "default" position. In a trial, this is "Innocent until proven guilty." In math, we assume nothing has changed. We write it as \(H_0\).
Example: \(H_0: p = 0.5\) (The coin is fair).
The Alternative Hypothesis \( (H_1) \)
The Alternative Hypothesis is what you are trying to prove. It's the "claim." We write it as \(H_1\).
Example: \(H_1: p > 0.5\) (The coin is biased towards heads).
The Significance Level \( (\alpha) \)
This is the "threshold" for our proof. Common levels are 5% (0.05) or 1% (0.01). It’s the risk we are willing to take of being wrong. If the probability of our result happening by chance is less than this level, we reject the Null Hypothesis.
The Test Statistic
This is the piece of evidence we collected. If we flip a coin 10 times and get 9 heads, "9" is our test statistic.
Quick Review:
- \(H_0\): The "Status Quo" (Nothing changed).
- \(H_1\): The "New Claim" (Something changed).
- Significance Level: Our "Bar for Evidence."
2. One-Tailed vs. Two-Tailed Tests
Depending on what we are looking for, we choose one of two "directions" for our test.
One-Tailed Test
We use this when the claim is specific about the direction of change.
- "The probability has increased" \( (H_1: p > ...) \)
- "The probability has decreased" \( (H_1: p < ...) \)
Two-Tailed Test
We use this when we just want to know if the probability has changed, but we don't know if it went up or down.
- "The probability is different" \( (H_1: p \neq ...) \)
- Trick: In a two-tailed test, you must split the significance level in half. For a 5% test, you look for 2.5% at the top and 2.5% at the bottom.
Key Takeaway: Always look for words like "more than," "less than," or "changed" to decide which test to use!
3. The Step-by-Step Process
Don't worry if this seems tricky at first! Just follow these five steps every time, and you'll be fine.
Step 1: Define your parameter.
Write down what \(p\) stands for.
Example: Let \(p\) be the probability that a seed germinates.
Step 2: State your hypotheses.
Write down your \(H_0\) and \(H_1\).
Step 3: State the distribution and significance level.
Usually, for S1/S2, this is a Binomial Distribution: \(X \sim B(n, p)\). Mention your \(\alpha\) (e.g., 5%).
Step 4: Calculate the probability (p-value).
Find the probability of getting the result you saw, or something more extreme, assuming \(H_0\) is true.
Step 5: Compare and Conclude.
- If your probability is smaller than the significance level: Reject \(H_0\). There is evidence for the claim.
- If your probability is larger: Do not reject \(H_0\). There is not enough evidence.
4. Critical Regions and Critical Values
Sometimes, instead of calculating a p-value for a specific result, we want to find the "No-Go Zone."
The Critical Region is the range of values for the test statistic that would cause us to reject the Null Hypothesis.
The Critical Value is the "boundary" number that starts that region.
Analogy: Imagine a "Keep Out" sign on a fence. The fence is the critical value, and everything behind it is the critical region.
Common Mistake to Avoid: When finding the critical region for a Binomial test, you must pick the value that keeps the probability within the significance level. Don't go over the 5% (or whatever level is set)!
5. Real-World Example
Scenario: A dice is thought to be biased towards the number 6. It is rolled 20 times, and the number 6 appears 8 times. Test this at the 5% significance level.
1. Parameter: Let \(p\) be the probability of rolling a 6. Under \(H_0\), \(p = 1/6\).
2. Hypotheses: \(H_0: p = 1/6\), \(H_1: p > 1/6\).
3. Distribution: \(X \sim B(20, 1/6)\) and \(\alpha = 0.05\).
4. Calculation: We need \(P(X \geq 8)\).
Using tables or a calculator: \(P(X \geq 8) = 1 - P(X \leq 7) \approx 0.0102\).
5. Conclusion: Since \(0.0102\) (1.02%) is less than 0.05 (5%), we reject \(H_0\). There is significant evidence to suggest the dice is biased towards 6.
Summary: The Golden Rules
- Always define \(p\) at the start.
- Always use "evidence to suggest" in your final sentence—never say you have "proven" it 100%. Statistically, we just have "strong evidence."
- For two-tailed tests, remember to compare your result against \(\alpha/2\).
- If the probability is low, the Null must go! (A handy rhyme to remember when to reject \(H_0\)).
Did you know? Hypothesis testing was largely developed by Ronald Fisher, who once used a test to see if a lady could really tell if milk was poured into her tea before or after the tea itself! (She could!)