MATH 476 — Statistics

Nonparametric Methods
Wackerly et al. Ch. 15
Project Presentations on April 20–22
Monday, May 4, 8:00 AM, in PH 108
Comprehensive Final Exam

Fred J. Hickernell

May 19, 2026

Why nonparametric methods?

  • Our inferences thus far relied on assumptions about the distribution of the data through models involving unknown parameters (e.g., mean, variance):
    • Confidence intervals for means and variances assuming Bernoulli, exponential, normal, etc.
    • Hypothesis tests for means and variances assuming Bernoulli, exponential, normal, etc.
    • If the distribution is unknown, we have relied on the CLT and large \(n\) to justify normal approximations
    • Regression models assuming that the response follows a prescribed distribution (e.g., normal, binomial) with parameters to be inferred

When parametric assumptions are questionable

  • Data are skewed?
  • Outliers are present?
  • Only ordering is trustworthy?

Key idea

Replace raw data by simpler summaries such as

  • signs
  • ranks
Advantages Disadvantages
Fewer assumptions
Robustness
Loss of efficiency if parametric assumptions hold exactly

Roadmap

Setting Parametric Nonparametric
Matched pairs Paired t-test Sign, Wilcoxon signed-rank
Two samples Two-sample t-test Mann–Whitney
\(m\) groups One-way ANOVA Kruskal–Wallis

Matched-pairs data

  • Observations come in pairs: \((X_1,Y_1), \dots, (X_n,Y_n)\)

  • Define differences: \(D_i = X_i - Y_i\)

  • Parametric approach: paired \(t\)-test uses \(\barD\) and \(S_D\) to make inferences under the assumption that the \(D_i\) are IID normal

  • Nonparametric approach uses signs or ranks of \(D_i\)

Sign tests

\(H_0: \Prob(D > 0) = \frac{1}{2}\) versus \(H_A: \Prob(D > 0) \neq \frac{1}{2}\)

  • Let \(S = \#\{D_i > 0\}\)

  • After removing zeros, if \(n'\) is the number of nonzero differences, then under \(H_0\), \(S \sim \Bin(n', 1/2)\)

