Let’s Talk statistics: Hypothesis Testing Cheatsheet #2

Raffa Nimir
3 min readMar 6, 2022

--

Last week I have posted about how to think, and the steps to take when conducting a hypothesis test. If you have missed last week post review it here.

A quick review is that when we are conducting a hypothesis test, we have a parameter in question and we want to verify whether the parameter value is true (Null Hypothesis), or otherwise the parameter takes another value (alternative Hypothesis).

There are 2 ways to test the claim, one using the test statistics. When doing so the general rule is that:

  1. A z test is used when the population variance is known.
  2. A t-test is used when the population variance is unknown but the sample variance is known.

Last week we explained how we conduct the test using the test statistics.

This week I will discuss the second method usually used to conduct a hypothesis test.

Method 2: The p-value.

The p-value is the second method that is often used when conducting hypothesis tests. The p-value is the probability related to the test statistics so if you can imagine this on a bell curve a test statistic will lie on the x-axes and the p-value is the correlated probability.

To solve the hypothesis test using the p-value method follow the following steps:

  1. Determine your significance value( which is usually given in the problem).
  2. Sketch the normal distribution curve and determine where the critical values lie in the plot. [(alpha, (1-alpha) — one-tailed test][(alpha/2, (1-alpha/2) — two-tailed test)].
  3. Rationally understand where are your reject and non-reject regions are, and have them clearly dashed and identifiable in your plot.
  4. Calculate your test statistics whether it's Z or T.
https://medium.com/@rafaanimir/lets-talk-statistics-hypothesis-testing-cheatsheet-1-5115d4f89e8c

where x bar = sample average

M = Population mean

Sigma = standard deviation

n = sample size

When the population variance is unknown we use a The T value following this formula :

6. After computing these Z or T values, get the probability for them. Using Excel functions Norm.S.Dist in case of Z test statistic or T.Dist in terms of the T statistic.

7. Plot the value obtained in the sketch, determine whether or not it falls in your critical regions. (Alpha regions)

8. Decide on whether to Reject or fail to Reject based on where your P-value lies at the plot rejection and nonrejection regions.

Image source: https://www.researchgate.net/figure/Rejection-and-non-rejection-regions-of-the-null-hypothesis_fig1_333914148

An important aspect to notify is that when the critical region for the p-value is not pre-determined in your problem, there is a general rule of thumb to believe that it is 0.05. So solved with this conception.

So that’s it for today’s blog post. If you found this blog post helpful, show some support by clapping, following, or commenting. I will be back with more on statistics and Data Science topics.

--

--

Raffa Nimir
Raffa Nimir

Written by Raffa Nimir

Data-driven pro with engineering & marketing background. skilled in statistical modeling, ML, R & Python. GW Master of Data Analytics holder. @Raffa Nimir

No responses yet