Topic 5: Statistical Inference

Lesson 5.3: The Language Of Hypothesis Testing

Official syllabus section covering Lesson 5.3: The language of hypothesis testing within Topic 5: Statistical Inference: Null and alternative hypotheses, significance level, test statistic, one-tail and two-tail tests, critical value, critical region, acceptance region and p-value.; The 5% significance convention unless directed otherwise, and that conclusions must not be stated as definite..

Lesson 5.3: The Language of Hypothesis Testing

Introduction

In this lesson, we will explore the foundational elements of hypothesis testing, a crucial part of statistical inference. The objective is to understand the language and concepts associated with hypothesis testing that will empower students to make informed decisions based on data. By the end of this lesson, students should be able to:

  • Define null and alternative hypotheses and understand their significance levels.
  • Differentiate between one-tail and two-tail tests.
  • Identify critical values, critical regions, acceptance regions, and p-values.
  • Choose the appropriate hypothesis test for various contexts.

Statistical inference is a powerful tool that allows us to make decisions based on sample data. A key step in statistical inference involves testing our assumptions or hypotheses. This process can be likened to a game of detective work, where we gather evidence to support or refute our claims.

Understanding Hypotheses

Null Hypothesis ($H_0$) and Alternative Hypothesis ($H_a$)

In hypothesis testing, we start by establishing two competing statements:

  • The null hypothesis ($H_0$) posits that there is no effect or no difference. It is the statement we seek to test against.
  • The alternative hypothesis ($H_a$) asserts that there is an effect or a difference. It represents what we aim to establish as true if the null hypothesis is rejected.

For instance, let's say we want to test a new drug to see if it lowers blood pressure. Our hypotheses might be:

  • $H_0$: The new drug has no effect on blood pressure.
  • $H_a$: The new drug lowers blood pressure.

Worked Example 1

Let's say we conduct a test on the new drug with a sample of patients and find that their average blood pressure is lower after taking the drug. We want to test this:

  1. Formulate Hypotheses:
  • $H_0$: The average blood pressure after taking the drug is equal to the average before taking it ($\mu = \mu_0$).
  • $H_a$: The average blood pressure after taking the drug is less than the average before taking it ($\mu < \mu_0$).
  1. Significance Level ($\alpha$): Typically set at 0.05 or 5%. This represents the probability of rejecting the null hypothesis when it is actually true.

Test Statistics

Definition

A test statistic is a standardized value calculated from sample data during a hypothesis test. It helps in determining whether to reject the null hypothesis.

Types of Test Statistics

  1. Z-Statistic: Used when the sample size is large or when the population variance is known. The formula is:

$$Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$$

where $\bar{x}$ is the sample mean, $\mu_0$ is the population mean under the null hypothesis, $\sigma$ is the population standard deviation, and $n$ is the sample size.

  1. T-Statistic: Used when the sample size is small and the population variance is unknown. The formula is:

$$T = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}$$

where $s$ is the sample standard deviation.

Worked Example 2

Suppose we have a sample of 30 patients, and we find that the sample mean blood pressure is $120$ mmHg, $\mu_0$ is $130$ mmHg, and the population standard deviation is $10$ mmHg. We want to calculate the Z-statistic:

  1. Determine Sample Size ($n$): $n = 30$.
  2. Calculate $\bar{x}$: $\bar{x} = 120$ mmHg.
  3. Substitute into formula:

$$Z = \frac{120 - 130}{10 / \sqrt{30}} \approx -5.47$$

One-Tail vs Two-Tail Tests

One-Tail Test

A one-tail test evaluates if a parameter is either greater than or less than a certain value.

  • Example: Testing if the new drug lowers blood pressure would be one-tailed since we are only interested in one direction (lowering).

Two-Tail Test

A two-tail test evaluates if a parameter differs from a certain value in either direction.

  • Example: Testing if the mean blood pressure is different from a specified value (not just lower or higher).

Common Misconception

Many students confuse one-tail and two-tail tests. Remember:

  • One-tail tests consider only one direction of the effect (either positive or negative).
  • Two-tail tests consider both directions.

Worked Example 3

If we want to see if our drug has any effect on blood pressure at all (not just lower), we would perform a two-tailed test:

  1. $H_0$: $\mu = 130$ mmHg.
  2. $H_a$: $\mu \neq 130$ mmHg.
  3. Suppose our Z-statistic was $Z = 5.47$. For a two-tail test, we compare this to critical values for $\alpha/2 = 0.025$.

Critical Values, Critical Region, and Acceptance Region

Critical Value

A critical value is a point on the scale of the test statistic beyond which we reject the null hypothesis. It is determined based on the significance level and the type of test (one-tailed or two-tailed).

Critical Region

The critical region is the area(s) where, if the test statistic falls into, we reject the null hypothesis.

Acceptance Region

The acceptance region is where we fail to reject the null hypothesis.

Summary

  • For a one-tailed test ($\alpha = 0.05$), the critical value for Z is approximately $1.645$ (if testing for increases).
  • For a two-tailed test, the critical values are approximately $-1.96$ and $1.96$.

Worked Example 4

Continuing from our previous example of Z-statistic $Z = 5.47$:

  1. Determine Critical Value (for $H_a$: $\mu < 130$, one-tailed): Critical value = $-1.645$.
  2. Decision: Since $Z = 5.47$ is much greater than $1.645$, we reject $H_0$ and conclude that the drug lowers blood pressure.

P-Value

The p-value is the probability that the observed data would occur if the null hypothesis were true. A smaller p-value indicates stronger evidence against the null hypothesis.

Interpretation

  • If the p-value is less than the significance level ($\alpha$), reject the null hypothesis.
  • If the p-value is greater than $\alpha$, we fail to reject the null hypothesis.

Worked Example 5

Continuing with our prior Z-statistic:

  1. Finding the p-value for $Z = 5.47$. Using a Z-table, we find this corresponds to a p-value of approximately $0$ (typically $< 0.0001$).
  2. Since $0 < 0.05$, we reject $H_0$.

Conclusion

In this lesson, we covered the essential elements of hypothesis testing, including the formulation of null and alternative hypotheses, significance levels, test statistics, and the ideas of one-tail and two-tail tests. We discussed how to interpret critical values and regions, and the importance of the p-value in decision-making processes. students should now be equipped to understand and apply these concepts in various statistical contexts, ensuring that they make informed conclusions based on data.

Study Notes

  • Null Hypothesis ($H_0$): Statement of no effect.
  • Alternative Hypothesis ($H_a$): Statement indicating an effect exists.
  • Significance Level ($\alpha$): Probability threshold for rejecting $H_0$; commonly set at 0.05.
  • Test Statistic: Standardized value (Z or T) used in hypothesis testing.
  • Critical Value: Value beyond which we reject $H_0$.
  • Critical Region: Area where the null hypothesis is rejected.
  • Acceptance Region: Area where we fail to reject the null hypothesis.
  • P-value: Probability of observing data as extreme as our sample, assuming $H_0$ is true.

Practice Quiz

5 questions to test your understanding

Lesson 5.3: The Language Of Hypothesis Testing — A-Level Statistics | A-Warded