evaluated Spearman’s correlation and n is the number of observations. Here t=5.520
(2.5173/0.4560) with 8 degrees of freedom. Looking at Table 3 in Appendix A4, the
observed value of t (5.520) is larger than the critical value of 5.041 which is in the row
with 8df. The associated one-tailed probability is p<0.0005. We can reject the null
hypothesis of no relationship and conclude that the alternative hypothesis of a positive
relationship between FSME and CAT scores is tenable.
Computer Analysis
The SAS procedure PROC CORR with the option SPEARMAN computes Spearman’s
rank order correlation. The relevant SAS code is:
data a;
infile 'a:nonpara.dat';
input school $ fsme cat
proc corr spearman;
var fsme cat;
run;
The first three lines of SAS code relate to the data step and the second three lines are the
procedure step.
The first line specifies the temporary data set as a. The external data file nonpara.dat is
then read from the directory a: with the INFILE statement. In the third line of code the
INPUT statement specifies the three variables, the first variable ‘school’ is designated as
a character variable because of the following $ sign. The variables to be correlated are
specified in the VAR statement. The correlation procedure PROC CORR with the option
SPEARMAN produces the following output:
Correlation Analysis
2 VAR Variables: FSME CAT
Simple Statistic
Variable N Mean Std Dev Median Minimum Maximum
FSME 10 21.6300 12.7326 19.2000 6.3000 45.0000
CAT 10 23.4400 9.7484 22.5500 8.4000 36.4000
Spearman Correlation Coefficients /Prob>|R| under Ho: Rho=0/N=10
(^) FSME CAT
FSME 1.00000 0.89091
0.0 0.0005
CAT 0.89091 1.00000
0.0005 0.0
Interpretation of Computer Output
The first two sections of the output contain summary statistics for the sample data. The
next section of the output contains a matrix of rows and columns with the variables
forming the column and row headings. Each cell in the matrix contains two numbers, the
first number is the correlation rs and the second number is the associated p-value. In the
Inferences involving rank data 213