Introduction to Statistical Hypothesis Testing

Welcome to one of the most practical and powerful branches of statistics! In everyday life, people make claims all the time: a manufacturer might claim a machine fills cereal boxes with exactly \(500\text{ g}\) of cereal, or a doctor might claim that a new drug reduces recovery time. But how do we decide whether such claims are actually true, or if observed differences are just down to random chance?

In this chapter for CCEA A2 2: Applied Mathematics, you will learn how to formally test claims about a population mean \(\mu\) using sample data from a Normal distribution. Don't worry if this seems a bit formal at first — we will break down the process into clear, repeatable steps that you can apply to any exam question!

The Courtroom Analogy

Think of hypothesis testing just like a court trial:

1. Presumption of Innocence: We assume the status quo is true unless proven otherwise. This default position is our Null Hypothesis (\(H_0\)).
2. The Accusation: Someone claims that something has changed or is different. This is our Alternative Hypothesis (\(H_1\)).
3. The Evidence: We collect sample data and calculate a Test Statistic.
4. The Verdict: If the evidence is extremely unlikely to happen by pure chance (beyond a predetermined threshold called the Significance Level), we reject the null hypothesis. Otherwise, we do not have enough evidence to convict!

Key Concepts & Foundations

1. The Hypotheses (\(H_0\) and \(H_1\))

Hypotheses are always stated in terms of the population parameter (\(\mu\)), never the sample statistic (\(\bar{x}\)).

Null Hypothesis (\(H_0\)): The baseline assumption that nothing has changed. It always contains an equals sign: \(H_0: \mu = \mu_0\).
Alternative Hypothesis (\(H_1\)): What we are looking for evidence to support:

One-tailed (lower tail): \(H_1: \mu < \mu_0\) (testing for a decrease)
One-tailed (upper tail): \(H_1: \mu > \mu_0\) (testing for an increase)
Two-tailed: \(H_1: \mu \neq \mu_0\) (testing for any change in either direction)

2. Distribution of the Sample Mean

Before running a test, remember how sample means behave. If a population follows a Normal distribution \(X \sim N(\mu, \sigma^2)\), then the mean of a random sample of size \(n\), denoted \(\bar{X}\), is also normally distributed:

\(\bar{X} \sim N\left(\mu, \frac{\sigma^2}{n}\right)\)

The standard deviation of the sample mean is \(\frac{\sigma}{\sqrt{n}}\), known as the standard error. As the sample size \(n\) increases, \(\bar{X}\) clusters more tightly around the true mean \(\mu\).

3. Significance Level (\(\alpha\))

The significance level (often \(5\%\), \(1\%\), or \(10\%\)) is the probability threshold for rejecting \(H_0\) when \(H_0\) is actually true. It represents the risk we are willing to take of finding a false positive.

• In a one-tailed test at the \(5\%\) level, the entire rejection area of \(0.05\) sits in one tail.
• In a two-tailed test at the \(5\%\) level, we split the rejection area equally between both tails: \(2.5\%\) (\(0.025\)) in the lower tail and \(2.5\%\) (\(0.025\)) in the upper tail.

4. Critical Values and Critical Regions

The Critical Region (or Rejection Region) is the set of values of the test statistic that leads to the rejection of \(H_0\). The boundary values are called Critical Values.

Quick Reference: Common Critical Values (\(z_{\text{crit}}\)) from the Standard Normal Distribution \(Z \sim N(0, 1)\):
• \(10\%\) One-tailed: \(\pm 1.282\) | \(10\%\) Two-tailed: \(\pm 1.645\)
• \(5\%\) One-tailed: \(\pm 1.645\) | \(5\%\) Two-tailed: \(\pm 1.960\)
• \(1\%\) One-tailed: \(\pm 2.326\) | \(1\%\) Two-tailed: \(\pm 2.576\)

Key Takeaway:

Always identify whether the question asks for a one-tailed (directional) or two-tailed (non-directional) test, and remember to halve \(\alpha\) for two-tailed tests!

The 5-Step Hypothesis Testing Method

Follow these five structured steps in your exams to secure full marks:

Step 1: State the Hypotheses clearly
Define the parameter \(\mu\) in context and write down \(H_0: \mu = \mu_0\) and \(H_1: \mu < \mu_0\), \(H_1: \mu > \mu_0\), or \(H_1: \mu \neq \mu_0\).

Step 2: State the Distribution of the Sample Mean
Under \(H_0\), state: \(\bar{X} \sim N\left(\mu_0, \frac{\sigma^2}{n}\right)\).

Step 3: Calculate the Test Statistic (or find the Critical Value)
Calculate the standardized \(z\)-statistic:
\(z = \frac{\bar{x} - \mu_0}{\frac{\sigma}{\sqrt{n}}}\)
Alternatively, calculate the critical value(s) in terms of \(\bar{X}\): \(\bar{x}_{\text{crit}} = \mu_0 \pm z_{\text{crit}} \times \frac{\sigma}{\sqrt{n}}\).