Test procedure:

  1. Compute \(D_i = X_i - Y_i\)
  2. Remove zeros
  3. Compute \(s = \#\{d_i > 0\}\)
  4. Compute \(p = 2 \times \min\bigl(P(S \le s), P(S \ge s)\bigr)\)
  5. Reject \(H_0\) if \(p < \alpha\)

Example

Differences: \(d = [2.3, -3.4, 0, 5.1, 2.1, 3.6]\)

  • Remove zero \(\to n' = 5\)
  • Signs: \(+,-,+,+,+\)
  • Thus, \(s=4\)

\[\begin{align*} p &= 2 \times \min\bigl(\Prob(S \le 4), \Prob(S \ge 4)\bigr) \\ &= 2 \times \Prob(S \ge 4) \\ &= 2 \times \left[\binom{5}{4} + \binom{5}{5}\right]\left(\frac12\right)^5 \\ &= 2 \times (5+1)\times \frac{1}{32} = \frac{12}{32} = \frac{3}{8} = 0.375 \end{align*}\]

  • Do not reject \(H_0\) at \(\alpha = 0.05\)

Wilcoxon signed-rank test

This test uses not only the signs of the differences,

But also the relative sizes of the nonzero differences through their ranks

Under \(H_0\), if the distribution of \(D\) is symmetric about \(0\), the ranks receive random signs

  1. Compute \(D_i\)
  2. Remove zeros
  3. Rank \(|D_i|\)
  4. Compute \(\displaystyle W^+ = \sum_{i: D_i > 0} \rank(|D_i|), \quad W^- = \sum_{i: D_i < 0} \rank(|D_i|), \quad T = \min(W^+, W^-)\)

Under \(H_0\), the ranks receive random signs.

  • Small \(T\) = strong evidence against \(H_0\)
  • Use a table or software to compute the \(p\)-value
  • Reject \(H_0\) if \(p < \alpha\)

Example

Differences: \(d = [2.3, -3.4, 0, 5.1, 2.1, 3.6]\)

  • Remove zero \(\to d = [2.3,-3.4,5.1,2.1,3.6]\)
  • So \(n' = 5\)
  • Absolute values: \(|d| = [2.3,3.4,5.1,2.1,3.6]\)
  • Ranks of \(|d|\): \([2,3,5,1,4]\)

Let \(w^+, w^-, t\) denote the observed values of \(W^+, W^-, T\)

  • \(w^+ = 2 + 5 + 1 + 4 = 12\)

  • \(w^- = 3\)

  • \(t = \min(w^+,w^-) = 3\)

  • \[\begin{align*} p & = \Prob(W^+ \le 3) + \Prob(W^+ \ge 12) \\ & = 0.15625 + 0.15625 = 0.3125 \end{align*}\]

 

W Count Probability CDF
0 1 0.03125 0.03125
1 1 0.03125 0.06250
2 1 0.03125 0.09375
3 2 0.06250 0.15625
4 2 0.06250 0.21875
5 3 0.09375 0.31250
6 3 0.09375 0.40625
7 3 0.09375 0.50000
8 3 0.09375 0.59375
9 3 0.09375 0.68750
10 3 0.09375 0.78125
11 2 0.06250 0.84375
12 2 0.06250 0.90625
13 1 0.03125 0.93750
14 1 0.03125 0.96875
15 1 0.03125 1.00000

\(\exstar\) What would the outcome be for \(H_A: \Prob(D > 0) > \frac{1}{2}\) instead of \(H_A: \Prob(D > 0) \neq \frac{1}{2}\)?

\(\exstar\) How large does \(n\) need to be for there to be a chance of rejecting \(H_0\) at \(\alpha = 0.05\)?

\(\exstar\) Construct an example where the sign test fails to reject \(H_0\), but the Wilcoxon signed-rank test does reject \(H_0\) at \(\alpha = 0.05\)

Two independent samples

  • Data from different populations: \(X_1,\dots,X_{n_1}\) and \(Y_1,\dots,Y_{n_2}\)

  • Are the populations similar? \(H_0\): same distribution

  • Parametric approach:

    • Two-sample \(t\)-test for means
    • \(F\)-test for variances
    • Assumes normality (or large \(n\) via CLT)
  • But what if:

    • Distributions are skewed?
    • Outliers are present?
    • Variances differ?

Mann–Whitney test

Key idea

  • Pool all observations
  • Rank them
  • Compare rank sums between groups

Interpretation

  • If the two populations are similar:
    • ranks should be “mixed”
  • If one population tends to have larger values:
    • its observations get larger ranks

Mann–Whitney test

  • Let \(R_X\) = sum of ranks for the \(X\) sample

  • Test statistic: \[ U = R_X - \frac{n_1(n_1+1)}{2} \qquad \text{how much larger than smallest possible?} \]

  • Under \(H_0\) (same distribution):

    • \(U\) has a known distribution (or normal approximation for large samples)
  • Reject \(H_0\) if \(U\) is too small or too large

More than two groups

  • Data: \(X_{ij}, \; i=1,\dots,n_j\), \(j=1,\dots,m\)

  • \(H_0\): same distribution for all \(m\) groups

  • Parametric: one-way ANOVA

  • Nonparametric: Kruskal–Wallis test

Kruskal–Wallis test

  • Pool all observations

  • Rank them

  • Compare rank sums across groups

  • Large differences in rank sums is evidence against \(H_0\)

Summary

  • Replace raw data with:
    • signs (sign test)
    • ranks (Wilcoxon, Mann–Whitney, Kruskal–Wallis)
  • Advantages:
    • Fewer assumptions
    • Robust to outliers and skewness
  • Tradeoff:
    • Less efficient if parametric assumptions hold exactly
«
»