Hypothesis testing is a statistical method used to infer whether a hypothesis about the population mean is true or not. It's particularly crucial in cases where populations are normally distributed and when dealing with large sample sizes.

**Introduction to Hypothesis Testing**

In hypothesis testing, we start by assuming a null hypothesis (H₀), typically a statement indicating no effect or no change. This hypothesis is tested against an alternative hypothesis (H₁), which represents a significant effect or change.

**Key Elements of Hypothesis Testing:**

**Hypothesis Testing:**Determines if a claim about a population mean is true.**Null Hypothesis (**$H_0$**):**No change or effect. Example: "Population mean is X."**Alternative Hypothesis (**$H_1$**):**Indicates change or effect. Example: "Population mean is not X."**Test Statistic:**Number from sample data to test H₀.**Significance Level (α):**Usually 5% (0.05), marks statistical significance.**Rejection Region:**Test statistic values that lead to rejecting H₀.**Acceptance Region:**Values where $H_0$ is not rejected.

**Scenarios**

1. **Known Population Variance:** Use normal distribution for test statistic.

2. **Large Samples (n ≥ 30):** Normal approximation is valid due to Central Limit Theorem.

## Hypothesis Testing Steps

1. **State Hypotheses: **Define $H_0$ and $H_1$.

2. **Choose α:** Commonly 0.05.

3. **Calculate Test Statistic:** Use formula based on variance and sample size.

4. **Determine Rejection Region:** Based on α and test statistic distribution.

5.** Decision: **Reject or not reject H₀ based on calculations.

## Example

A bakery claims that the average weight of their bread loaves is 500 grams. To test this claim, a random sample of 36 loaves is selected, and the average weight is found to be 505 grams with a standard deviation of 15 grams. Test the bakery's claim at a 5% significance level.

**Solution:**

**1. Hypotheses**

- H₀: μ = 500 grams
- H₁: μ ≠ 500 grams

**2. Significance Level**

- α = 0.05

**3. Test Statistic Calculation**

- Sample mean $(\bar{x})$ = 505 grams
- Population mean under H₀ (μ) = 500 grams
- Standard deviation (σ) = 15 grams
- Sample size $n$
- = 36
- $Z = \frac{505 - 500}{15/\sqrt{36}} = \frac{5}{2.5}$ = 2.00

**4. Rejection Region**

- Critical Z-value ≈ ±1.96
- Rejection if |Z| > 1.96

**5. Decision**

- Calculated Z = 2.00 > 1.96
- Reject H₀

**6. Conclusion**

Evidence suggests average weight is not 500 grams.

Rahil spent ten years working as private tutor, teaching students for GCSEs, A-Levels, and university admissions. During his PhD he published papers on modelling infectious disease epidemics and was a tutor to undergraduate and masters students for mathematics courses.