You are on page 1of 68

1

(Nonparametric Statistics)


()

(Parametric
Statistics)

1.

2. Interval Ratio

(Nominal)

(Power of test)

(The Mann-Whitney U Test)

t-test

2
2

Wilcoxon

(Ordinal Scale)

H0 : 2

()

H1 : 2

()

A clinical trial is conducted at the gynecology unit of a major hospital to determine the
effectiveness of drug A in preventing premature birth. In the trial 32 pregnant women are
to be studied, 16 assigned to a treatment group that will receive drug A and 16 assigned to a
control group that will receive a placebo. The patients are to take a fixed dose of each drug
on a one-time-only basis between the 24th and 28th weeks of pregnancy.
The patients are assigned to groups using a random number table, whereby for every 2
patients eligible for the study, one is assigned randomly to the treatment group and the
other to the control group. ( =.05)
Suppose the weights of the babies are those given in Table
Treatment group Baby weight (lb)
Receive drug A
6.9 7.6 7.3 7.6 6.8 7.2 8.0
5.5 5.8 7.3 8.2 6.9 6.8 5.7
8.6 7.9

Control group baby weight (lb)


6.4 6.7 5.4 8.2 5.3 6.6 5.8
5.7 6.2 7.1 7.0 6.9 5.6 4.2
6.8 5.7

SPSS
ttest2i
Analyze

Nonparametric Tests

2 Independent Samples

Dialog Two-

Independent-Samples Tests

2
3


Test
Variable List:


Grouping Variable

Define Groups

Dialog
2 Group 1:
Group 2:

Continue

Dialog

Test Type

Mann-Whitney U

OK

( SPSS)

NPar Tests
Drug A
Mann-Whitney Test
Control
Ranks

WEIGHT

DRUG
Drug A
Control
Total

N
16
16
32

Mean Rank Sum of Ranks


20.94
335.00
12.06
193.00


b
Test Statistics

WEIGHT
Mann-Whitney U
57.000
Wilcoxon W
193.000
Z
-2.680
Asymp. Sig. (2-tailed)
.007
a
Exact Sig.
.007
[2*(1-tailed Sig.)]

a. Not corrected for ties.

b. Grouping
Variable: DRUG

2-tailed Asymp.Sig.

1-tailed Exact Sig./2

H0 :
A
H1 :
A

1-tailed Exact Sig./2 .007/2

= .0035 (.05)
H0
.05
A

Scores on a perceived maternal


competence scale for two groups of mothers
Scores Regular-Discharge EarlyDischarge ( .05)

Scores on a perceived maternal competence scale for two


groups of mothers

Regular-Discharge Mothers
20
14

Early-Discharge Mothers

30

27

25

20

24

23

17

22

18

32

17

18

28

29

26

16

13

21

perceive
Mann-Whitney Test
Ranks
MOTHER
SCORE Regular
Early
Total

N
10
10
20

Mean Rank Sum of Ranks


13.65
136.50
7.35
73.50

b
Test Statistics

SCORE
Mann-Whitney U
18.500
Wilcoxon W
73.500
Z
-2.384
Asymp. Sig. (2-tailed)
.017
a
Exact Sig.
.015
[2*(1-tailed Sig.)]
a. Not corrected for ties.
b. Grouping Variable: MOTHER

10

H0 : Score Regular-discharge Early-discharge

H1 : Score Regular-discharge Earlydischarge

( Exact Sig.)

Sig. = .015/2 = .05 H0


.05 Score Regular-discharge
Early-discharge

11

(The Wilcoxon Matched Pairs Signed-Ranks Test)

Sign test

Paired t-test

- (Ordinal Scale)

- 2

