COCHRAN TEST
Name:
Type:
Purpose:
Perform a Cochran test that c treatments have identical
effects.
Description:
The Cochran test is a nonparametric test for analyzing
randomized complete block designs where the response variable
is a binary variable (i.e., there are only two possible outcomes,
which are coded as 0 and 1).
The Cochran test assumes that there are c experimental
treatments (c >= 2). The observations are arranged in
r blocks, that is

Treatment

Block

1

2

...

c

1

X_{11}

X_{12}

...

X_{1c}

2

X_{21}

X_{22}

...

X_{2c}

3

X_{31}

X_{32}

...

X_{3c}

...

...

...

...

...

r

X_{r1}

X_{r2}

...

X_{rc}

The Friedman test is the usual nonparametric test for this
kind of design. The Cochran test is applied for the special
case of a binary response variable (i.e., it can have only one
of two possible outcomes).
Then the Cochran test is
H_{0}:

The treatments are equally effective.

H_{a}:

There is a difference in effectiveness among treatments.

Test Statistic:

The Cochran test statistic is
with c, C_{i} r,
R_{i} and N denoting the number of
treatments, the column total for the ith
treatment, the number of blocks, the row total for the
ith block, and the grand total, respectively.

Significance Level:


Critical Region:

T >
_{1,c1}
where
is the chisquare percent point function.
Note that this is based on a large sample approximation.
In particular, it assumes that r is "large".

Conclusion:

Reject the null hypothesis if the test statistic is
in the critical region.

Syntax:
COCHRAN TEST <y> <block> <treat>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<block> is a variable that identifies the block;
<treat> is a variable that identifies the
treatment;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
COCHRAN TEST Y BLOCK TREATMENT
COCHRAN TEST Y X1 X2
COCHRAN TEST Y BLOCK TREATMENT SUBSET BLOCK > 2
Note:
In Dataplot, the variables should be given as:
Y

BLOCK

TREAT


X_{11}

1

1

X_{12}

1

2

...

1

...

X_{1c}

1

c

X_{21}

2

1

X_{22}

2

2

...

2

...

X_{2c}

2

c

...

...

...

X_{r1}

r

1

X_{r2}

r

2

...

r

...

X_{rc}

b

c

If your data are in a format similar to that given in the
DESCRIPTION section (i.e., you have colums Y1 to Yc, each
with r rows), you can convert it to the format required by
Dataplot with the commands:
LET NTREAT = 5
LET NBLOCK = SIZE Y1
LET NTOTAL = K*NBLOCK
LET BLOCK = SEQUENCE 1 1 NBLOCK FOR I = 1 1 NTOT
LET Y2 TREAT= STACK Y1 Y2 Y3 Y4 Y5
COCHRAN TEST Y2 BLOCK TREAT
Note:
The Cochran test is based on the following assumptions:
 The blocks were randomly selected from the population of
all possible blocks.
 The outcomes of the treatments can be coded as binary
responses (i.e., a "0" or "1") in a way that is common
to all treatments within each block.
Note:
The case where there are exactly two treatments is equivalent
to the McNemar test. The McNemar test is equivalent to a
twotailed sign test.
Note:
If the Cochran test rejects the null hypothesis of equally
effective treatments, pairwise multiple comparisons can
be made by applying the Cochran test on the two treatments
of interest. For example, to test treatments 3 and 5,
you can do something like the following
COCHRAN TEST Y BLOCK TREATMENT SUBSET TREATMENT = 3 5
Default:
Synonyms:
Related Commands:
Reference:
"Practical Nonparametric Statistics", Third Edition, Wiley,
1999, pp. 250256.
Applications:
Analysis of Binary TwoWay Randomized Block Designs
Implementation Date:
Program:
. Following example from p. 253 of Conovover
READ Y1 Y2 Y3
1 1 1
1 1 1
0 1 0
1 1 0
0 0 0
1 1 1
1 1 1
1 1 0
0 0 1
0 1 0
1 1 1
1 1 1
END OF DATA
LET N1 = SIZE X1
LET NTOT = 3*N1
LET BLOCK = SEQUENCE 1 1 N1 FOR I = 1 1 NTOT
LET Y TREAT = STACK Y1 Y2 Y3
COCHRAN Y BLOCK TREAT
This example generates the following output
COCHRAN NONPARAMETRIC TEST FOR RANDOMIZED COMPLETE BLOCK DESIGN
FOR DICHOTOMOUS DATA
1. STATISTICS
NUMBER OF SUBJECTS (ROWS) = 11
NUMBER OF TREATMENTS = 3
COCHRAN TEST STATISTIC = 2.800000
2. PERCENT POINTS OF THE LARGE SAMPLE CHISQUARE REFERENCE DISTRIBUTION
FOR COCHRAN TEST STATISTIC
0 % POINT = 0.000000
50 % POINT = 1.386294
75 % POINT = 2.772589
90 % POINT = 4.605170
95 % POINT = 5.991464
99 % POINT = 9.210342
99.9 % POINT = 13.81554
75.34030 % Point: 2.800000
3. CONCLUSION (AT THE 5% LEVEL):
THE 3 TREATMENTS HAVE EQUAL EFFECTS
Date created: 12/5/2005
Last updated: 12/5/2005
Please email comments on this WWW page to
alan.heckert@nist.gov.
