8. Hypothesis Testing (1)
8. Hypothesis Testing (1)
By:Samrawit .F
Objectives
At this end of this session students are able to:
hospital is 5 days
Sch2o0oNloovefmbPeru2b0l1i9c Health 5
Idea of Hypothesis Testing
Sch2o0oNloovefmbPeru2b0l1i9c Health 7
Statistical hypotheses
Alternative hypothesis
H0 : 0 H0 : 0 H0 : 0
H a : 0 H a : 0 H a : 0
Reject H0
(ex: you conclude that the drug works) Type I error (α) Correct action
(Prob. = Power = 1-β)
Do not reject H0
(ex: you conclude that there is
insufficient evidence that the drug Correct action (Prob. Type II Error (β)
works)
= 1-α)
HA: μ μ0
⚫ e.g. we want to test that the population mean is different than 50
Case II : H0: μ = μ0
HA: μ > μ0
⚫ e.g. we want to test that the population mean is greater than 50
Case III : H0: μ = μ0
HA: μ< μ0
⚫ e.g. we want to test that the population mean is less than 50
x - µ0
z= Test statistic for mean
n
Test statistic for
(n – 1)s2
2 = standard deviation
Copyright © 2007 Pearson
Education, Inc Publishing
School of Public Health as Pearson Addison-
HT…
4. Test Statistic
• There are many test Statistic techniques from which three
commonly used tests are
• Z- test
• Student –t- test
• Chi-square test
• Proper test is crucial, the choice is depend on
– The type of data
– The size of the sample (large or small)
– Whether the samples are independent or related.
– Population characteristics ( distribution, unknown standard deviation)
Example,
- Z-test is used when large sample (>30), normally distributed
data, known - If sample is small (<30) with
unknown t-test will be more suitable.
- Chi-square test is used for categorical data
School of Public Health 17
HT…
Case 1: population is normal or approximately normal
σ2 is known σ2 is unknown
( n large or small)
X - o
Z
n n large n Small X - o
T
X -o s
Z n
s
n
Case 2: If population is not normally distributed and n is large
i)If σ2 is known ii) If σ2 is unknown
X - X -
Z o
Z
so
n n
Sch2o0oNloovefmbPeru2b0l1i9c Health 22
Conclusions in Hypothesis
Testing
We always test the null hypothesis. The initial
conclusion will always be one of the following:
28
Solution
1-Data: variable is age, n=10, x = 27, σ2=20,
α=0.05
2 Assumptions: the population is approximately
normally distributed with variance 20
3 Hypotheses:
• H0 : μ=30
• HA: μ ≠ 30
20
x * �
± �1−�/2 � = 27±1.96* 10 = [24.23, 29.77]
Since μ0 is out side the interval and concluded that we are 95% confident that μ is
different from 30
32
HT…
4.Test Statistic :
Z X - 27 30
• =
o
20
= -2.12
n
10
Sch2o0oNloovefmbPeru2b0l1i9c Health 34
Solution
1. Data: Variable is systolic blood pressure, n=157,
x =146, s=27, α=0.01.
2. Assumption: population is not normal, σ2 is
unknown
3. Hypotheses: H0 :μ=140
HA: μ>140
4. Test Statistic:
Z X - 146 140
• o s = 2 7 = 2.78
n 157
35
Cont’d
5. Decision Rule:
we reject H0 if Z>Z1-α
= Z0.99= 2.33
(from table D)
6. Decision: We reject H0.
Hence we may conclude that the mean systolic blood pressure for a
population of African-American is greater than 140.
• UL for μ = 146+2.33 27 = 151.02
*
157
• Therefore: we concluded the mean systolic blood pressure of
African-American is greater than 140 mmHg
• Reasons for Pairing: It frequently happens that true differences do not exist
between two populations with respect to the variable of interest, but the presence of
extraneous sources of variation may cause rejection of the null hypothesis of no
difference. On the other hand, true differences also may be masked by the presence of
extraneous factors.