← Back to list

Hypothesis Testing

Explained in the Easiest Way

Aatka Meraj · 2025-01-14 14:16 · 4 claps · 5.5 min read
#hypothesis-testing #p-value #critical-value #null-hypotheses #alternate-hypothesis
Open on Medium ↗
Wiki topics: 🔬 · Science · General

Hypothesis Testing

Explained in the Easiest Way

‘Testing hypotheses can turn questions into answers by letting data speak the truth.’

Ever wondered how big numbers in reports or research are tested against claims? Hypothesis testing is the answer — it’s like the fact-checker of the statistical world! Whether it’s in healthcare to test if a drug works better than a placebo, in marketing for A/B testing website designs, or in education to compare teaching methods, hypothesis testing helps us validate assumptions and guide decisions across industries like medicine, business, sports, and more.

Image Credit: Github Copilot

Image Credit: Github Copilot

In this article, I’ll break down the basics of hypothesis testing in a way that’s easy to understand, even if you’re new to it. We’ll cover what it is, why it matters, and how it works, without complicating things.

What is Hypothesis Testing?

Hypothesis testing is a statistical method used to determine if there’s enough evidence in the data to support a specific claim or hypothesis.

In a nutshell, hypothesis testing starts with two competing ideas:

  • Null Hypothesis (H₀): The default assumption that nothing is happening.
  • Alternative Hypothesis (Hₐ): The claim you’re testing.

You then analyze the data, calculate a test statistic, and compare it with the critical values or p-value to decide whether to reject the null hypothesis in favor of the alternative. This process involves a significance level (α), often set at 0.05, which acts as a threshold for determining statistical significance.

Steps involved in Hypothesis Testing:

  1. State the Hypothesis:
  • Null Hypothesis (H₀): It is the default assumption that there’s no effect or change.
  • Alternative Hypothesis (Hₐ): It is the assumption that denotes change. It’s the claim you’re testing or what you’re trying to prove.

2. Set the significance level (α): It is the threshold for rejecting the null hypothesis and accepting that the claim being made is true. (Typically, α is set at 0.05, meaning there is a 5% chance of making a Type I error — incorrectly rejecting a true null hypothesis).

3. Choose the Test and Calculate the Test Statistic: Choosing the right statistical test is crucial. Tests are decided based on the type of data distribution.

  • T-test: Used for small samples (n < 30) to compare means between two groups.
  • Z-test: Applied to larger samples (n ≥ 30) or when the population standard deviation is known, like testing if a group’s average height differs from a known value.
  • Chi-square test: Used for categorical data to check relationships between variables.
  • ANOVA: Helps compare means across three or more groups to identify significant differences.

4. Derive Conclusions: This is the trickiest part of the entire process. People usually get confused and make mistakes here, so let me explain it in simple terms. There are two ways to determine whether to reject the null hypothesis or not:

i) p-value method: The p-value is the probability of obtaining a result just by chance if the null hypothesis is true.

  • If p-value < α (usually 0.05) → Reject the null hypothesis (H₀).
  • If p-value ≥ α → Fail to reject the null hypothesis (H₀).

Typically, α is set to 0.05, and we compare it with the p-value that we get from our calculations. Based on that, we decide whether or not to reject the null hypothesis.

ii) Critical-region method

  • If the test statistic falls in the critical region, reject H₀.
  • Otherwise, fail to reject H₀.

Now, let me explain what p-value and the critical region are. Have a close look at the diagram below:

Image Credit: ChatGPT

Image Credit: ChatGPT

  • The green region represents acceptance (p-value region).
  • The red region represents the critical region.
  • If our test statistic lands in the red zone, we reject H₀; if it stays in green, we fail to reject H₀.

The green zone means nothing unusual, while the red zones signal a significant change. Just check where your test statistic lands — if it’s in red, H₀ goes out. Simple!

So the thumb rule is:

  • Reject H₀ (red zones).
  • Fail to reject H₀ (green zone).

Have a look at the memory map to better understand whether or not to reject H₀.

Image Credit: ChatGPT

Image Credit: ChatGPT

Example: Testing a New Teaching Method

Now let me guide you through an example for better understanding.

Suppose a school introduces a new teaching method and wants to know if it improves student performance. To test this, they compare the average test scores of students who used the new method with those who followed the traditional approach.

Since this is a one-tailed test (we are testing if scores improved, not just changed), we follow these steps:

Step 1: Define Hypothesis

  • Null Hypothesis (H₀): The new teaching method does not affect student scores (both groups perform the same).
  • Alternative Hypothesis (Hₐ): The new method improves student scores.

Step 2: Choose the significance level (α):

Let α = 0.05, meaning they’re willing to accept a 5% chance of mistakenly concluding the method works when it doesn’t.

Step 3: Collect data and perform the neccessary test:

The test scores from two groups are collected:

  • One group of students learned using the new method.
  • The other group used the traditional method.

Using a Z-test, the average scores of both groups is calculated (the Z-test is used for n > 30 and when the population standard deviation is known. It helps determine whether the sample mean is significantly different from the population mean).

The formula for calculating the Z-score is:

Step 4: Compare with the Critical Value or p-value and make a Conclusion:

i) Critical Value Approach:

  • Check the Z-table: We use a significance level of α = 0.05.
  • Find the critical value: For α = 0.05 (one-tailed test), the critical value is 1.645.
  • Compare the Z-score: Our calculated Z-score is 2.13 > 1.645, it falls in the rejection region, so we reject the null hypothesis (H₀).

ii) p-value Approach:

  • Find the p-value: Using a Z-table, the p-value corresponding to Z = 2.13 is 0.0166.
  • Compare with α: Since p = 0.0166 < α = 0.05, we reject the null hypothesis (H₀).

Have a look at the diagram below for a better understanding:

Image Credit: ChatGPT

Image Credit: ChatGPT

Here, the p-value with respect to the Z-score of 2.13 is 0.0166, which lies in the red (rejection) area beyond the dashed green line.

Since Z = 2.13 > 1.645, we reject the null hypothesis (H₀).

That’s it! The results are in! Our calculated Z-score falls in the rejection region and the p-value is less than 0.05, we have strong evidence to reject the null hypothesis. This means the new teaching method significantly improves student scores!

You’ve proved your first claim, but dont stop here! Hypothesis testing may sound like a big concept, but once you break it down, it’s an exciting way to turn data into decisions. The more you practice, the simpler it becomes — and before long, you’ll feel confident making conclusions. Keep exploring, stay curious, and enjoy the learning journey!


메타데이터
post_id
ae76df0efcd4
slug
hypothesis-testing-easy-explaination-ae76df0efcd4
url
https://medium.com/@aatkameraj1425/hypothesis-testing-easy-explaination-ae76df0efcd4
canonical_url
https://medium.com/@aatkameraj1425/hypothesis-testing-easy-explaination-ae76df0efcd4
author_url
https://medium.com/@aatkameraj1425
status
ok
fetched_at
2026-08-30 06:12:24