You are on page 1of 10

Hypothesis Testing

Helda Khusun

Acknowledgement: Part of the slides are


taken from lecture given by dr. Iwan Ariawan
Concept
 Statistical test is conducted to determine the
observed difference/relation in sample is a real
difference/relation in population or occured by
chance only (due to sampling process)
 Result of statistical test: “probability to get the
observed result as seen in the sample or more
extreme if (in reality) there is no
difference/relation in the population”
 The statement “no difference/relation in
population” is known as null hypothesis
Concept
 Statistical test is conducted to determine the
observed difference/relation in sample is a real
difference/relation in population or occured by
chance only (due to sampling process)
 Result of statistical test: “probability to get the
observed result as seen in the sample or more
extreme if (in reality) there is no
difference/relation in the population”
 The statement “no difference/relation in
population” is known as null hypothesis
Concept
 Statistical tests will show probability (p value) that
the result we see in sample is in line with null
hypothesis
 If p is large then result is in line with null
hypothesis, or we say the null hypothesis is
accepted
 On the other hand, if p is small then result is not
in line with null hypothesis or null hypothesis is
rejected
 We use a as the threshold for determining p value
is small or large
Concept
 If we reject H0
 There is a possibility of type 1 error (a), we incorrectly
concluded that there is a difference/relation in population (as
observed in sample) but actually there is no
difference/relation in population
 If we accept H0:
 There is a possibility of type 2 error (b), we incorrectly
concluded that there is no difference/relation in population (as
observed in sample) but actually there is difference/relation in
population
 Difference/Relation (or stated as statitically significant) as
concluded from statistical test IS NOT automatically means
real substancial difference/relation
 Small differences/weak relation could be statistically
significant in large sample
The a and b
Statistical Testing Procedure

Step 1: State null and alternate hypotheses

Step 2: Select a level of significance

Step 3: Identify the test statistic

Step 4: Formulate a decision rule

Step 5: Take a sample, arrive at a decision

Do not reject null Reject null and accept alternate


Choice of test statistics
 Choice of test statistics depend on:
 type of exposure/independent and
outcome/dependent variables
(categorical/continous)
 data distribution (normal/not normal)
 the need to adjust for confounder (simple/multi
variate analysis)
Simple Analysis
Dependent/Outcome Variable

Categorical Continuous
Independent/exposure variables

Categorical Chi-square test, Fisher's t-test (2 exposure


exact test categories)
Anova test (>2 exposure
categories)
Continuous logistic regression correlation
linear regression
If continuous data not
normally distributed
Shift to non-parametric test
1). Independent t-test  Mann-Whitney
(2). Paired t-test  Wilcoxon
(3). Pearson correlation Spearman Corr.
(4). ANOVA  Kruskal-Wallis

You might also like