H0 : (
H1 : ( )

12

10 11 12

86 71 77 68 91 72 77 91 70 71 88 87
88 77 76 64 96 72 65 90 65 80 81 72

12

13

SPSS
twin
Analyze

Nonparametric Tests

2 Related Samples

Dialog Two-

Related-Samples Tests

Test

Pairs(s) List:

Test Type

Wilcoxon

OK

14

( SPSS)
Ranks
N
TWIN_AFT - TWIN_BEF Negative Ranks
Positive Ranks
Ties
Total

7a
4b
1c
12

Mean
Rank
5.93
6.13

Sum of
Ranks
41.50
24.50

a. TWIN_AFT < TWIN_BEF


b. TWIN_AFT > TWIN_BEF
c. TWIN_BEF = TWIN_AFT

Test Statisticsb
TWIN_AFT
TWIN_BEF
Z
-.756a
Asymp. Sig. (2-tailed)
.449
a. Based on positive ranks.
b. Wilcoxon Signed Ranks Test

H0 :

H1 :

Sig .449 .

449/2 = .2245 = .05


15

- (The Kruskal-Wallis Test)

Mann-Whitney U
3 (k )

k k


The Kruskal-Wallis One-Way ANOVA Test
Kruskal-Wallis H Test

1.
2.

3.
(Ordinal scale)

H0 : k (
k )

H1 : k (
2 )

The researcher was interested in the effect of advanced practice nurses (APNs) on the
functional status of elderly people. He randomly assign clients to a control group, where they receive
usual care from their providers; an experimental group where they recieve monthly telephone calls
from an APN, whom they can call at other times; or to a second experimental group, where they are
visited monthly by an APN, who is also available to them by telephone. The question is whether the

16

groups score differently on the functional status measure; a higher score indicates better function
status. If the groups differ in their scores, the question is, Which groups are different from which
other groups?
Table : Scores on Functional Status Across Groups
APN Visits and
Control
APN Telephone
Telephone
1
7
5
3
4
8
2
2
6
2
3
9
3
9
7
5
4
9
7
4
10
4
8
8
2
6
7
1
5
10

17

SPSS
function
Analyze

Nonparametric Tests

K Independent Samples

Dialog Tests for

Several Indendent Samples

Test
Variable List:

Grouping Variable:

Define Range

Dialog

Minimum:
Maximum:

Continue

Dialog

18

Test Type

Kruskal-Wallis H

OK

19

( SPSS)
Kruskal-Wallis Test

Ranks
GROUP
SCORE Control
APN Tel
APN Visit & Tel
Total

N
10
10
10
30

Mean Rank
7.95
15.10
23.45

a,b
Test Statistics

Chi-Square
df
Asymp. Sig.

SCORE
15.702
2
.000

a. Kruskal Wallis Test


b. Grouping Variable: GROUP

H0 : Functional Status Score 3


H1 : 2 Functional Status Score

15.702 Sig. .000 =

.05 H0
.05 2 Functional Status
Score

20

- 2

i j
= Ri R j

var =

2 , k 1

var

N ( N +1) 1
1
+

12
nj

ni

2 Functional Status Score


ni var
var =

2 , k 1

N ( N +1) 1
1 30 (31) 1
1
+ = 15 .5
+
=

12
n
n
12
10
10

i
j

var = 5.99 15 .5 = 9.636

Control APN-Tel
= Ri R j = 7.95 15 .1 =7.15

Control APN-Tel&Visit

= Ri R j = 7.95 23 .45 =15 .5 ***

APN-Tel APN-Tel&Visit
= Ri R j = 15 .1 23 .45 =8.35

Control APN-Tel&Visit
2 , k 1

var

(9.636)

= Ri R j

21

Functional Status Score Control


APN-Tel&Visit

22

(The Friedman Test)

(Randomized block design : RBD)


The Friedman Two-way ANOVA by Ranks
The Friedman Two-way ANOVA

( > 2 )

1.
2. (Ordinal scale)
k

(Matched)

k

H0 : k

( k )

H1 : k

( 2 )

23

Suppose that we wanted to compare three interventions for preterm infants, with regard to
effects on the infant's heart rates: (1) nonnutritive sucking, (2) nonnutritive sucking plus rocking, or
(3) rocking alone. The 12 infants participating in the study are randomly assigned to six different
orderings of the three treatments. Heart rate measurements are taken on all 12 infants following each
condition.
Subject
Condition 1
Condition 2
Condition 3
Nonnutritive Sucking
Nonnutritive Sucking
Rocking
Plus Rocking
1
152
155
170
2
132
135
140
3
175
180
202
4
165
170
183
5
143
149
152
6
160
171
188
7
150
148
161
8
157
162
176
9
138
143
152
10
171
176
191
11
148
151
157
12
145
144
168

SPSS
heartrate
Analyze

Nonparametric Tests

K Related Samples

Dialog Tests for

Several Related Samples


Test
Variables:

24

Test Type

Friedman

OK

( SPSS)
Friedman Test
a
Test Statistics

Ranks
SUCKING
SR
ROCKING

Mean Rank
1.17
1.83
3.00

N
Chi-Square
df
Asymp. Sig.

12
20.667
2
.000

a. Friedman Test

H0 : 3 Conditions heart rates

H1 : 2 Conditions heart rates


r2 20.667 Sig. .000

= .05

H0

.05 2 heart rates

25

i j

,k
1

var

=
var

k ( k +1) 2

12
n

2 heart rates

=
var
2

, k 1

k (k +1) 2 3( 4) 2 1
=
= = 0.167
12
12 12 6
n

var = 5.99

0.167 =1.000

Mean Rank Condition 1 = 1.17


Mean Rank Condition 2 = 1.83
Mean Rank Condition 3 = 3.00
Condition 1 2
=1.17 1.83 =0.66

1.000

Condition 1 3
=1.17 3.00 =1.83

1.000

Condition 1 3
Condition 2 3

26

= 1.83 3.00 =1.17

1.000
Condition 2 3

Heart rate Condition 1


3 Condition 2 3 Condition 1 2

27

(Chi-square test)

( ) (S )

2 = Z2 =

( X )2
2


(

Interval Ratio)
2 =

(n 1) S 2
2


(
: Observed frequency) (Expected frequency)

1
( )


(Goodness of fit test)

28

(Test for independence)


(Test for homogeneity)
(Test of Concordance)


(Test for independence)

29

2 2
2


r X c

(Contingency table)

- 2
2

2
r X c

H0 : Oij = Eij

H1 : Oij Eij

30

H0 :
H1 :

=
2

(O

ij

df = (r-1)(c-1)

E ij

i =1 j =1

Eij )

Oij i

j
Eij

i j

Ei =

ni. n. j
N

N
ni. i
n.j j

31

H0
2
,(r-1)(c-1)

,(r-1)(c-1)

32

62

48

73

42

H0 :

H1 :

= .05

.05,1

= 3.84

3.84

62

110 135
= 66
225

48

110 90
= 44
225

110

73

42

115

115 135
= 69
225

115 90
= 46
225

=
2

(O

ij

i =1 j =1

Eij )
Eij

33

135
2

90

225

(62 66) 2 (48 44) 2 (73 69) 2 (42 46) 2


+
+
+
66
44
69
46

16 16 16 16
+
+
+
= 1.186
66 44 69 46

= 1.186

2
.05,1

= 3.84)

