I'm reading about Friedman's statistic from the 3rd edition of Nonparametric Statistical Methods (Hollander, Wolfe and Chicken). On page 302 they have an exercise problem:
- Show directly, or illustrate by means of an example, that the maximum value of $S$ is $S_{\text{max}} = n ( k − 1 )$ . For what configuration is this maximum achieved?
They define $S$ as follows:
$\frac{12}{nk(k+1)}\sum_{j=1}^k R_j^2 - 3n(k+1)$,
where $R_j$ is the sum of group $j$ ranks, there are $k$ groups and $n$ blocks. Looking at the definition of $S$, I need to maximize $\sum R_j^2$. My uneducated guess is, that the maximum is achieved when the ranks of each column sum to most extreme values. But doing the algebra with groups $Rj$ having only rank $j$ $k$ times or distributing the ranks so that they start from group one having ranks from 1 to $n$ and continue in order to group two up to group $k$, which has ranks from $(k-1)n+1$ to $kn$ does not give me $n(k-1)$. So there must be some statistical expertise at play in the result? Could someone clarify the idea of how to maximize $S$?
They tell that with a large number of blocks, $S$ follows "asymptotic chi-squared distribution with $(k-1)$ degrees of freedom." What does that mean and is there a connection to the proposed maximum value?