  Friedman's chi-square test is a non-parametric statistical test for $r\geq2$
treatments across $n\ge1$ trials to assess the null hypothesis that there is no
treatment effect. We use Stein's method with an exchangeable pair coupling to
derive an explicit bound on the distance between the distribution of Friedman's
statistic and its limiting chi-square distribution, measured using smooth test
functions. Our bound is of the optimal order $n^{-1}$, and also has an optimal
dependence on the parameter $r$, in that the bound tends to zero if and only if
$r/n\rightarrow0$. From this bound, we deduce a Kolmogorov distance bound that
decays to zero under the weaker condition $r^{1/2}/n\rightarrow0$.
