---
title: 'Friedman Test: Nonparametric Analysis in RCBD'
url: https://www.emergentmind.com/topics/friedman-test
type: topic
---

# Friedman Test: Nonparametric Analysis in RCBD

The Friedman test is a rank-based nonparametric procedure employed for detecting differences among treatments in a randomized complete block design (RCBD), often functioning as a robust substitute for the traditional parametric F-test. The test is especially notable for its broad applicability to settings lacking normality or exhibiting non-homogeneous error structures. Its asymptotic justification, extensions for accurate finite-sample inference, and connections to graphical and post-hoc methodologies have been extensively analyzed, with recent research providing explicit guidelines for type I error control, power, and sample size determination [2503.17179, 2111.00949, 2202.09131].

## 1. Statistical Model and Fundamental Hypotheses

In the RCBD context, the model is conventionally expressed as
$$
X_{ij} = \mu + \theta_i + \gamma_j + \varepsilon_{ij}
$$
where $X_{ij}$ denotes the observation for treatment $i$ in block $j$, $\mu$ is a grand mean, $\theta_i$ and $\gamma_j$ are fixed treatment and block effects, and $\varepsilon_{ij}$ are assumed to be independent and continuously distributed. The null hypothesis is
$$
H_0: \theta_1 = \theta_2 = \cdots = \theta_K = 0
$$
against the alternative that at least one $\theta_i$ differs. The error term distribution is unrestricted except for continuity, rendering the test nonparametric [2503.17179, 2202.09131].

## 2. Construction of the Friedman Statistic

Within each block $j \in \{1,\dots,B\}$, observations are ranked among the $K$ treatments, resulting in ranks $R_{ij}$ for treatment $i$. The sum of ranks for each treatment is
$$
R_i = \sum_{j=1}^B R_{ij}
$$
The classic Friedman statistic is
$$
T = \frac{12}{B\,K\,(K+1)}\sum_{i=1}^K R_i^2 - 3B(K+1)
$$
or, equivalently, for $n$ blocks and $r$ treatments,
$$
Q = \frac{12}{n\,r\,(r+1)} \sum_{j=1}^r \left(R_j - \frac{n(r+1)}{2}\right)^2
$$
where $T$ and $Q$ are functionally equivalent statistics depending on notation [2503.17179, 2111.00949, 2202.09131].

## 3. Null Distribution, Asymptotics, and Chi-Square Approximation

Under $H_0$, the $R_j$ are exchangeable with mean $n(r+1)/2$ and variance $n(r^2-1)/12$ [2111.00949]. By the central limit theorem for dependent variables, as $B\to\infty$ (large block count), the Friedman statistic converges in distribution to a chi-square with $K-1$ degrees of freedom:
$$
T \xrightarrow{d} \chi^2_{K-1}
$$
However, this approximation is conservative: the true type I error rate is below nominal $\alpha$, especially as $K$ increases. Gaunt & Reinert (2021) provide explicit finite-sample bounds:
- For smooth test functions, the error is $O(r/n)$, with the optimal rate being achieved only when $r/n \to 0$.
- For the Kolmogorov distance, the error is $O(\sqrt{r}/n)$, vanishing if and only if $\sqrt{r}/n \to 0$ [2111.00949].

| Scenario                 | Bound on $\left|P(\text{Friedman} \le x) - P(\chi^2_{K-1} \le x)\right|$ |
|--------------------------|---------------------------------------------------------------------------|
| General smooth functions | $\leq \frac{r}{n} \cdot C$ (explicit $C$ in [2111.00949])                |
| Kolmogorov               | $\leq C'\frac{\sqrt{r}}{n}$                                               |

These finite-sample results enable practitioners to gauge the validity of the chi-square approximation—if $r/n > 0.2$, alternative approaches such as permutation tests or increasing $n$ are warranted [2111.00949].

## 4. Improved Transformations and Power Analysis

