**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 intervals**,

**distributions**,

**z-tables**and

**t-tables**.

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

*test*. Here we will start learning about one of the fundamental tasks in statistics –

**hypothesis testing**!

## The Hypothesis Testing Process

First off, let’s talk about data-driven decision-making. It consists of the following steps:- First, we must formulate a
**hypothesis**. - After doing that, we have to find the right test for our
**hypothesis**. - Then, we execute the test.
- Finally, we make a decision based on the result.

**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.”
**hypothesis**.

**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.

**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.

**estimate**is correct.

**The Null and Alternative Hypotheses**

There are two **hypotheses**that are made: the

**null hypothesis**, denoted H

_{0}, and the

**alternative hypothesis**, denoted H

_{1}or H

_{A}.

**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.

**alternative**: The

**mean**data scientist salary is not 113,000 dollars.

**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

**the**

*accept***null hypothesis**. Otherwise, you would

**the**

*reject***null hypothesis**.

**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.

*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.

**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.

**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.

**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.

**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.

**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: https://365datascience.com/null-hypothesis/

## Add comment