When do you test the hypothesis

Hypothesis test - this is how it works!

Hypothesis test: In the course of your studies and perhaps beyond that, you will repeatedly ask and examine research questions. But how exactly do you decide in the end whether your hypothesis is correct or not? First of all: The statistics cannot and will not provide you with the final proof. Until then, however, the hypothesis test offers an excellent alternative.

What is a hypothesis test?

Probably everyone who works scientifically has heard of Hypotheses belongs. The Duden defines a hypothesis as a "[...] free of contradictions, but initially unproven statement, assumption (of laws or facts) as an aid for scientific knowledge". It is also considered to be one of the most important principles for scientific workthat we only assume the correctness of a hypothesis until we can falsify it. In other words, we can never prove our hypothesis, we can only refute it.

It is precisely this approach that we make use of in statistics by constructing two hypotheses.

  • H0: The so-called null hypothesis that we want to falsify
  • H1: The alternative and mostly our actual research hypothesis

Suppose we assume that the height of men and women is different. In this case the null hypothesis is: “Men and women are the same size.” Because that is exactly what we want to refute.

As already explained in the introduction, the hypothesis test helps you to decide for or against your research hypothesis (or, due to the structure, actually for or against your null hypothesis). Where is the number of possible statistical tests diverse, but basically they all follow the same principle.

Preparation for the hypothesis test

First, you work out your hypotheses. Make sure from the beginning that you can express this with the form of null and alternative hypotheses described in the last section. This will make data analysis easier for you later. That brings us to the next point: the data.

If it is a primary survey, you should of course keep in mind that your research question matches the one you have collected statistical data lets answer. You can only check whether women and men are of different sizes by performing a hypothesis test if you know the gender of your test subjects and have ascertained their height with sufficient accuracy. If you obtain your data via a secondary survey, you may have to adjust your hypotheses in order to answer them satisfactorily.

Hypothesis test and significance level

Hypothesis tests never give you 100% certainty. There is always the risk of rejecting your null hypothesis even though it is true, or of accepting it even if it is not true at all. See also Figure 1.


Fig 1: Errors 1st and 2nd type

However, we can influence the so-called type I error through the significance level. We construct our hypothesis test in such a way that the probability of committing the type 1 error does not exceed our previously defined level of significance (cf. Fahrmeier et al., 2012).

Let's go back to our example. We assume that we have drawn a sample and collected data. These result in a mean height of 166 cm for women and 179 cm for men (see Table 1).


Fig. 2: Height of men and women

Basically, in a hypothesis test, we ask ourselves the following: "How likely is it to observe a difference in height of at least 13 cm when men and women are the same size?" If the probability of this is below our level of significance, we reject H0 (and leave thus running the risk of committing the type 1 error).

Which hypothesis test is the right one?

Once you have made the preparations described in the last two sections, you can carry out a hypothesis test. Which test you should choose depends on a variety of factors such as your research question and the scale of your data.

In the case of our example, the variable we are interested in is metric. We also want to compare two groups with each other. A Gaussian or t test at. The Gauss test is based on the normal distribution and is usually only used when the population variance is known. If we have to estimate this from the data first, we use the t-test. Both tests are suitable for one-sided hypotheses (e.g .: men are taller than women) or two-sided hypotheses (men and women are different sizes).

But what if our variable is ordinally scaled, or we cannot assume a normal distribution? Then parameter-free hypothesis tests such as the Wilcoxon-Mann-Whitney test are often the solution.

If, on the other hand, you want to compare more than two groups, an ANOVA or the Kruskal-Wallis test are suitable. You can see that there is a large selection. The Method advice from the University of Zurich has therefore compiled common tests and their areas of application in an interactive graphic.

How do I interpret the hypothesis test?

In the end, of course, it is not enough just to calculate the test. You have to interpret its results correctly. While you usually determine a test statistic when you manually calculate a Gaussian or t-test in order to then compare it with the reference value, statistic programs like this give youR programor theSPSS software so-called p-values.

Accordingly, these are often given in the research literature. We have basically already discussed the importance of the p-value. It is the probability whose limit represents the level of significance. We can now generalize our statement based on our example: "With what probability do I observe data that speak at least as strongly in favor of my alternative hypothesis as the present one, if the null hypothesis actually applies?"

A “significant result” is often spoken of with a p-value of less than 0.05. This does not mean that H1 is proven. We think a 5% error rate is small enough to take the risk of rejecting H0. For several years, however, it has been argued that stricter significance levels should be applied to improve the reproducibility of study results (cf. Johnson, 2013).

The hypothesis test is an important tool for examining research questions. In order to obtain good results, their construction should already be taken into account when developing the question and collecting the data. If you are not sure, you can also go to one Statistics advice fall back, or with Statistics tuition Improve your performance in the long term.

Ultimately, the following applies: which hypothesis test is the right one for you depends on a large number of factors, but its basic principle and its interpretation remain almost identical.

literature

Fahrmeir, Ludwig / Heumann, Christian / Artists, Rita / Pigeot, Iris / Tutz, Gerhard (2012): Statistics: The way to data analysis, 7th edition Berlin.

Johnson, Valen E. (2013): Revised standards for statistical evidence, in: Proceedings of the National Academy of Sciences of the United States of America 110 (48), pp. 19313-19317.