Korean, Edit

Chapter 14-8. Wilcoxon Rank Test

Recommended Article: 【Statistics】 Chapter 14. Statistical Testing


1. Overview

2. Wilcoxon Rank Sum Test

3. Wilcoxon Signed Rank Test



1. Overview

⑴ Single Sample

① Parametric Test: Single Sample T-Test

② Non-Parametric Test: Sign Test, Wilcoxon Signed Rank Test

⑵ Two Samples (Paired Samples): Essentially the same as single sample

① Parametric Test: Paired Sample T-Test

② Non-Parametric Test: Sign Test, Wilcoxon Signed Rank Test

⑶ Two Samples (Independent Samples)

① Parametric Test: Independent Sample T-Test

② Non-Parametric Test: Wilcoxon Rank Sum Test

⑷ Analysis of Variance

① Parametric Test: ANOVA

② Non-Parametric Test: Kruskal-Wallis Test

⑸ Randomness

① Non-Parametric Test: Run Test

⑹ Correlation Analysis

① Pearson Correlation Coefficient

② Spearman Rank Correlation Coefficient



2. Wilcoxon Rank Sum Test

⑴ Overview

① A representative non-parametric test method for testing the median of two samples

② A test method using the sum of ranks in a combined sample from two samples

③ Assumption 1. Data distribution is continuous and independent

④ Assumption 2. Symmetry assumption about the data distribution

⑵ 1st. Null Hypothesis and Alternative Hypothesis

① Null Hypothesis H0: Δ = 0. That is, the medians of the two populations are the same

② Alternative Hypothesis H1: Δ > 0 or Δ < 0 or Δ ≠ 0

⑶ 2nd. Setting the Significance Level

⑷ 3rd. Calculation of Test Statistic

① 3-1. Combine the data from both samples and assign ranks

② 3-2. Sum the ranks of the group with the smaller sample size

○ If the sample sizes are equal, either can be chosen

○ In the case of data with the same values, assign a representative rank to those data collectively

③ 3-3. Calculate the following


스크린샷 2025-04-27 오후 10 37 41


○ n1: The sample size of the smaller group. Should be 10 or more

○ n2: The sample size of the larger group. Should be 10 or more

○ R: The sum of the ranks of the smaller group

④ Also known as Mann-Whitney U statistics or Mann-Whitney-Wilcoxon Rank Sum Test


스크린샷 2025-03-28 오전 12 03 45

스크린샷 2025-04-27 오후 10 35 25


⑸ 4th. Statistical Testing

⑹ R code


group1 = c(25, 30, 35, 40, 45)
group2 = c(20, 25, 30, 35, 40)
wilcox.test(group1, group2, paired = FALSE)



3. Wilcoxon Signed Rank Test

⑴ Overview

① Used for testing the median of a single sample or the difference in medians of two paired samples

② A test method that considers not only the sign of the difference but also its relative magnitude

③ Assumption 1. Data distribution is continuous and independent

④ Assumption 2. Symmetry assumption about the data distribution

⑵ 1st. Assumptions

① N: Sample size

② Since there are N data in each of the two groups, there are a total of 2N data

③ Paired Comparison Assumption: x1,i and x2,i form a pair

④ H0: μ1 - μ2 = 0

⑤ H1: μ1 - μ2 ≠ 0, μ1 - μ2 > 0, or μ1 - μ2 < 0

⑶ 2nd. Calculate | x1,i - x2,i | and sgn(x1,i - x2,i)

⑷ 3rd. Remove pairs where | x1,i - x2,i | = 0 and define the new sample size as N*

⑸ 4th. Rearrange the absolute differences in increasing order and assign ranks

① In the case of data with the same values, assign a representative rank to those data collectively

⑹ 5th. Calculation of Test Statistic

① Method 1.


스크린샷 2025-04-27 오후 10 38 08


② Method 2.

○ w+: The sum of ranks of the data with positive differences

○ w-: The sum of ranks of the data with negative differences

○ ws = min(w+, w-)

○ Calculation of the statistic


스크린샷 2025-04-27 오후 10 38 58


③ N* should be 10 or more

⑺ 6th. Statistical Testing

⑻ R code


before <- c(25, 30, 35, 40, 45)
after <- c(20, 25, 30, 35, 40)
wilcox.test(before, after, paired = TRUE)



Entered: 2021.05.10 09:13

results matching ""

    No results matching ""