FRIEDMAN TEST
Name:
Type:
Purpose:
Perform a Friedman test that k treatments are identical.
Description:
The Friedman test is a nonparametric test for analyzing
randomized complete block designs. It is an extension of
the sign test when there may be more than two treatments.
The Friedman test assumes that there are k experimental
treatments (k ≥ 2). The observations are arranged in
b blocks, that is

Treatment

Block

1

2

...

k

1

X_{11}

X_{12}

...

X_{1k}

2

X_{21}

X_{22}

...

X_{2k}

3

X_{31}

X_{32}

...

X_{3k}

...

...

...

...

...

b

X_{b1}

X_{b2}

...

X_{bk}

Let R(X_{ij}) be the rank assigned to
X_{ij} within block i (i.e., ranks within
a given row). Average ranks are used in the case of ties. The
ranks are summed to obtain
Then the Friedman test is
H_{0}:

The treatment effects have identical effects

H_{a}:

At least one treatment is different from at least
one other treatment

Test Statistic:

If there are ties, then
where
Note that Conover recommends the statistic
since it has a more accurate approximate distribution.
The T2 statistic is the twoway analysis of variance
statistic computed on the ranks R(X_{ij}).

Significance Level:


Critical Region:

where F is the percent point function of the F
distributuion.
where
is the percent point function of the chisquare
distribution.
The T_{1} approximation is sometimes poor, so the
T_{2} approximation is typically preferred.

Conclusion:

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

If the hypothesis of identical treatment effects is rejected,
it is often desirable to determine which treatments are
different (i.e., multiple comparisons). Treatments i and
j are considered different if
Syntax:
FRIEDMAN 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:
FRIEDMAN TEST Y BLOCK TREATMENT
FRIEDMAN TEST Y X1 X2
FRIEDMAN 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_{1k}

1

k

X_{21}

2

1

X_{22}

2

2

...

2

...

X_{2k}

2

k

...

...

...

X_{b1}

b

1

X_{b2}

b

2

...

b

...

X_{bk}

b

k

If your data are in a format similar to that given in the
DESCRIPTION section (i.e., you have colums Y_{1} to
Y_{k}, each with b rows), you can convert
it to the format required by Dataplot with the commands:
LET NBLOCK = SIZE Y1
LET BLOCKID = SEQUENCE 1 1 NBLOCK
LET Y BLOCK TREAT = REPLICATED STACK Y1 Y2 Y3 Y4 Y5 BLOCKID
FRIEDMAN TEST Y BLOCK TREAT
Note:
The response, ranked response, block, and treatment are
written to the file dpst1f.dat in the current directory.
The treatment ranks and multiple comparisons are written to
the file dpst2f.dat in the current directory. Comparisons
that are statistically significant at the 95% level are
flagged with a single asterisk while comparisons that are
statistically significant at the 99% level are flagged with
two asterisks.
Note:
The Friedman test is based on the following assumptions:
 The b rows are mutually independent. That is,
the results within one block (row) do not affect
the results within other blocks.
 The data can be meaningfully ranked.
Note:
Note:
The Quade test is similar to the Friedman test. A few distinctions:
 For k = 2, the Friedman test is equivalent to a sign
test while the Quade test is equivalent to a signed rank test.
 According to Conover, the Quade test is typically more
powerful for k < 5 while the Friedman test tends to
become more powerful for k ≥ 5.
 The Friedman test only requires ordinal scale data (i.e., the
data can be ranked) while the Quade test requires at least
interval scale data (the range within a block can be computed).
Default:
Synonyms:
Related Commands:
QUADE TEST

= Perform a Quade test.

ANOVA

= Perform an analysis of variance.

SIGN TEST

= Perform a sign test.

MEDIAN POLISH

= Carries out a robust ANOVA.

T TEST

= Carries out a t test.

RANK SUM TEST

= Perform a rank sum test.

SIGNED RANK TEST

= Perform a signed rank test.

BLOCK PLOT

= Generate a block plot.

DEX SCATTER PLOT

= Generates a dex scatter plot.

DEX ... PLOT

= Generates a dex plot for a statistic.

DEX ... EFFECTS PLOT

= Generates a dex effects plot for a

Reference:
Conover (1999), "Practical Nonparametric Statistics," Third Edition,
Wiley, pp. 367373.
Applications:
Implementation Date:
2004/1
2011/4: Reformatted Output
Program:
SKIP 25
READ FRIEDMAN.DAT Y BLOCK TREAT
SET WRITE DECIMALS 5
FRIEDMAN Y BLOCK TREAT
The following output is generated.
Friedman Two Factor Test
Response Variable: Y
First GroupID Variable: BLOCK
Second GroupID Variable: TREAT
H0: Treatments Have Identical Effects
Ha: Treatments Do Not Have Identical Effects
Summary Statistics:
Total Number of Observations: 48
Number of Blocks: 12
Number of Treatments: 4
Test:
Friedman Test Statistic (Original): 8.09734
Sum of Squares of Ranks (A1): 356.50000
Correction Factor (C1): 300.00000
Friedman Test Statistic (Conover): 3.19219
CDF of Test Statistic: 0.96378
PValue: 0.03621
Percent Points of the F Reference Distribution

Percent Point Value

0.0 = 0.000
50.0 = 0.805
75.0 = 1.435
90.0 = 2.258
95.0 = 2.891
97.5 = 3.543
99.0 = 4.437
99.9 = 6.883
Conclusions (Upper 1Tailed Test)

Alpha CDF Critical Value Conclusion

10% 90% 2.258 Reject H0
5% 95% 2.891 Reject H0
2.5% 97.5% 3.543 Accept H0
1% 99% 4.437 Accept H0
Date created: 2/3/2004
Last updated: 8/31/2011
Please email comments on this WWW page to
alan.heckert@nist.gov.
