42 HYPOTHESES TESTING FOR SEVERAL SAMPLES
The critical value from Table A.5 for k = 3, n = 10, and
α
= 0.05 is 6.2. For
α
= 0.01,
it is 9.6. Thus, the null hypothesis H
0
:
θ
A
=
θ
B
=
θ
C
is rejected even at the 0.01 level
of significance and the conclusion is that tasted beer brands differ in preference rat-
ings.
To conduct the Friedman rank test in SAS, we use the code
data beer;
input taster brand $ rating @@;
datalines;
1 A 4 1 B 5 1 C 8 2 A 3 2 B 7 2 C 6 3 A 2 3 B 8 3 C 8
4 A 5 4 B 7 4 C 9 5 A 1 5 B 3 5 C 6 6 A 4 6 B 4 6 C 6
7 A 3 7 B 6 7 C 8 8 A 2 8 B 5 8 C 5 9 A 2 9 B 7 9 C 9
10 A 6 10 B 4 10 C 5
;
proc sort data=beer;
by taster;
run;
proc rank data=beer out=ranked;
var rating;
by taster;
ranks rank;
run;
proc freq data=ranked;
table taster*brand*rank/noprint cmh;
run; ...