Data Science PR
Null Hypothesis and Alternative Hypothesis Explained in 2020,null hypothesis and alternative hypothesis examples,null hypothesis and alternative hypothesis must be mutually exclusive,p-value,hypothesis testing,null hypothesis symbol,null hypothesis statistics,null hypothesis formula,null and alternative hypothesis worksheet,

Null Hypothesis and Alternative Hypothesis Explained in 2020

Figuring out exactly what the null hypothesis and the alternative hypotheses are, is not a walk in the park. Hypothesis testing is based on the knowledge that you can acquire by going over what we have previously covered about statistics in our blog.

So, if you don’t want to have a hard time keeping up, make sure you have read all the tutorials about confidence intervalsdistributionsz-tables and t-tables.

Confidence intervals, distributions, z-tables and t-tables

Confidence intervals provide us with an estimation of where the parameters are located.

Confidence interval, null hypothesis

However, when we are making a decision, we need a yes or no answer. The correct approach, in this case, is to use a test.

Here we will start learning about one of the fundamental tasks in statistics – hypothesis testing!

Hypothesis Testing

The Hypothesis Testing Process

First off, let’s talk about data-driven decision-making. It consists of the following steps:

  1. First, we must formulate a hypothesis.
  2. After doing that, we have to find the right test for our hypothesis.
  3. Then, we execute the test.
  4. Finally, we make a decision based on the result.
Steps in data driven decision making, null hypothesis

Let’s start from the beginning.

What is a Hypothesis?

Though there are many ways to define it, the most intuitive must be:

“A hypothesis is an idea that can be tested.”

What is a hypothesis?

This is not the formal definition, but it explains the point very well.

So, if we say that apples in New York are expensive, this is an idea or a statement. However, it is not testable, until we have something to compare it with.

Apples in New York are expensive, null hypothesis

For instance, if we define expensive as: any price higher than $1.75 dollars per pound, then it immediately becomes a hypothesis.

More expensive that $1.75

What Cannot Be a Hypothesis?

An example may be: would the USA do better or worse under a Clinton administration, compared to a Trump administration? Statistically speaking, this is an idea, but there is no data to test it. Therefore, it cannot be a hypothesis of a statistical test.

No data, cannot be tested = not a hypothesis

Actually, it is more likely to be a topic of another discipline.

Conversely, in statistics, we may compare different US presidencies that have already been completed. For example, the Obama administration and the Bush administration, as we have data on both.

Can be tested, might be a hypothesis

A Two-Sided Test

Alright, let’s get out of politics and get into hypotheses. Here’s a simple topic that CAN be tested.

According to Glassdoor (the popular salary information website), the mean data scientist salary in the US is 113,000 dollars.


So, we want to test if their estimate is correct.

The Null and Alternative Hypotheses

There are two hypotheses that are made: the null hypothesis, denoted H0, and the alternative hypothesis, denoted H1or HA.

Null hypothesis and alternative hypothesis

The null hypothesis is the one to be tested and the alternative is everything else. In our example,

The null hypothesis would be: The mean data scientist salary is 113,000 dollars.

The mean data scientist salary is 113,000 dollars

While the alternative: The mean data scientist salary is not 113,000 dollars.

The mean data scientist salary is not 113,000 dollars

Author’s note: If you’re interested in a data scientist career, check out our articles Data Scientist Career Path5 Business Basics for Data ScientistsData Science Interview Questions, and 15 Data Science Consulting Companies Hiring Now.

The Concept of the Null Hypothesis

Now, you would want to check if 113,000 is close enough to the true mean, predicted by our sample. In case it is, you would accept the null hypothesis. Otherwise, you would reject the null hypothesis.

Accept or Reject

The concept of the null hypothesis is similar to: innocent until proven guilty. We assume that the mean salary is 113,000 dollars and we try to prove otherwise.

Innocent until proven guilty

This is called a two-sided or а two-tailed test.

An Example of a One-Sided Test

You can also form one-sided or one-tailed tests.

Say your friend, Paul, told you that he thinks data scientists earn more than 125,000 dollars per year. You doubt him, so you design a test to see who’s right.

Who is right?

The null hypothesis of this test would be: The mean data scientist salary is more than 125,000 dollars.

The alternative will cover everything else, thus: The mean data scientist salary is less than or equal to 125,000 dollars.

Null and alternative hypothesis

Important: The outcomes of tests refer to the population parameter rather than the sample statistic! So, the result that we get is for the population.

The outcomes of tests refer to the population parameter rather than the sample statistic

Important: Another crucial consideration is that, generally, the researcher is trying to reject the null hypothesis. Think about the null hypothesis as the status quo and the alternative as the change or innovation that challenges that status quo. In our example, Paul was representing the status quo, which we were challenging.

Status quo

Let’s go over it once more. In statistics, the null hypothesis is the statement we are trying to reject. Therefore, the null hypothesis is the present state of affairs, while the alternative is our personal opinion.

The null hypothesis is the present state of affairs, while the alternative is our personal opinion

Why Hypothesis Testing Works

Right now, you may be feeling a little puzzled. This is normal because this whole concept is counter-intuitive at the beginning. However, there is an extremely easy way to continue your journey of exploring it. By diving into the linked tutorial, you will find out why hypothesis testing actually works.

The article first appeared on:

Data Science PR

5 2 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Would love your thoughts, please comment.x