Nonparametric Statistics Notes Chapter 5: Some Methods Based on Ranks Jesse Crawford Department of Mathematics Tarleton State University (Tarleton State University) Ch 5: Some Methods Based on Ranks 1 / 17
Outline 1 Section 5.1: Two Independent Samples 2 Section 5.2: Several Independent Samples 3 Section 5.7: Matched Pairs 4 Section 5.4: Measures of Rank Correlation 5 Assessing Normality with QQ-Plots and Hypothesis Tests (Tarleton State University) Ch 5: Some Methods Based on Ranks 2 / 17
The Mann-Whitney-Wilcoxon Test Assumptions Random sample X1,..., X n from Population 1 Random sample Y1,..., Y m from Population 2 Samples are statistically independent of each other Measurement scale is at least ordinal H 0 : The probability distributions for populations 1 and 2 are identical. Rank all observations Rank 1 = smallest Rank n + m = largest. R(X i ) = rank of X i R(Yj ) = rank of Y j Test statistic: T = n i=1 R(X i) (Tarleton State University) Ch 5: Some Methods Based on Ranks 3 / 17
The Mann-Whitney-Wilcoxon Test Test statistic: T = n i=1 R(X i) T 1 = nm N(N 1) T n N+1 N i=1 R2 i Exact distribution of T can be found. Asymptotically, T 1 N(0, 1) 2 nm(n+1)2 4(N 1) Alternative test statistic: W = n i=1 R(X i) n(n+1) 2 (Tarleton State University) Ch 5: Some Methods Based on Ranks 4 / 17
Outline 1 Section 5.1: Two Independent Samples 2 Section 5.2: Several Independent Samples 3 Section 5.7: Matched Pairs 4 Section 5.4: Measures of Rank Correlation 5 Assessing Normality with QQ-Plots and Hypothesis Tests (Tarleton State University) Ch 5: Some Methods Based on Ranks 5 / 17
The Kruskal-Wallis Test Assumptions Random sample X 11,..., X 1n1 from Population 1 Random sample X 21,..., X 2n1 from Population 2. Random sample X k1,..., X knk from Population k Samples are statistically independent of each other Measurement scale is at least ordinal H 0 : The probability distributions for all k populations are identical. (Tarleton State University) Ch 5: Some Methods Based on Ranks 6 / 17
Outline 1 Section 5.1: Two Independent Samples 2 Section 5.2: Several Independent Samples 3 Section 5.7: Matched Pairs 4 Section 5.4: Measures of Rank Correlation 5 Assessing Normality with QQ-Plots and Hypothesis Tests (Tarleton State University) Ch 5: Some Methods Based on Ranks 7 / 17
The Wilcoxon Signed Ranks Test Random sample of pairs: (X 1, Y 1 ),..., (X n, Y n ). H 0 : E(X i ) = E(Y i ) Discard ties (X i = Y i ). Now we have: (X 1, Y 1 ),..., (X n, Y n ). D i = Y i X i Assumptions: Distribution of each D i is symmetric The D i s are statistically independent and have the same mean. Rank all pairs from 1 to n based on absolute differences D i. Ri = Rank assigned to D i, if D i > 0 R i = (Rank assigned to D i ), if D i < 0 Test statistic: T + = (R i D i > 0) (Tarleton State University) Ch 5: Some Methods Based on Ranks 8 / 17
Outline 1 Section 5.1: Two Independent Samples 2 Section 5.2: Several Independent Samples 3 Section 5.7: Matched Pairs 4 Section 5.4: Measures of Rank Correlation 5 Assessing Normality with QQ-Plots and Hypothesis Tests (Tarleton State University) Ch 5: Some Methods Based on Ranks 9 / 17
Pearson s Correlation Coefficient Definition Consider a random sample of ordered pairs (X 1, Y 1 ),..., (X n, Y n ). Pearson s correlation coefficient is 1 r 1 n i=1 r = (X i X)(Y i Y ) n i=1 (X i X) 2. n i=1 (Y i Y ) 2 Values of r near 1 suggest a strong positive relationship. Values of r near 1 suggest a strong negative relationship. Values of r near 0 suggest a weak or nonlinear relationship. (Tarleton State University) Ch 5: Some Methods Based on Ranks 10 / 17
Pearson s Correlation Coefficient Definition Consider a random sample of ordered pairs (X 1, Y 1 ),..., (X n, Y n ). Pearson s correlation coefficient is 1 r 1 n i=1 r = X iy i nx Y ( n i=1 X i 2 nx 2 )(. n i=1 Y i 2 ny 2 ) Values of r near 1 suggest a strong positive relationship. Values of r near 1 suggest a strong negative relationship. Values of r near 0 suggest a weak or nonlinear relationship. (Tarleton State University) Ch 5: Some Methods Based on Ranks 11 / 17
Strong Positive Correlation (Tarleton State University) Ch 5: Some Methods Based on Ranks 12 / 17
Strong Negative Correlation (Tarleton State University) Ch 5: Some Methods Based on Ranks 13 / 17
Virtually No Correlation (Tarleton State University) Ch 5: Some Methods Based on Ranks 14 / 17
Spearman s Correlation Coefficient Definition Consider a random sample of ordered pairs (X 1, Y 1 ),..., (X n, Y n ). R(X i ) is the rank of X i among X 1,..., X n. R(Y i ) is the rank of Y i among Y 1,..., Y n. Spearman s correlation coefficient = Pearson s coefficient applied to the ranks. ρ = n i=1 R(X i)r(y i ) n( n+1 2 )2 ( n i=1 R(X i) 2 n( n+1 2 )2) ( n i=1 R(Y i) 2 n( n+1 2 )2). 1 ρ 1 Values of ρ near 1 suggest a strong positive relationship. Values of ρ near 1 suggest a strong negative relationship. Values of ρ near 0 suggest a weak or nonlinear relationship. (Tarleton State University) Ch 5: Some Methods Based on Ranks 15 / 17
Outline 1 Section 5.1: Two Independent Samples 2 Section 5.2: Several Independent Samples 3 Section 5.7: Matched Pairs 4 Section 5.4: Measures of Rank Correlation 5 Assessing Normality with QQ-Plots and Hypothesis Tests (Tarleton State University) Ch 5: Some Methods Based on Ranks 16 / 17
Quantile-Quantile Plots R Command: qqnorm (Tarleton State University) Ch 5: Some Methods Based on Ranks 17 / 17