To address conservativeness and enhance small-sample performance, transformations of the Friedman statistic to an $F$ distribution have been proposed. The general transformation is
$$
F_S = \frac{T/f_1}{(S-T)/f_2} \approx F(f_1, f_2)
$$
with variants:
- "Kendall’s" $F_M$: specific form using $m_1 = K-1-2/B$, $m_2 = (B-1)m_1$.
- Proposed $F_L$: aligns numerator degrees of freedom with classical ANOVA ($\ell_1=K-1,\ \ell_2=(B-1)(K+1)$), yielding
$$
F_L = \frac{(K+1)(B-1)T}{(K-1)(L-T)},\quad L=B(K+1)-2
$$
The $F_L$ has been shown to provide type I error rates tightly matched to nominal $\alpha$ (within $\pm 2\%$) for a range of $K$ and $B$.

Noncentral $F$ approximations under heterogeneous location shifts, incorporating explicit power functions, have also been derived. For the $F_L$ variant:
$$
\Psi_{LB} = P\left\{F(\ell_1, \ell_2, \delta_{LB}) > F_\alpha(\ell_1, \ell_2)\right\}
$$
with closed-form expressions for the noncentrality parameter $\delta_{LB}$ and the means/variances of rank statistics under the alternatives for Uniform, Normal, Laplace, and Exponential distributions. Monte Carlo verification demonstrates power estimation error $<2\%$ for $F_L$ with $\delta_{LB}$, in contrast to errors exceeding 20% for classic noncentral $\chi^2$ approaches [2503.17179].

## 5. Graphical and Single-Step Approaches

Recent work proposes consolidating global and post-hoc analyses through the "S-plot" approach, visualizing standardized group-rank contributions:
$$
S_g = \frac{R_g - 0.5\,B\,(G+1)}{\sqrt{B\,G\,(G+1)/12}}, \quad g=1,\ldots,G
$$
with the Friedman statistic decomposed as $F_G = \sum_{g=1}^G S_g^2$. A gamma approximation for $S_g$ enables precise calculation of decision limits for family-wise error control (e.g., Bonferroni). This approach replaces classical cascades of Nemenyi or Conover pairwise tests:
- Plot $S_g$ across $g$; any $S_g$ exceeding its decision limit identifies the treatments most responsible for rejecting $H_0$.
- Simulation studies confirm type I error control close to nominal levels and efficiency in identifying significant effects, particularly for moderately large $B$ [2202.09131].

| Post-hoc Approach    | Number of Tests         | Error Control      |
|---------------------|------------------------|--------------------|
| Classical (Nemenyi) | $1 + \binom{G}{2}$     | Family-wise (FWER) |
| S-plot              | $G$ standardized ranks | FWER (Bonferroni)  |

## 6. Sample Size Determination and Practical Guidance

Explicit sample size calculations are enabled by the explicit power expressions for the $F_L$ transformation. The minimum $B$ achieving power at least $1-\beta$ at level $\alpha$ is the smallest $B$ such that
$$
\Psi_{LB}(B) \geq 1-\beta
$$
where parameters incorporate the underlying effect size through closed-form probabilities (derivable for Uniform, Normal, Laplace, Exponential shifts). Usually, a grid search or Newton–Raphson is used, plugging in the relevant power function and distributional parameters [2503.17179].

## 7. Empirical Validation, Limitations, and Recommendations

- The chi-square approximation is conservative, with error worsening as $K$ grows or $B$ decreases; $F_L$ furnishes type I error control much closer to the nominal level.
- The $F_L$ transformation with noncentrality $\delta_{LB}$ yields the best overall accuracy for power and sample size estimation under a broad range of data-generating processes.
- S-plot graphical methods drastically reduce the number of post-hoc tests and provide an immediate, interpretable visualization for both global and specific treatment effects, contingent on moderately large block sizes for moment-based fit [2503.17179, 2202.09131].
- The classical method and S-plot both maintain type I error within Bradley’s interval $[0.035,0.065]$ at 5% nominal, with accuracy improving as $B$ increases.
- If block–treatment interaction or ties are present, additional adjustments or alternative methodologies may be necessary.

In summary, the Friedman test remains a foundational nonparametric tool for RCBD analysis. Recent developments on accurate $F$-transformations, noncentral power approximations, explicit error bounds, and single-step graphical diagnostics extend its reliability and usability for modern experimental designs [2503.17179, 2111.00949, 2202.09131].

Source: https://www.emergentmind.com/topics/friedman-test