Accept or Reject Your Hypothesis?

All you need to know about Hypothesis testing.

Prabhat Dixit
4 min readJul 7, 2021

Have you ever thought the pre-defined fact is certainty or a myth based on some beliefs? Have you ever wonder that the 500ml bottle of Coca-Cola does always weighed the same? Have you ever checked the nutrition level quoted by an energy-drink company is correct or use false information for advertisement?

The answer to all these questions is Hypothesis testing, So what is Hypothesis testing?

Hypothesis testing is a scientific process of testing whether or not the hypothesis is plausible. It is a statistical method that uses the sample data to evaluate the validity of a hypothesis about a population parameter. Now if you are new to the statistical world, a population is the entire group that you want to conclude about, whereas a sample is a specific group that you will collect data from.

For example, if we want to do hypothesis testing for the Coca-Cola, we don’t go and test for every bottle manufactured by them, although we will select the sample of let say 100 or 200 and do our calculation on that, and based on the result we will conclude it for the entire Coca-Cola bottle.

As we learnt about what exactly hypothesis testing is, so let us now look into the steps involved in the calculation of hypothesis testing:-

  1. Specify the Null Hypothesis and Alternative Hypothesis.
  2. Based on our Alternative Hypothesis, decide on the type of test (one-tailed test or two-tailed test).
  3. Set the significance level, and calculate the critical point.
  4. Calculate the test statistic and then the p-value for the test statistic.
  5. Comparing the significance level and p-value and based on that concluding for our Hypothesis.

Null Hypothesis:- The assumption of a statistical test is called the Null Hypothesis. In simple words, it’s a pre-defined statement. It is denoted by (Ho).

Alternative Hypothesis:- A violation of the test’s assumption is called the Alternative Hypothesis, also known as the First Hypothesis and denoted by (H1 or Ha)

Two-Tailed Tests:- We do a two-tailed test when Alternative Hypothesis has the ‘not’ condition. Two-tailed tests are also known as nondirectional and two-sided tests because we can test for effects in both directions. When we perform a two-tailed test, we equally split the significance level between both tails of the distribution.

One-Tailed Tests:- One-tailed tests are also known as directional and one-sided tests because we can test for effects in only one direction. When we perform a one-tailed test, the entire significance level percentage goes into the end of one tail of the distribution. So there again two types of a one-tailed test.

Right-tailed test where Alternative Hypothesis has ‘greater than’ condition.

Left-tailed test where Alternative Hypothesis Ha has ‘lesser than’ condition.

Significance Level:- The significance level, also denoted as alpha or α, is the probability of rejecting the Null Hypothesis when it is true. A common value used for alpha is 5% or 0.05. A smaller alpha value suggests a more robust interpretation of the Null Hypothesis, such as 1% or 0.1%.

Critical region:- A critical region, also known as the rejection region, is a set of values for the test statistic for which the Null Hypothesis is rejected. i.e. if the observed test statistic is in the critical region then we reject the Null Hypothesis and accept the Alternative Hypothesis.

Test Statistic:- The test statistic is a value used in making a decision about the null hypothesis, and is found by converting the sample statistic to a score with the assumption that the null hypothesis is true.

P-value:- The P-value (or p-value or probability value) is the probability of getting a value of the test statistic that is at least as extreme as the one representing the sample data, assuming that the null hypothesis is true. The null hypothesis is rejected if the P-value is very small, such as 0.05 or less.

  1. Reject the null hypothesis — if the P-value ≤𝞪 (where 𝞪 is the significance level, such as 0.05).
  2. Fail to reject the null hypothesis — if the P-value > 𝞪

That is all about the hypothesis testing, though it got some limitations, as to how small the significance level or how large the significance value should be to get the desired result. Sometimes we might reject the null hypothesis though it was true or we might accept the null hypothesis however it was false. These are called Type-I and Type-II errors.

This is all I got for the Hypothesis testing, Hope you guys enjoyed it and will now easily catch the fraudsters by doing this simple Hypothesis Testing :)

--

--

Prabhat Dixit
Prabhat Dixit

Written by Prabhat Dixit

Data Science trainee at AlmaBetter

No responses yet