Summary of Nonparametric Statistical Methods

Nonparametric Statistical Methods: A Student's Guide

Introduction

Nonparametric rank tests are statistical methods that use the relative ordering (ranks) of observations rather than their numerical values. They are useful when distributional assumptions (like normality) are doubtful, when data are ordinal, or when sample sizes are small. These tests typically require fewer assumptions than parametric tests and are often more robust to outliers and measurement scale issues.

Definition: A nonparametric rank test is a hypothesis test that compares groups by replacing observations with their ranks and using rank-based statistics to evaluate differences or trends.

Why use rank-based methods?

  • Fewer assumptions about the underlying population distribution (often only continuity).
  • Applicable to ordinal data and to interval/ratio data when normality is questionable.
  • Robust to outliers and heteroscedasticity.
  • Simple computations based on ranks make interpretation intuitive.
💡 Did you know?Fun fact: Rank tests such as the Wilcoxon and Kruskal-Wallis tests were developed to provide robust alternatives to the t-test and ANOVA when normality cannot be assumed.

Basic concepts and notation

  • Let $N$ be the total sample size and $s$ the number of treatment groups.
  • When ranking, assign rank 1 to the smallest observation and rank $N$ to the largest; handle ties by assigning midranks.
  • Replace original data values by their ranks $R_i$ and compute statistics based on rank sums or pairwise comparisons.

Definition: A midrank for tied observations is the average of the ranks that those tied observations would occupy if they were slightly different.

Paired data and sign-based rank methods

Paired t-test vs. nonparametric alternative

  • Parametric paired t-test assumes differences are normally distributed.
  • Nonparametric paired alternative: Wilcoxon signed-rank test, which ranks the absolute differences and uses signed ranks to test $H_0:\mu_d=0$.

Example: Blood pressure before and after surgery for 5 patients gave differences $20, 5, -6, -7, 32$. Normality of differences was questionable, so a signed-rank test is a suitable nonparametric option.

Two-sample rank tests

Wilcoxon rank-sum / Mann-Whitney U test

  • Tests whether two independent samples come from populations with the same distribution or shifted location.
  • Based on ranks of combined samples; large values of the rank-sum of one group suggest larger outcomes.

Definition: The Mann-Whitney $U$ (or Wilcoxon rank-sum) statistic counts pairwise wins between groups or equivalently is a function of the sum of ranks in one group.

When to use exact vs. approximate p-values

  • Use exact distributions (permutation or exact tables) for small samples or many ties.
  • Use normal approximation for large samples with continuity correction.

More than two groups: Kruskal-Wallis test

  • Nonparametric analogue of one-way ANOVA.
  • Null hypothesis $H_0$: all groups have the same distribution.
  • Test statistic based on differences among average ranks of groups.

Example: Three rat diets A, B, C with 5 rats each. Ranks across all rats lead to group rank-sums and a Kruskal-Wallis statistic to test equality of distributions.

Interpretation and post-hoc

  • Significant Kruskal-Wallis indicates at least one group differs but does not specify which pairs. Use pairwise rank-sum comparisons with multiplicity correction.

Ordered alternatives: Jonckheere-Terpstra test

  • Use when treatments have a natural order (e.g., doses) and the alternative is ordered (monotone trend).
  • Test statistic $W=\sum_{i<j} W_{ij}$, where $W_{ij}$ counts pairs with $X_i<X_j$ between treatments $i$ and $j$.

Definition: The Jonckheere-Terpstra statistic $J$ is often defined as $J=2W-\sum_{i<j} n_i n_j$ to center it around zero.

  • For large $N$ use normal approximation with

$$E_{H_0}(W)=\frac{1}{2}\sum_{i<j} n_i n_j=\frac{N^2-\sum_i n_i^2}{4}$$

and

$$\operatorname{Var}_{H_0}(W)=\frac{N^2(2N+3)-\sum_i n_i^2(2n_i+3)}{72}.$$

Use special formulas w

Sign up for the full summary
FlashcardsKnowledge testSummaryPodcastMindmap
Start for free

Already have an account? Sign in

Nonparametric rank tests

