In: Statistics and Probability
Test for correlation between Barley and Corn prices using Spearman's rank correlation method, at the 0.05 significance level.
Barley | Rank | Corn | Rank | d | d^2 |
4.89 | 4 | 3.21 | 1 | 3 | 9 |
4.52 | 1 | 3.22 | 2 | -1 | 1 |
4.85 | 2 | 3.29 | 4 | -2 | 4 |
4.97 | 6 | 3.23 | 3 | 3 | 9 |
5.12 | 9 | 3.33 | 5 | 4 | 16 |
4.91 | 5 | 3.4 | 6 | -1 | 1 |
5.08 | 8 | 3.44 | 8 | 0 | 0 |
4.98 | 7 | 3.49 | 9 | -2 | 4 |
4.87 | 3 | 3.43 | 7 | -4 | 16 |
Spearman rank's correlation
n : Number of pairs of data = 9
Barley | Rank | Corn | Rank | d | d2 |
4.89 | 4 | 3.21 | 1 | 3 | 9 |
4.52 | 1 | 3.22 | 2 | -1 | 1 |
4.85 | 2 | 3.29 | 4 | -2 | 4 |
4.97 | 6 | 3.23 | 3 | 3 | 9 |
5.12 | 9 | 3.33 | 5 | 4 | 16 |
4.91 | 5 | 3.4 | 6 | -1 | 1 |
5.08 | 8 | 3.44 | 8 | 0 | 0 |
4.98 | 7 | 3.49 | 9 | -2 | 4 |
4.87 | 3 | 3.43 | 7 | -4 | 16 |
d2=60 |
Null hypothesis : Ho : = 0 ; Correlation coefficient = 0
Alternate hypothesis : Ha : ; Correlation coefficient 0
Test statistic :
Test Statistic = 1.5275
Degrees of freedom = n-2=9-2=7
For two tailed test,
For 7 degrees of freedom, P(t>1.5275) = 0.0852
Given level of significance = 0.05
As p-value : 0.1705 > : 0.05; Fail to reject the null hypothesis;
There is not sufficient evidence to conclude that the correlation coefficient not equal to zero.