Statistics 101: Hypothesis Testing

Comments · 115 Views

Best Data science course in Delhi at budget-friendly prices at Skillslash. Enrol in our data science course with placement support.

 

Hypothesis testing is a method used in Inferential Statistics to observe a small section of the population called a sample, in order to draw insights that can tell us about the population at large. Hypothesis testing forms the very foundation of statistical analysis, to the point where the main purpose of learning statistics is so that we can perform hypothesis testing. Take for example, your friend suggests a great place to order. Now if there is some basis to why he or she said that, which can be used to identify other great restaurants, then and only then would it be useful. If not, we would probably just be “tasting” by fluke.

 

So, what is a hypothesis?

Put simply, it is a calculated guess about something in the world around us based on an inference or insight drawn from an observation. Ofcourse, this should be proven and thus, we perform hypothesis testing which we’ll soon learn more about. For now, let’s take a look at what hypothesis looks like:

 

  1. Whether a drug would qualify as a corona virus vaccine.
  2. Likelihood of discovering gold or lithium in a certain location.
  3. Recovering with quality drugs can prevent fatigue in football players before the next match.
  4. Increasing the level of hatha yoga practice leads to higher levels of psychological well being.

Two types of hypothesis tests: z-test and t-test

In order to prove a statement or test out hypothesis broadly, let’s now see the two main types of tests. These are called the z-tests and t-tests. More often than not, practical purposes use t-tests because they use a sample’s standard deviation instead of z-tests which use a population’s sample deviation. While it is ironic for us to perform tests if we already know about the population at large, z-tests are easier to understand before moving on to t-tests since they can help relate to concepts such as normal distribution as well. This is because z-tests work best when the sample size is generally more than 30, unlike t-tests which give the same result more or less as the sample size goes on increasing.

 

Now before we get into the depths of performing statistics, we have to choose the test required for our hypothesis. In order to do so, we collect data and look at the samples. For z-test, we can further choose to perform between one sample z-test or two sample z-test. A one sample z-test is performed when we have to analyse one group with a given population mean whereas a two sample z-test is performed when we are comparing the means of two different sample groups. Both these types of tests fall under the t-tests as well, however, we can also conduct a paired two sample t-test where both groups can be analysed basis of different time of occurrence.

 

Examples: We perform one sample z-test to find out whether the students of a certain school are performing better than the entire population of students of other schools.

However, we perform a two sample z-test to find out whether the students of a certain school are performing better than the students of other schools.

 

Now for a paired t-test, we can find out whether the students of a certain school are performing better than the students who graduated 5 years ago.

Null hypothesis and alternate hypothesis

Now before we start performing analysis, it is important to state the null and alternate hypotheses so that we can round off our findings with a conclusion. A null hypothesis is generally accepted for its factual consistency, something we can validate or reject based on our findings. Let’s say - the average score of students appearing for the whole exam is x. A null hypothesis, denoted by H0, can be set as this average score for comparison with the sample of students appearing in the exams now. For this, our hypothesis that this batch of students is better than ever before stands true if an alternate hypothesis is better than the null hypothesis. An alternate hypothesis, denoted by H1, can now be more or less than the mean values set in the null hypothesis. If the result is true, null hypothesis is rejected and our findings can be corroborated with evidence. Now, let’s sum up the hypothesis testing with 5 simple steps that we use to perform experiments using observations.

5 steps of performing hypothesis testing

  1. State the null and alternate hypothesis
  2. Collect data samples
  3. Choose which test to perform
  4. Decide whether to reject or accept your null hypothesis
  5. Present your findings

Conclusion:

With hypothesis testing, you can now increase the likelihood that the restaurant you choose over your next date or family dinner is going to be worth it! You can confidently set up a good time and space.. Because of hypothesis testing! How? Simple. Collect data samples about restaurants and cross check with general user reviews, or compare maybe a chinese restaurant with other restaurants offering a similar menu to your liking. This is how apps use data to provide suggestions, however, hypothesis testing can be used across a diverse range of industries.

 

If you’re interested in learning more about hypothesis testing, statistics or everything under the sun called Data Science, we highly recommend that you speak to one of our counselors. Why we make a strong recommendation is because after enrolling for a course at Skillslash, you also get certified real work experience at top MNCs upon completion. This makes it easy to get a high salary job, so contact us at www.skillslash.com and secure your future today!

Comments