34

SPSS
anxiety
Analyze

Descriptive

Statistics - Crosstabs

Dialog

Crosstabs

gender

Row(s):

anxiety
Column(s):

Statistics
3

Chi-square

Continue

Dialog Crosstabs

Dialog Crosstabs :
Statistics

35

Cells

Dialog Crosstabs : Cells

Observed Expected
Counts

Continue
Dialog Crosstabs

OK

36

( SPSS)
Crosstabs
GENDER * ANXIETY Crosstabulation

GENDER Male

Total

Count
Expected Count
Female Count
Expected Count
Count
Expected Count

ANXIETY
High
Low
62
48
66.0
44.0
73
42
69.0
46.0
135
90
135.0
90.0

Total
110
110.0
115
115.0
225
225.0

Chi-Square Tests
Value
Pearson Chi-Square
1.186b
a
Continuity Correction
.908
Likelihood Ratio
1.186
Fisher's Exact Test
Linear-by-Linear
1.181
Association
N of Valid Cases
225

df
1
1
1
1

Asymp. Sig. Exact Sig. Exact Sig.


(2-sided)
(2-sided) (1-sided)
.276
.341
.276
.281
.170
.277

a. Computed only for a 2x2 table


b. 0 cells (.0%) have expected count less than 5. The minimum expected count is
44.00.

H0 :

H1 :

= 1.186 Sig. .276 >


= .05

37

38

1.
4 5

2. 5 20%


5 20%
5

( )

3. (df) 1
Yate
1

Oij Eij
r
c
2
2 =
Eij
i =1 j =1

N AD BC
2

2 =
( A + B)( C + D)( A + C )( B + D)

A,B,C,D 2X2

(A+B)

(C+D)

(A+C)

(B+D)


4. 2X2
5

20% Fisher Exact Probability Test (


)

39

40

Fisher Exact Probability Test

2X2

II

A, B, C, D

H0 : 2 I

II

H1 : 2 I

II

P=

( A + B )! (C + D )! ( A + C )! ( B + D )!
N ! A! B!C! D!

H0 P

11

41

H0 :

H1 :

Fisher Exact Probability test


= .05

P=

( A + B )! (C + D )! ( A + C )! ( B + D )! ( 4 +11)! (7 + 3)! ( 4 + 7)! (11 + 3)!


=
N ! A! B!C! D!
25!4!11!7!3!

= 0.037

P = 0.037 = .05

.05

42

SPSS
anxiety2
Analyze

Descriptive

Statistics - Crosstabs

Chi-square

2X2 SPSS
Fishers Exact

