Null/Alternative hypotheses

Little Dino
3 min readMar 9, 2022

--

Introduction

Many of you might have heard of statistical tests such as t-test and ANOVA test. However, what exactly are these tests testing?

A hypothesis, or you can think of it as a statement. In this article, we’ll go through how to write a null hypothesis and an alternative hypothesis.

Null hypothesis

In every statistical test, you’d want to know whether a statement is true. For example, you might want to know whether the gender is correlated with the salary, or if the average grade of 2 classes are the same.

The null hypothesis (typically denoted as H0 or H-null) is a statement that describes there is NO statistically significant relationship/difference between variables. It’s not something you should alter, because statistical tests and the interpretation of the result are based on the assumption that null hypothesis means NO relationship/difference.

Therefore, H0 can be “the gender is NOT correlated with the salary”, or “the average grade of 2 classes are the same”.

Moreover, H0 is often the statement that we want to REJECT! For example, you want to know whether the average grade of 2 classes are the same, but the result you expect is that they are different.

You don’t want them to be statistically the same (where H0 is not rejected), otherwise the further research would be pointless. To be more specific, if the average grade of 2 classes are different, we’d like to further investigate what causes this difference, e.g., teachers, students’ IQ, study time. However, if the average grade is the same, we can’t continue our study.

⚡ The tricky thing here is that we CAN’T actually prove the null hypothesis is wrong, neither can we prove the alternative hypothesis is correct.

It’s because when it comes to statistics, there is always an error term involved. Or to be more general, we can’t even prove anything correct (in terms of philosophy). Alright I digressed. The point is we can only say that H0 is pretty unlikely to be true, or H1 is pretty unlikely to occur by chance.

To be more precise, “H0 is rejected” should be interpreted as we are very confident that the relationship/difference we see between variables doesn’t just occur by chance. Hence, we reject H0, which states there is no relationship/difference.

Alternative hypothesis

The alternative hypothesis (typically denoted as H1 or Ha), on the other hand, is a statement that describes there is INDEED a statistically significant relationship/difference between variables. However, there are 2 types of alternative hypothesis.

  • Two-sided

In this case, H1 is simply “there exists a statistically significant relationship/difference between groups”. In other words, two-sided alternative hypothesis doesn’t have the concept of direction. No matter the mean of first group is larger or larger than the second group, H0 is rejected as long as there is a relationship/difference.

For example, two-sided H1 can be “the gender is correlated with the salary”, or “the average grade of 2 classes are statistically different”.

  • One-sided

As you can imagine, one-sided alternative hypothesis has the concept of direction. If the direction is wrong, the null hypothesis will NOT be rejected even if the mean of two groups are different.

For example, one-sided H1 can be “the salary of male is higher than female”, or “the average grade of class A is lower than class B”.

References

  1. https://www.sciencedirect.com/topics/earth-and-planetary-sciences/null-hypothesis

--

--

Little Dino
Little Dino

Written by Little Dino

Welcome to my little world! I LOVE talking about machine learning, data science, coding, and statistics!