Step 4: Make a Statistical Decision
Compare your calculated test statistic to the critical value (or compare your sample mean to the critical region):
• If \(z\) lies in the critical region, Reject \(H_0\).
• If \(z\) does not lie in the critical region, Do not reject \(H_0\) (or Fail to reject \(H_0\)).

Step 5: Write the Conclusion in Context
State your conclusion clearly using non-definitive wording: "There is sufficient evidence at the \(5\%\) significance level to suggest that [context of \(H_1\)]" OR "There is insufficient evidence at the \(5\%\) significance level to suggest that [context of \(H_1\)]".

Worked Examples

Example 1: One-Tailed Test (Upper Tail)

A factory produces steel rods whose lengths are normally distributed with a mean of \(120\text{ cm}\) and a standard deviation of \(4\text{ cm}\). After modifying the machinery, the manager believes the mean length has increased. A random sample of \(16\) rods has a sample mean length of \(122.1\text{ cm}\). Test the manager's claim at the \(5\%\) significance level.

Step 1: Hypotheses
Let \(\mu\) be the true mean length of the steel rods.
\(H_0: \mu = 120\)
\(H_1: \mu > 120\) (One-tailed test)

Step 2: Distribution
Under \(H_0\), \(\bar{X} \sim N\left(120, \frac{4^2}{16}\right) \implies \bar{X} \sim N(120, 1^2)\).
Standard error: \(\frac{\sigma}{\sqrt{n}} = \frac{4}{\sqrt{16}} = 1\text{ cm}\).

Step 3: Test Statistic
\(z = \frac{122.1 - 120}{1} = 2.10\)

Step 4: Critical Value Comparison
For a \(5\%\) upper one-tailed test, the critical value is \(z_{\text{crit}} = 1.645\).
Since \(z = 2.10 > 1.645\), our test statistic falls into the critical region. Therefore, we reject \(H_0\).

Step 5: Conclusion
There is sufficient evidence at the \(5\%\) significance level to suggest that the mean length of the steel rods has increased.

Example 2: Two-Tailed Test

The weight of bags of sugar packed by a machine is normally distributed with mean \(\mu\) and known standard deviation \(\sigma = 15\text{ g}\). The machine is set to produce bags with mean weight \(1000\text{ g}\). A quality control inspector takes a sample of \(25\) bags and finds a sample mean of \(\bar{x} = 993.2\text{ g}\). Test at the \(1\%\) significance level whether the machine is operating correctly.

Step 1: Hypotheses
Let \(\mu\) be the population mean weight of the sugar bags.
\(H_0: \mu = 1000\)
\(H_1: \mu \neq 1000\) (Two-tailed test)

Step 2: Distribution
Under \(H_0\), \(\bar{X} \sim N\left(1000, \frac{15^2}{25}\right) \implies \bar{X} \sim N(1000, 3^2)\).
Standard error: \(\frac{\sigma}{\sqrt{n}} = \frac{15}{\sqrt{25}} = 3\text{ g}\).

Step 3: Test Statistic
\(z = \frac{993.2 - 1000}{3} = \frac{-6.8}{3} \approx -2.27\)

Step 4: Critical Value Comparison
For a \(1\%\) two-tailed test, \(\frac{\alpha}{2} = 0.005\) in each tail.
Critical values are \(z_{\text{crit}} = \pm 2.576\).
Since \(-2.27\) lies between \(-2.576\) and \(+2.576\) (i.e. \(-2.27 > -2.576\)), the test statistic does NOT fall in the critical region. We do not reject \(H_0\).

Step 5: Conclusion
There is insufficient evidence at the \(1\%\) level of significance to suggest that the mean weight of the sugar bags is different from \(1000\text{ g}\). The machine appears to be operating correctly.

Common Pitfalls to Avoid

Writing hypotheses using \(\bar{x}\) instead of \(\mu\): Never write \(H_0: \bar{x} = 50\). We already know what \(\bar{x}\) equals from the sample! We are testing the unknown population parameter \(\mu\).
Forgetting \(\sqrt{n}\): A very frequent mistake is dividing by \(\sigma\) rather than \(\frac{\sigma}{\sqrt{n}}\) when calculating the test statistic.
Using definitive language in conclusions: Avoid saying "This proves that the mean is 120" or "The claim is definitely false". Always say "There is sufficient/insufficient evidence to suggest...".
Halving the wrong significance level: Remember to split \(\alpha\) into \(\frac{\alpha}{2}\) ONLY for two-tailed tests (\(\neq\)).

Quick Review Summary

Null Hypothesis (\(H_0\)): \(\mu = \mu_0\).
Alternative Hypothesis (\(H_1\)): \(\mu > \mu_0\), \(\mu < \mu_0\) (one-tailed) or \(\mu \neq \mu_0\) (two-tailed).
Distribution of \(\bar{X}\): \(\bar{X} \sim N\left(\mu, \frac{\sigma^2}{n}\right)\).
Test Statistic: \(z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}\).
Decision Rule: If the test statistic falls in the critical region \(\implies\) Reject \(H_0\). Otherwise, do not reject \(H_0\).
Always state the final answer in the context of the question!