( SPSS)
GENDER * ANXIETY Crosstabulation
ANXIETY
High
Low
4
11
6.6
8.4
7
3
4.4
5.6
11
14
11.0
14.0

GENDER Male

Total

Count
Expected Count
Female Count
Expected Count
Count
Expected Count

Total
15
15.0
10
10.0
25
25.0

Chi-Square Tests
Value
Pearson Chi-Square
4.573 b
a
Continuity Correction
2.983
Likelihood Ratio
4.682
Fisher's Exact Test
Linear-by-Linear
4.390
Association
N of Valid Cases
25

df
1
1
1
1

Asymp. Sig. Exact Sig. Exact Sig.


(2-sided)
(2-sided) (1-sided)
.032
.084
.030
.049
.042
.036

a. Computed only for a 2x2 table


b. 1 cells (25.0%) have expected count less than 5. The minimum expected count
is 4.40.

43

H0 :

H1 :

P = 0.049 = .05
.05

44

(The McNemar Test for The Significnce of Change)

(change)

() 2

( )
(before and after)
2



2X2

2X2

A +
()

B + +

()

C - -

()

D - + (

45

- (Norminal Scale)

- 2

2X2

H0 : PA = PD (= )

H1 : PA PD ( )

=
2

( A D

1)

A +D

A D A

H0
2
,1

(df=1)

n (n=A+D) (A+D)/2 5
Binomial test ( )

46

100

43

31

12

( = .05)

H0 : P A = P D
H1 : P A P D

McNemar

= .05

.05,1

= 3.84

3.84

2 X 2

14

43

12

31

=
2

(A D

47

1)

A +D

( 14 31

1)

14 + 31

256
= 5 . 689
45

(5.689)

(3.84)

.05,1

.05

48

SPSS
train
Analyze

Nonparametric Tests

2 Related Samples

Dialog Two-

Related-Samples Tests

Test

Pairs(s) List:

Test Type

McNemar

OK
( SPSS)

49

Test Statisticsb

BEFORE & AFTER


N
Chi-Squarea
Asymp. Sig.

AFTER
BEFORE
0
1

1
12
14

31
43

BEFORE
& AFTER
100
5.689
.017

a. Continuity Corrected
b. McNemar Test

H0 :

H1 :

5.689 Sig. .017

(.05) H0

.05

50

(Contingency table)
2 (
)


2 2

H0 : (
H1 :

=
2

i =1 j =1

(O

ij

Eij )

df = (r-1)(c-1)

E ij

H0
2
,(r-1)(c-1)

2
2

51

62

48

73

42

52

H0 :

H1 :

= .05

.05,1

= 3.84

3.84

62

110 135
= 66
225

48

110 90
= 44
225

110

73

115 135
= 69
225

42

115 90
= 46
225

115

135

90

225

=
2

(O

ij

i =1 j =1

Eij )
Eij

(62 66) 2 (48 44) 2 (73 69) 2 (42 46) 2


=
+
+
+
66
44
69
46

16 16 16 16
+
+
+
= 1.186
66 44 69 46

= 1.186

2
.05,1

= 3.84)

*** SPSS
2 2
***

53

54

( SPSS)
GENDER * ANXIETY Crosstabulation

GENDER Male

Count
Expected Count
Female Count
Expected Count
Count
Expected Count

Total

ANXIETY
High
Low
62
48
66.0
44.0
73
42
69.0
46.0
135
90
135.0
90.0

Total
110
110.0
115
115.0
225
225.0

Chi-Square Tests
Value
Pearson Chi-Square
1.186b
a
Continuity Correction
.908
Likelihood Ratio
1.186
Fisher's Exact Test
Linear-by-Linear
1.181
Association
N of Valid Cases
225

df
1
1
1
1

Asymp. Sig. Exact Sig. Exact Sig.


(2-sided)
(2-sided) (1-sided)
.276
.341
.276
.281
.170
.277

a. Computed only for a 2x2 table


b. 0 cells (.0%) have expected count less than 5. The minimum expected count is
44.00.

H0 :

H1 :
2

= 1.186 Sig. .276 >


= .05

55

200

18

165

27

44

105

11

150

220

.01

56

( SPSS)
(STAY)
(DRUG)

(Count)
(Expected Count)

STAY * DRUG Crosstabulation


DRUG
Yes
STAY

Count
Expected
Count
Expected
Count
Expected
Count
Expected

2
3
Total

Count
Count
Count
Count

No
165
108.8
44
42.2
11
69.0
220
220.0

18
74.2
27
28.8
105
47.0
150
150.0

Total
183
183.0
71
71.0
116
116.0
370
370.0

()
Chi-Square Tests

Pearson Chi-Square
Likelihood Ratio
Linear-by-Linear
Association
N of Valid Cases

Value
191.952 a
214.885
187.965

2
2

Asymp.
Sig.
(2-sided)
.000
.000

.000

df

370

a. 0 cells (.0%) have expected count less than 5. The


minimum expected count is 28.78.

H0 :
H1 :

= 191.95 Sig. .000 <


= .01 .01

57

58

(Contingency coefficient)

(Contingency coefficient)

C 2

r X c (r X c Contingency
table)

C=

2
N + 2

H0 : = 0

()

H1 : 0

()

2
2 =

(Oij Eij ) 2
Eij

df = (r-1)(c-1)

H0
2

59


(3 ) 60

13 (7)

21

5 (8)

(5.25)

(8.75)

24

2 (5)

20

9 (6)

10 (10)

11

(3.75)

(6.25)

15

25

15

60

60

Eij < 5 1
(11.11%)

=
2

(O ij E ij ) 2
E ij

(13 7 )
( 4 5 . 25 ) 2
(11 6 . 25 ) 2
+
+ ... +
7
5 . 25
6 . 25
= 16 . 87
2

df = (2)(2) = 4

C=

2
16 .87
=
= 0.468
2
60
+16 .87
N +

H0 : = 0

H1 : 0

)
)

