 # Statistical hypothesis testing – Inferential statistics I.

## Presentation on theme: "Statistical hypothesis testing – Inferential statistics I."— Presentation transcript:

Statistical hypothesis testing – Inferential statistics I.

What is hypothesis testing?
Hypothesis: a theoretical statement concerning a certain feature of the studied statistical population. We want to know if our hypotheses are true or not by doing research. Hypothesis testing (or significance test): a procedure of assessing whether sample data is consistent with statements (hypotheses) made about the statistical population. Briefly, we make a decision about the hypothesis on the basis of our sample data. We want to get answers to questions starting typically like these: „Is there a difference between…” „Is there a relationship between…”

Types of hypotheses: Test statistic:
There are two kinds of hypothesis: H1: the statement we actually want to test; usually postulates a non-zero difference or relationship (called ‘alternative hypothesis’) E.g: „The mean weight of males and females are different.” H0: a statement which usually claims a zero difference or relationship against the H (called ‘null hypothesis’) E.g: „The mean weight of males and females are not different.” Test statistic: It is a numerical value calculated from our sample which forms a link between our sample and the null hypothesis.

Null distribution: p-value:
The probability distribution of a test statistic when the null hypothesis is true. Null distribution of the test statistic is known by e.g. statistical computer programs. p-value: This is a probability indicating how likely to get a sample with such a test statistic like ours or with a more extreme one provided that the H0 is true. p-value comes from the null distribution by contrasting the value of our test statistic with the null distribution. The smaller the p-value the more unlikely the null hypothesis is true.

Significance level (α alpha):
It is an arbitrarily and a priori declared probability threshold. If the p-value of the hypothesis test is less than or equals to alpha, then it is agreed that the null hypothesis will be rejected. The value of alpha in the most biological research is 0.05.

Principle of hypothesis testing:
We have a link between the sample and the null hypothesis, this is the test statistic. We know the probability distribution of the test statistic when the null hypothesis is true. Contrasting our test statistic with the null distribution we will get a probability showing how typical this value of the test statistic of the null distribution. If the probability we got is less than a threshold declared in advance, we will reject the null hypothesis and accept the alternative hypothesis, otherwise we accept the null hypothesis.

Errors in hypothesis testing
Type I error: we reject H0 although that is true. Denoted by α. Occurs only when H0 is true. Pr(type I error) = p-value Type II error: we accept H0, although that is false. Denoted by β. Occurs only when H0 is false.

One- and two-tailed tests (or One- and two-sided tests)
Two-tailed tests: a test in which H0 can be rejected by large deviations from expected in either direction. E.g: H0: the two population means are equal: μ1 = μ2 This can be rejected if either population has a greater mean than the other. One-tailed test: a test in which H0 is tested in a more specific way, it can be rejected by deviation only in one direction. E.g: H0: the mean of population 1 is greater or equal to the mean of population 2: μ1 >= μ2 It would be rejected only if the mean of population 1 was significantly less than that of population 2.

Steps of hypothesis testing
Formulate the hypotheses of the test (H0 and H1). Collect data (i.e. take a random sample). Declare your significance level (alpha). Compute your test statistic and p-value. Make a decision on the H0.

Assumptions of statistical tests
Most of the statistical tests have clear assumptions on the data. If these assumptions are not met the test can not be done, because it will give an incorrect result. In this case you have to try an other test that is appropriate for your study design. To get detailed knowledge on the concrete assumptions of the a certain test, consult a statistical text book.