Welcome to the World of Hypothesis Testing!

Ever made a claim and had someone say, "Prove it!"? That, in a nutshell, is what Hypothesis Testing is all about. In this chapter, we aren't just doing sums; we are learning how to use data to decide if a claim about a population is likely to be true or if it's just a result of random chance.

Whether you are testing if a new medicine works or if a coin is biased, the logic is the same. Don't worry if it feels a bit like "maths-lawyer" talk at first—we'll break it down step-by-step!

1. The Language of Hypothesis Testing

Before we start calculating, we need to learn the lingo. Think of a hypothesis test like a courtroom trial.

The Null Hypothesis \( (H_0) \)

This is the "status quo" or the "innocent until proven guilty" position. It assumes that nothing has changed or there is no special effect.
Example: "The coin is fair" or "The medication has no effect."

The Alternative Hypothesis \( (H_1) \)

This is the claim we are actually testing for. It’s what you suspect might be true instead.
Example: "The coin is biased towards Heads" or "The medication does work."

Significance Level \( (\alpha) \)

This is the "threshold" for our evidence. Usually, we use 5% (0.05) or 1% (0.01). It’s the probability we are willing to risk being wrong when we reject the null hypothesis. The smaller the percentage, the stronger the evidence we need!

Quick Review Box:
\(H_0\): No change, no effect (Always uses the \( = \) sign).
\(H_1\): Something is happening (Uses \( < \), \( > \), or \( \neq \)).
Test Statistic: The actual result we got from our sample.

2. One-Tailed vs. Two-Tailed Tests

How we write \(H_1\) depends on what we are looking for:

1. One-Tailed Test: Used when we suspect a change in a specific direction (e.g., "The mean has increased" \( \mu > 10 \) or "The probability has decreased" \( p < 0.5 \)).
2. Two-Tailed Test: Used when we just think things have changed, but we don't know which way (e.g., "The mean is no longer 10" \( \mu \neq 10 \)).

Memory Aid: If the question says "increased" or "decreased," it's One-Tailed. If it says "changed" or "is different," it's Two-Tailed!

3. Making Mistakes: Type I and Type II Errors

In statistics, we can never be 100% certain. This leads to two types of "oops" moments:

Type I Error: Rejecting \(H_0\) when it was actually true.
Analogy: Convicting an innocent person.
The probability of a Type I error is exactly the significance level!

Type II Error: Accepting \(H_0\) (failing to reject it) when it was actually false.
Analogy: Letting a guilty person go free.

Key Takeaway: We want to keep these errors as low as possible, but usually, if we make one less likely, the other becomes more likely!

4. Testing the Proportion (Binomial Distribution)

This is used when you have "successes" and "failures." For example, testing if a die is landing on '6' more often than it should.

Step-by-Step Process:

1. State \(H_0\) and \(H_1\): e.g., \(H_0: p = 0.2\), \(H_1: p > 0.2\).
2. State the distribution: \( X \sim B(n, p) \) using the \(p\) from \(H_0\).
3. Calculate the Probability: Find the probability of getting your observed result or more extreme. If you observed \(k\) successes, find \( P(X \geq k) \).
4. Compare with \(\alpha\):
• If Probability \( < \alpha \): Reject \(H_0\) (Evidence suggests a change).
• If Probability \( \geq \alpha \): Do not reject \(H_0\) (Not enough evidence).

Common Mistake to Avoid: When doing a Two-Tailed test, you must halve the significance level at each end or double your p-value before comparing!

5. Testing the Mean of a Poisson Distribution

This is for events happening over time or space (like goals in a match or flaws in a wire).

If \( X \sim Po(\lambda) \), we test the rate \( \lambda \).
The steps are identical to the Binomial test, but you use the Poisson formula: \( P(X = r) = \frac{e^{-\lambda} \lambda^r}{r!} \).

Did you know? If your Poisson mean \( \lambda \) is large (usually \( > 15 \)), you can use the Normal Approximation to make the test easier!

6. Testing the Mean of a Normal Distribution

This is one of the most common exam questions. We use this when we know the population variance \( \sigma^2 \) but want to test if the mean \( \mu \) has changed.

The Central Limit Theorem (CLT) Reminder:

When we take a sample of size \(n\), the sample mean \( \bar{X} \) follows a Normal distribution:
\( \bar{X} \sim N\left(\mu, \frac{\sigma^2}{n}\right) \)

How to calculate the Test Statistic (Z-score):

\( Z = \frac{\bar{x} - \mu}{\frac{\sigma}{\sqrt{n}}} \)

Step-by-Step:
1. Find your Z-value using the formula above.
2. Find the Critical Value from your tables for the given significance level (e.g., for 5% one-tailed, it is 1.645).
3. Compare: If your Z-value is further from zero than the Critical Value, Reject \(H_0\).

Quick Tip: Always draw a little sketch of the Normal curve. Shade the "Rejection Region" (the tail). If your Z-score falls in the shaded part, \(H_0\) is "out"!

7. Summary Checklist

Before you close your books, make sure you can:
• Correctly write \(H_0\) and \(H_1\) using the right symbols (\(p, \lambda, \text{ or } \mu\)).
• Identify if a test is one-tailed or two-tailed.
• Calculate the p-value for Binomial and Poisson tests.
• Calculate a Z-score for a Normal test and compare it to a Critical Value.
• State your conclusion in context (e.g., "There is evidence at the 5% level to suggest the mean height has increased").

Final Encouragement: Hypothesis testing is just a logical argument supported by numbers. Master the steps, and you'll find it's one of the most predictable and high-scoring parts of the syllabus! You've got this!