Hypothesis Testing

In this lesson, you'll learn about hypothesis testing, a fundamental statistical method used to make informed decisions based on data. We'll explore how to formulate hypotheses, collect evidence, and determine if there's enough evidence to support a claim.

Learning Objectives

  • Define null and alternative hypotheses.
  • Understand the concept of p-value and its role in hypothesis testing.
  • Learn how to interpret the results of a hypothesis test.
  • Identify common types of hypothesis tests (introduction to t-tests, z-tests).

Text-to-Speech

Listen to the lesson content

Lesson Content

What is Hypothesis Testing?

Hypothesis testing is a statistical method that uses sample data to evaluate a claim about a population. It's like a courtroom, where we have a claim (the hypothesis), evidence (the data), and a decision (reject or fail to reject the hypothesis). The goal is to determine if there's enough evidence to support the claim, or if the observed results are likely due to chance. For example, imagine a pharmaceutical company claims that a new drug increases a patient’s recovery rate from a specific disease. Hypothesis testing could be used to see if this is true or if the improvement in patient recovery is just due to chance.

Formulating Hypotheses: The Null and Alternative

Every hypothesis test starts with two opposing hypotheses:

  • Null Hypothesis (H0): This is the 'status quo' or the default assumption. It's the statement we're trying to disprove. For the drug example above, the null hypothesis might be: 'The new drug has no effect on the recovery rate.' It always includes an equals sign (=, ≤, or ≥).
  • Alternative Hypothesis (H1 or Ha): This is the claim or the research question. It's the statement we're trying to support. For the drug example, the alternative hypothesis might be: 'The new drug increases the recovery rate.' It is the opposite of the null hypothesis and never includes an equals sign (≠, <, or >).

Example:
* Claim: The average height of women is 5'4".
* H0: The average height of women = 5'4" (Null)
* H1: The average height of women ≠ 5'4" (Alternative - could be taller OR shorter)

P-value: The Evidence in Hypothesis Testing

The p-value is a crucial concept. It represents the probability of observing the data (or more extreme data) if the null hypothesis is true. A small p-value (typically less than 0.05, which is the significance level, denoted as alpha - α) suggests that the observed data is unlikely if the null hypothesis is true. This leads us to reject the null hypothesis and support the alternative hypothesis.

  • Small p-value (e.g., p-value < 0.05): Reject the null hypothesis; the results are statistically significant.
  • Large p-value (e.g., p-value > 0.05): Fail to reject the null hypothesis; the results are not statistically significant.

Think of the p-value like the chances of flipping a coin 100 times and getting heads 99 times. That would be very unlikely, so you'd question the fairness of the coin.

Making a Decision and Interpreting Results

Based on the p-value, we make a decision:

  1. If p-value ≤ α (alpha, usually 0.05): Reject the null hypothesis. We have enough evidence to support the alternative hypothesis. The results are considered statistically significant.
  2. If p-value > α: Fail to reject the null hypothesis. We don't have enough evidence to support the alternative hypothesis. This doesn't mean the null hypothesis is true, only that we don't have enough data to say otherwise.

Example: If we set α = 0.05, and our p-value is 0.03, we reject the null hypothesis. If our p-value is 0.10, we fail to reject the null hypothesis.

Important Note: Failing to reject the null hypothesis is NOT the same as proving it's true. It simply means our data doesn't provide enough evidence to reject it.

Introduction to Common Types of Hypothesis Tests

There are different types of hypothesis tests, and the one you use depends on your data and the research question.

  • Z-tests: Used when the population standard deviation is known and the sample size is large. (Less common in practice because knowing the population SD is rare)
  • T-tests: Used when the population standard deviation is unknown, which is more typical in real-world scenarios. We estimate the standard deviation from our sample. There are different types of t-tests, such as one-sample t-tests (testing a sample mean against a known value), two-sample t-tests (comparing the means of two groups), and paired t-tests (comparing two measurements from the same individual).

We will cover these in future lessons, but it is important to understand that different tests are performed depending on the nature of the data.

Progress
0%