Sie sind auf Seite 1von 19

Hypothesis Testing :

Two Related Means

Comparing Two Related Means

Before-after study :
blood pressure of a patient before/after intake of a drug
performance of staff before/after receiving training
Name

Before

After

A
B
C
D
E
F

210
185
215
198
187
225

196
192
204
193
181
233

Comparing Two Related Means

Repeated measure study :


blood pressure of a patient measured several times in a day
Name
A
B
C
D
:
Y
Z

Blood
Blood
Pressure (am) Pressure (pm)
135
136
121
121
:
116
117

126
129
124
119
:
123
120

Comparing Two Related Means

Experiment with natural pairing :


comparing the heights of husband and wife
comparing the IQ of twins
Pair

Husband

Wife

1
2
3
4
5
6

2.1
1.8
1.5
1.6
1.8
1.7

1.9
1.9
1.4
1.3
1.8
2.3

Notations & Assumptions


Pair

1st sample

2nd sample

Difference

1
2
:
n

X11
X12
:
X1n

X21
X22
:
X2n

D1 = X11 X21
D2 = X12 X22
:
Dn = X1n X2n

The two random samples come from normal populations

The differences form a random sample from a


normal population with mean D and variance

D2

Comparing Two Related Means

Hypotheses :

H0: D

H1: D< (lower-tail test)

H0: D

H1: D > (upper-tail test)

H0: D =

H1: D (two-tail test)

D is estimated by D where
n

D (X
i1

i1

1i

X 2i )

X1 X 2

Paired Z Test

Used when :

populations normal

D known

Test statistic :

D
Z
D n

Paired t Test

Used when :

populations normal

D unknown

Test statistic :

D
t
SD
n

where

SD

which has a t distribution with (n-1) df

2
(
D

D
)
i
i 1

n 1

Paired t Test : Example


Is the new computer system faster at the 0.05 level ? You collect
the processing times of 10 jobs, assumed coming from normal
populations :
User Old System (1)
C.B.
9.98 s
T.F.
9.88
M.H.
9.84
R.K.
9.99
M.O.
9.94
D.S.
9.84
S.S.
9.86
C.T.
10.12
K.T.
9.90
S.Z.
9.91

New System (2)


9.88 s
9.86
9.75
9.80
9.87
9.84
9.87
9.98
9.83
9.86

Difference
0.10
0.02
0.09
0.19
0.07
0.00
- 0.01
0.14
0.07
0.05

Paired t Test : Example

(continued)

Step 1: Define hypotheses

H 0 : D 0

(new system is not faster)

H1 : D > 0

(new system is faster)

Paired t Test : Example


(continued)

Step 2: Determine the rejection region

- Significance level is 0.05


- Critical Value: t , n 1 t0.05, 10-1 1.8331
- Reject H0 if t 1.8331
Rejection
Region

t0.05,101 1.8331

Paired t Test : Example


(continued)

Step 3: Compute test statistic


D

SD

0.072

D D
i

n 1

0.06215

Test Statistic

D0
0.072 0
t

3.66
S D n 0.06215 10

Paired t Test : Example

Step 4: Make decision

(continued)

Since t = 3.66 is in
the rejection region,
we reject the null
hypothesis.
There is sufficient
evidence that the
new system is faster
than the existing
system

Rejection
region

-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5

0.5

1.5

2.5

t0.05,101 1.8331

3.5

t 3.66

Test Statistic 3.66 is in the Rejection Region

Paired t Test Using EXCEL

Paired t Test Using EXCEL

Paired t Test Using SPSS

Paired t Test Using SPSS

Paired t Test Using SPSS

Relation Between S D , S1 , S2 and

2
(
D

D
)
S D2 i
n 1
i 1
n

(( X 1i X 1 ) ( X 2i X 2 )) 2
=
n 1
i 1
n

n
( X 1i X 1 ) 2 n ( X 2i X 2 ) 2
( X 1i X 1 )( X 2i X 2 )

2
n 1
n 1
n 1
i 1
i 1
i 1
n

S12 S 22 2 S12
S12 S 22 2rS1S 2

Das könnte Ihnen auch gefallen