# Friedman Test Calculator

Perform the Friedman test for non-parametric repeated measures. Enter data for subjects across conditions to get the Q statistic and p-value.

## What this calculates

Enter data for n subjects measured under k conditions to perform the Friedman test, the non-parametric alternative to repeated measures ANOVA. No normality assumption required.

## Inputs

- **Number of Subjects/Blocks (n)** — min 2, max 50 — Number of subjects, blocks, or individuals.
- **Number of Conditions/Treatments (k)** — min 2, max 10 — Number of conditions, treatments, or time points.
- **Data (row per subject, comma-separated)** — Enter data row by row. Separate values with commas, rows with semicolons. Each row = one subject's scores across all conditions.

## Outputs

- **Friedman Q Statistic** — The Friedman test statistic (chi-square distributed).
- **Degrees of Freedom** — k - 1 degrees of freedom.
- **Approximate P-Value** — P-value from chi-square approximation.
- **Significant at α = 0.05?** — formatted as text — Whether the result is statistically significant.
- **Mean Ranks by Condition** — formatted as text — Average rank for each condition across all subjects.
- **Calculation** — formatted as text — Step-by-step Friedman test computation.

## Details

**What is the Friedman Test?**

The Friedman test is a non-parametric test for comparing three or more related groups. It is the repeated-measures extension of the Kruskal-Wallis test and the non-parametric alternative to one-way repeated measures ANOVA.

**How it works:**

1. Rank the scores within each subject (block) from 1 to k
2. Sum the ranks for each condition across all subjects
3. Compute the Q statistic from the rank sums
4. Compare Q to a chi-square distribution with k-1 degrees of freedom

**Formula:**

**Q = (12 / (nk(k+1))) x ΣRj^2 - 3n(k+1)**

Where n = number of subjects, k = number of conditions, and Rj = sum of ranks for condition j.

**When to use the Friedman test:**

- Repeated measures on the same subjects (pre/mid/post)
- Randomized complete block designs
- Ordinal data or data that is not normally distributed
- You want to compare more than two related conditions without assuming normality

**Post-hoc testing:**

If the Friedman test is significant, follow up with pairwise Wilcoxon signed-rank tests (with Bonferroni correction) or Nemenyi's test to identify which conditions differ.

**Example applications:**

- Comparing three or more treatments applied to the same patients
- Rating different products by the same panel of judges
- Testing three teaching methods on the same group of students

## Frequently Asked Questions

**Q: How is the Friedman test different from repeated measures ANOVA?**

A: Repeated measures ANOVA assumes the data is normally distributed and tests for differences in means. The Friedman test ranks the data within each subject and tests whether the rank distributions differ across conditions. Use the Friedman test when your data is ordinal, non-normal, or when samples are small.

**Q: What if my Friedman test is significant?**

A: A significant Friedman test tells you at least one condition differs from the others. To find out which conditions differ, perform post-hoc pairwise comparisons. Common options include pairwise Wilcoxon signed-rank tests with a Bonferroni correction or Nemenyi's test, which controls the familywise error rate.

**Q: Can the Friedman test handle ties?**

A: Yes. When two or more values within a subject are equal, they receive the average of the ranks they would have occupied. Ties slightly reduce the power of the test but do not invalidate it. A tie-correction factor can be applied for more precise results when ties are extensive.

---

Source: https://vastcalc.com/calculators/statistics/friedman-test
Category: Statistics
Last updated: 2026-04-08