Klíčové pojmy: Rank tests replace data by ranks and require fewer distributional assumptions, Wilcoxon signed-rank test is for paired data testing median differences, Mann-Whitney / Wilcoxon rank-sum compares two independent samples via combined ranks, Kruskal-Wallis tests equality across more than two groups using rank sums, Jonckheere-Terpstra detects ordered trends across treatments using pairwise wins $W_{ij}$, Friedman test analyzes randomized complete block designs using ranks within blocks, Aligned ranks subtract block location then rank residuals to improve sensitivity, Use exact p-values or permutation tests for small samples or many ties, Handle ties using midranks and adjust variance formulas accordingly, Pre-specify ordered alternatives to preserve test validity, Blocking reduces within-treatment variability and increases power, R functions: kruskal.test, JT.test, wilcox.exact, coin::kruskal_test

## Introduction Nonparametric rank tests are statistical methods that use the relative ordering (ranks) of observations rather than their numerical values. They are useful when distributional assumptions (like normality) are doubtful, when data are ordinal, or when sample sizes are small. These tests typically require fewer assumptions than parametric tests and are often more robust to outliers and measurement scale issues. > Definition: A nonparametric rank test is a hypothesis test that compares groups by replacing observations with their ranks and using rank-based statistics to evaluate differences or trends. ## Why use rank-based methods? - Fewer assumptions about the underlying population distribution (often only continuity). - Applicable to ordinal data and to interval/ratio data when normality is questionable. - Robust to outliers and heteroscedasticity. - Simple computations based on ranks make interpretation intuitive. Fun fact: Rank tests such as the Wilcoxon and Kruskal-Wallis tests were developed to provide robust alternatives to the t-test and ANOVA when normality cannot be assumed. ## Basic concepts and notation - Let $N$ be the total sample size and $s$ the number of treatment groups. - When ranking, assign rank 1 to the smallest observation and rank $N$ to the largest; handle ties by assigning midranks. - Replace original data values by their ranks $R_i$ and compute statistics based on rank sums or pairwise comparisons. > Definition: A midrank for tied observations is the average of the ranks that those tied observations would occupy if they were slightly different. ## Paired data and sign-based rank methods ### Paired t-test vs. nonparametric alternative - Parametric paired t-test assumes differences are normally distributed. - Nonparametric paired alternative: **Wilcoxon signed-rank test**, which ranks the absolute differences and uses signed ranks to test $H_0:\mu_d=0$. Example: Blood pressure before and after surgery for 5 patients gave differences $20, 5, -6, -7, 32$. Normality of differences was questionable, so a signed-rank test is a suitable nonparametric option. ## Two-sample rank tests ### Wilcoxon rank-sum / Mann-Whitney U test - Tests whether two independent samples come from populations with the same distribution or shifted location. - Based on ranks of combined samples; large values of the rank-sum of one group suggest larger outcomes. > Definition: The Mann-Whitney $U$ (or Wilcoxon rank-sum) statistic counts pairwise wins between groups or equivalently is a function of the sum of ranks in one group. ### When to use exact vs. approximate p-values - Use exact distributions (permutation or exact tables) for small samples or many ties. - Use normal approximation for large samples with continuity correction. ## More than two groups: Kruskal-Wallis test - Nonparametric analogue of one-way ANOVA. - Null hypothesis $H_0$: all groups have the same distribution. - Test statistic based on differences among average ranks of groups. Example: Three rat diets A, B, C with 5 rats each. Ranks across all rats lead to group rank-sums and a Kruskal-Wallis statistic to test equality of distributions. ### Interpretation and post-hoc - Significant Kruskal-Wallis indicates at least one group differs but does not specify which pairs. Use pairwise rank-sum comparisons with multiplicity correction. ## Ordered alternatives: Jonckheere-Terpstra test - Use when treatments have a natural order (e.g., doses) and the alternative is ordered (monotone trend). - Test statistic $W=\sum_{i<j} W_{ij}$, where $W_{ij}$ counts pairs with $X_i<X_j$ between treatments $i$ and $j$. > Definition: The Jonckheere-Terpstra statistic $J$ is often defined as $J=2W-\sum_{i<j} n_i n_j$ to center it around zero. - For large $N$ use normal approximation with $$E_{H_0}(W)=\frac{1}{2}\sum_{i<j} n_i n_j=\frac{N^2-\sum_i n_i^2}{4}$$ and $$\operatorname{Var}_{H_0}(W)=\frac{N^2(2N+3)-\sum_i n_i^2(2n_i+3)}{72}.$$ Use special formulas w