.05
2

.05,4

9.49
2

(16.87)

(9.49) H0 .05

61

SPSS


Chisquare

Analyze

Descriptive

Statistics - Crosstabs

Dialog

Crosstabs

Row(s):


Column(s):

Statistics
3

Chi-square

Contingency coefficient

Dialog Crosstabs :
Statistics

62

Continue

Dialog Crosstabs

OK

63

( behavior)
BEHAVIOR * METHOD Crosstabulation
Count
1
BEHAVIOR 1
2
3
Total

13
5
2
20

METHOD
2
4
9
2
15

3
4
10
11
25

Total
21
24
15
60

Chi-Square Tests

Pearson Chi-Square
Likelihood Ratio
Linear-by-Linear
Association
N of Valid Cases

Value
16.871a
16.513
12.794

4
4

Asymp. Sig.
(2-sided)
.002
.002

.000

df

60

a. 1 cells (11.1%) have expected count less than 5. The


minimum expected count is 3.75.

Symmetric Measures
Value
Approx. Sig.
Nominal by Nominal
Contingency Coefficient .468
.002
N of Valid Cases
60
a. Not assuming the null hypothesis.
b. Using the asymptotic standard error assuming the null hypothesis.

H0 : = 0

H1 : 0

)
)

.05
2

= 16.871 Sig. .002


.05 H0

64

65

(Spearman rank

correlation coefficient)

(Spearman rank
correlation coefficient Spearman's rho) rS
2

2 (Ordinal
scale)


1. 2


2.

rS = 1

N ( N 2 1)

rS

6D 2

H0 : = 0
H1 : 0

()
()

66

t=

rS n 2
1 rS2

, df = n-2

H0 t t ,n-2

t -t ,n-2
rS rS df
=n

rS rS H0

67

A researcher is studying the relationship between the education level of first-born sons and
the education level of their fathers in a small rural community in the Midwest . Accordingly, the
researchers randomly selects 15 adults males from this community who are first-born sons and asks
them to indicate on a questionnaire the highest level of education attained by themselves and by their
fathers. To measure the variable, highest level of education attained, the following scale is used :
1 = graduated from elementary school
2 = graduated from middle school
3 = graduated from high school
4 = graduated from two-year college
5 = graduated from four-year college
6 = at least some graduate training
The data are as follows :
Sons
3 3 3 5 6 4 3 5 2 4 4 1 4 3 6
Fathers
1 2 1 3 3 2 3 4 3 3 2 1 2 2 4


SPSS
spearman
Analyze

Correlate

Bivariate...



Variables:
sons fathers


Spearman

OK
( SPSS)
Correlations
Spearman's rho SONS

FATHER

Correlation Coefficient
Sig. (2-tailed)
N
Correlation Coefficient
Sig. (2-tailed)
N

SONS
1.000
.
15
.625*
.013
15

*. Correlation is significant at the 0.05 level (2-tailed).

FATHER
.625*
.013
15
1.000
.
15

68

H0 : = 0

(Education level first-born son father

H1 : 0

(Education level first-born son father

)
)

Sig. .013 (.05)



.05

H0

Education level first-born son father

You might also like