HYPOTHESIS IN STATISTICS

Rajat Pal
AlmaBetter
Published in
5 min readMar 23, 2021

Hypothesis Testing

In our lifetime we all have come across some absurd claims, such as

  • The current Prime Minister of India only sleeps only for 4 hr.
  • UNESCO has declared the Indian national anthem as the best national anthem in the world.
  • The new 2000 rupee note comes with a nanochip installed in it.
  • Salman khan is a virgin.

and the list goes on.

so I always use to think, is there any way to find out whether these claims are true or not. while studying Statistics I came across a test known as hypothesis testing which is helpful in finding whether the claim is true or not.

Lets first start by knowing what do u mean by Hypothesis

A Hypothesis can be defined as a proposed explanation for a phenomenon. it is not the absolute truth but a provisional working assumption.

In statistics, a hypothesis is considered to be a particular assumption about a set of parameters of the population distribution.

It is called a hypothesis because it is not known whether or not it is true.

What do you mean by Hypothesis testing

Hypothesis testing is a statistical method that is used in making statistical decisions using experimental data. Hypothesis Testing is basically an assumption that we make about the population parameter.

We use a random population sample to test two different hypotheses: the null hypothesis and the alternative hypothesis.

The null hypothesis is usually a hypothesis of equality between population parameters; e.g., a null hypothesis may state that the population mean return is equal to zero. The alternative hypothesis is effectively the opposite of a null hypothesis (e.g., the population mean return is not equal to zero). Thus, they are mutually exclusive, and only one can be true. However, one of the two hypotheses will always be true.

Let's see the steps involved in Hypothesis testing.

  • Given a claim, identify the Null Hypothesis and Alternative Hypothesis, and express them in symbolic form.
  • Calculate the value of test statistics.
  • identify the critical value with the help of a given significance level. If the significance level not given use α=0.05 or We can find the P_value with the help of test statistic.
  • State the conclusion of the hypothesis test in simple.

Let's understand the above thing with the help of an example.

There is a claim which says that most of the CEO’s are male

so we have taken a sample of 300 corporations 183 of the CEO’s where male. we are going to test the claim that most of the male are CEO’s with 5% significance level

So our first step is to identify the Null Hypothesis and Alternative Hypothesis

so from our claim state that more than 50% are male

so our Null hypothesis will be Ho: P=0

And Alternative Hypothesis will be H1:P>0.5

Now we will do the test statistic with the help of the sample

P by of sample = 183/300

then we will be using the Z test

let's find the value of all this by using Python

3.8105117

Our test statistic value was found to be 3.8105

Now we can go for Two types of test traditional test or p_value test to find out whether the test statistic value reject our null hypothesis or it fails to reject the null hypothesis

I will show you both the methods first let's start with the traditional method

we know that the level of significance was 5%

let's find the critical value for the 5% significance level

1.6448536269514722

here critical value will divide our normal distribution curve in Fail to reject and reject Null hypothesis

Any z test value greater than the critical value will fall in reject Null hypothesis and value less than critical value will fell in Fail to reject the Null hypothesis

so in this case our Z value is greater than the critical value so we can Reject Null Hypothesis

Now let's try to solve it by using P_Value

In this case, we will find the area under the curve at z value a then compare this with the significance value

6.933970271472134e-05

So in this case we find that P_value is very less than the significance level so we can reject the Null hypothesis

So in end with the help of critical value and P_value, we can say that we have enough evidence to reject out Null Hypothesis. So the claim that most CEO’s is True.

Type I Error

A type I error is the mistake of rejecting the null hypothesis when it is true.

The symbol α is used to represent the probability of type I error.

Type II Error

A Type II error is the mistake of failing to reject the null hypothesis when it is False.

The symbol β is used to represent the probability of Type II error.

--

--