Hypothesis testing is a pivotal concept, essential for understanding how statisticians draw conclusions about populations based on sample data. This section delves into the fundamentals of hypothesis testing, providing students with the necessary tools to comprehend and apply these principles.

## Guide to Hypothesis Testing

Hypothesis testing is a statistical method for making decisions about a population based on sample data. It involves testing a null hypothesis (H0), which assumes no effect or difference, against an alternative hypothesis (H1), which suggests some effect or difference.

**Null Hypothesis (**$H_0$**)**: Default assumption of no effect or difference.**Alternative Hypothesis (**$H_1$**):**Suggests an effect, difference, or relationship.**Significance Level (α):**Probability threshold for rejecting $H_0$. Common levels are 5%, 1%, and 10%.**Critical Region:**Range of values leading to $H_0$ rejection.**Acceptance Region:**Range where $H_0$ is not rejected.**Test Statistic:**Calculated value from sample data used to test $H_0$.**One-Tailed Test:**Looks for an effect in one direction.**Two-Tailed Test:**Looks for any significant difference, regardless of direction.

**Interpretation:** Careful consideration is needed to understand test outcomes, especially the implications of Type I and Type II errors.

Image courtesy of key differences

## Examples

#### Example 1: One-Tailed Test

**Problem Statement: **Test the school's claim that the average test score in maths is more than 75, with a sample of 30 students having an average score of 77 and a standard deviation of 10, at a 5% significance level.

**Null Hypothesis (**$H_0$**):**μ ≤ 75**Alternative Hypothesis (**$H_1$**):**μ > 75**Significance Level (α):**0.05**Test Statistic Calculation:**$Z = \frac{\bar{X} - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{77 - 75}{\frac{10}{\sqrt{30}}}$**Test Statistic (Z):**$1.095$**Critical Value:**$1.645$

**Solution:** Since $(Z = 1.095)$ is less than the critical value of $1.645$, we fail to reject $H_0$. There's not enough evidence to support the claim that the average score is more than 75.

#### Example 2: Two-Tailed Test

**Problem Statement:** Test the manufacturer's claim that the average lifetime of their light bulbs is 1,200 hours, with a sample of 40 bulbs showing an average lifetime of 1,190 hours and a standard deviation of 30 hours, at a 1% significance level.

**Null Hypothesis (**$H_0$**):**μ = 1200 hours**Alternative Hypothesis (**$H_1$**):**μ ≠ 1200 hours**Significance Level (α):**0.01**Test Statistic Calculation:**$Z = \frac{\bar{X} - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{1190 - 1200}{\frac{30}{\sqrt{40}}}$**Test Statistic (Z):**$-2.108$**Critical Values:**$±2.576$

**Solution: **Since $Z = -2.108$ falls within the critical values of $(±2.576)$, we fail to reject $H_0$. There's insufficient evidence to refute the manufacturer's claim about the average lifetime of the light bulbs being 1,200 hours.

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.