Hypothesis Testing for
Continuous Variables
Yuantao Hao
19th,Otc., 2009
Chapter4
We have learned:
Basic logic of hypothesis testing
Main steps of hypothesis testing
Two kinds of errors
One-side & two-side test
One-sample t test
4.3
The t Test for Data under
Randomized Paired Design
4.3 The t Test for Data under Randomized Paired Design
Example 4.2 The weights (kg) of 12
volunteers were measured before and
after a course of treatment with a “new
drug” for losing weight. The data is given
in Table 4.1. Please evaluate the
effectiveness of this drug.
Table 4.1 The data observed in a study of weight losing
Weight (kg) No.
Pre-treatment (X1) Post-treatment (X2)
Difference
d=X1-X2
1 101 100 1
2 131 136 -5
3 131 126 5
4 143 150 -7
5 124 128 -4
6 137 126 11
7 126 116 10
8 95 105 -10
9 90 87 3
10 67 57 10
11 84 74 10
12 101 109 -8
∑ d=16
Solution:
0:0 dH
0:1 dH
05.0
58.01291.7
33.1
/
0
nS
dt
d
11112 P >0.50
4.4
The Tests for Comparing Two Means
Based on Two Groups of Data under
Completely Randomized Design
4.4 The t test for Comparing Two Means
About this design:
1. The individuals are randomly divided into two
groups which correspond to two treatments
respectively;
2. The two groups are randomly selected from
two populations respectively.
Example 4.3
Assume the red cell counts of healthy
male residents and healthy female
residents of certain city follow two
normal distributions respectively, of
which the population means are
different and population standard
deviations are equal.
There are two random samples drawn from the
two populations respectively, of which the sample
sizes, sample means and sample standard
deviations are ;
; .
It is expected to estimate the 95% confidence
interval for the difference of average red cell
counts between healthy male and female
residents.
15,20 21 nn 18.4,66.4 21 xx
45.0,47.0 21 ss
Solution I t has been known that the sample variance f or males and
f emales are: 21s =(0.47)2=0.2209,
22s =(0.45)2=0.2025.
They are f airly closed each other so that the two population variances could be regarded as equal.
2131.021520
)45.0)(115()47.0)(120( 222
cs
3321520
Given 05.0 , check up the table f or t distribution, the two-side
critical value 05.0t =2.034.
)15
1
20
1(2131.0034.2)18.466.4()
11()(
21
221
nnstxx c
16.0 and 80.0)1577.0(034.248.0
Therefore, the 95% confi dence interval f or the diff erence of average red cell counts between healthy male and f emale residents is (0.16, 0.80) (1012/ L).
Question:
Please judge whether the population means of
males and females are equal or not.
210 : H
211 : H
4.4.1 Equal Variances
2
11
21
222
2112
nn
SnSnSc
dist. ~
)11
(
)(
21
2
21 t
nnS
XXt
c
221 nn
Solution:
04.3
15/120/12131.0
18.466.4
t
3321520221 nn
P< 0.01
4.4.2 Unequal Variances
2221
21
21
// nSnS
XXt
21
2211'
ww
twtwt aaa
2222 / nSw
12
11 / nSw
Satterthwaite’s method
Example 4.4 n1=10 patients and n2=20 healthy
people are randomly selected and measured for a
biochemical index. The mean and standard
deviation of the group of patients are =5.05
and S1=3.21, and that of the group of healthy
people are =2.72 and S2=1.52.
Please judge whether the two population means
are equal or not.
1X
2X
Solution:
18.2
20/52.110/21.3
72.205.522
t
24.2
2052.1
1021.3
09.22052.1
26.21021.3
22
22
'05.0
t
P> 0.05
4.5
The F-Test for Equal Variances of
Two Groups of Data under
Completely Randomized Design
4.5 The F-Test for Equal Variances of Two Groups
22
210 : H
22
210 : H
.~/
/22
22
21
21 distFS
S
1=n1-1, 2=n2-1
.~22
21 distFS
SVR
21
12
,,
',,
1
F
F
The larger variance is always taken as the
numerator of the statistic VR for convenience.
Thus, to a two-side test, given , one may
use /2 to find the upper critical value F/2 of
the F distribution, and if the current value of
VR is greater than or equal to F/2 , then P≤
, otherwise, P > ;
Returning to Example 4.3, where
VR=1.09 , 1=19 , 2=14. Let =0.10 ,
the two-side critical value of F
distribution is F0.10/2=F0.05=2.40. Since VR
< F0.05, not reject , hence the there is
no enough evidence to say that the two
population variances are not equal.
0H
4.6.1
The Z-test for the population probability
of binomial distribution (large n)
4.6.1 The Z-test for the population probability
),(~ nBX
))1(,(~ nnNX
))1(
,(~n
Nn
XP
n5
n(1-)5
4.6.1.1 One sample
Example 4.7 150 physicians being
randomly selected from the departments
of infectious diseases in a city had
received a serological test. As a result, 35
out of 150 were positive(23%). It was
known that the positive rate in the
general population of the city was 17%.
Please judge whether the positive rate
among the physicians working for the
departments of infectious diseases was
higher than that in the general
population.
Solution:
17.0:0 H
17.0:1 H
)150
)17.01(17.0,17.0(~
NP
06.2
150/17.0117.0
17.0150/35
Z
02.0P
4.6.1.2 Two samples
Example 4.8 To evaluate the effect of
the routine therapy incorporating with
psychological therapy, the patients with
the same disease in a hospital were
randomly divided into two groups
receiving routine therapy and routine
plus psychological therapy respectively.
After a period of treatment, evaluating
with the same criterion, 48 out of 80
patients (60%) in the group with routine
therapy were effective, while 55 out of 75
(73%) in other group were effective.
Please judge whether the probability of
effective were different in terms of
population.
Solution:
210 : H
211 : H
))1(
,(~1
1111 n
NP )
)1(,(~
2
2222 n
NP
))1()1(
,0(~2
22
1
1121 nnNPP
155
103
7580
5548
21
22110
nn
PnPnP
))75
1
80
1)(
155
1031(
155
103,0(~21 NPP
75
1
80
1
155
1031
155
10321 PP
Z
76.1
751
801
155103
1155103
7555
8048
Z
P=0.08
4.6.2
The Z-test for the population mean of
Poisson distribution (largeλ)
4.6.2 The Z-test for the population mean of Poisson distribution (largeλ)
),(~ NX
4.6.2.1 Single observation
Example 4.9 The quality control
criterion of an instrument specifies that
the population mean of radioactivity
recorded in a fixed period should not be
higher than 50. Now a monitoring test
results in a record of 58. Please judge
whether this instrument is qualified in
terms of the population mean.
Solution:
50:0 H
50:1 H
)50,50(~ NX
13.150
5058
Z
P = 0.13
4.6.2.2 Two observations
Example 4.10 The radioactivity of two
specimens was measured for 1 minute
independently, resulting in X1=150 and
X2=120 respectively. Please judge
whether the two corresponding
population means in 1 minute are equal
or not.
210 : H
Solution:
211 : H
),(~1 NX ),(~2 NX
)2,0(~21 NXX
)1,0(~21
21 NXX
XXZ
83.1120150
120150
Z
4.6.2.3 Two “groups” of observations
Example 4.11 The radioactivity of two
specimens was independently measured
for 10 minutes and 15 minutes
respectively, resulting in X1=1500 and
X2=1800.
Please judge whether the two
corresponding population means in 1
minute are equal or not.
Solution:
),(~ 111 NX ),(~ 222 NX
),(~1
111 n
NX ),(~
2
222 n
NX
),(~2
2
1
12121 nn
NXX
2
2
1
1
21
nX
nX
XXZ
26.6
1512010150
120150
Z
THE END
THANKS!
Top Related