Non-Parametric

Friedman Test Calculator

Nonparametric repeated measures / related groups comparison

01
Enter Your Data

Each row is a subject (block). Each column is a treatment or condition being compared.

5
3
📋 Paste data from spreadsheet / CSV

Supports comma, tab, semicolon, or space separators. One subject per line.

02
Test Results

Mean Ranks per Treatment

03
Visualizations
?
How to Use This Calculator
1
Set your dimensions

Use the +/− buttons to set the number of subjects (rows) and treatments/conditions (columns). Minimum: 2 treatments, 3 subjects.

2
Enter your data

Type values directly into the table. Each row is one subject measured under all treatments. Or use the paste area to load data from Excel/CSV.

3
Run the test

Click "Run Friedman Test". Results include the χ² statistic, degrees of freedom, p-value, and mean ranks for each treatment.

4
Interpret

If p < 0.05, at least one treatment differs significantly. Inspect the mean ranks to see which conditions rank higher or lower on average.

💡 Tip: The Friedman test is the nonparametric alternative to one-way repeated-measures ANOVA. Use it when you cannot assume normality, or when data is ordinal.
⚠️ Important: All subjects must be measured under all treatments (complete blocks). Missing values are not supported. For independent groups, use the Mann-Whitney U or Kruskal-Wallis test instead.
∑
Understanding the Friedman Test

The Friedman test is a nonparametric statistical test developed by the economist Milton Friedman in 1937. It detects differences across multiple repeated measurements of the same subjects (or matched blocks) — the nonparametric equivalent of one-way repeated-measures ANOVA.

When to Use the Friedman Test

Assumptions


Frequently Asked Questions

Q1: How is the Friedman statistic calculated?

Within each row the values are ranked 1 to k. The column rank sums Rj are then used in:

\[\chi^2_F = \frac{12}{nk(k+1)} \sum_{j=1}^{k} R_j^2 \;-\; 3n(k+1)\]

For large samples, χ²F follows a chi-squared distribution with k−1 degrees of freedom.

Q2: How are ties handled?

Tied values within the same row receive the average of the ranks they would occupy. A tie-correction factor is applied automatically.

Q3: What should I do after a significant result?

Follow up with pairwise post-hoc comparisons using the Wilcoxon signed-rank test with Bonferroni or Holm correction, or Dunn's test.

Q4: How does the Friedman test differ from Kruskal-Wallis?

Kruskal-Wallis is for independent groups; Friedman is for related/repeated groups and accounts for within-subject correlation.


How to Do This in Statistical Software

This calculator works directly with a subjects × treatments table. Here's how to reproduce the same test elsewhere, using the default 5-subject, 3-treatment example above.

How to Do This in R

R's built-in friedman.test() expects a matrix with subjects as rows and treatments as columns:

data <- matrix(c(85,90,78, 72,88,69, 91,95,87, 68,74,65, 79,83,71),
                        nrow = 5, byrow = TRUE)
        
        friedman.test(data)

How to Do This in SPSS

Analyze → Nonparametric Tests → Legacy Dialogs → K Related Samples. Move all your treatment/condition variables into the Test Variables box (each subject's measurements should be in separate columns, one row per subject), and make sure Friedman is checked under Test Type.

How to Do This in JASP

ANOVA → Repeated Measures ANOVA → Friedman. Move each treatment's column into the Measures box. JASP outputs the χ² statistic, df, p-value, and Kendall's W (a normalized effect size), and offers pairwise Durbin-Conover post-hoc comparisons directly.

Related Statistical Calculators