440 likes | 638 Views
Stats 2022n. Non-Parametric Approaches to Data Chp 15.5 & Appendix E. Outline. A note on ordinal scales. An ordinal scale :. Example – Grades. A note on ordinal scales. Ordinal scales allow ranking. Example – Grades. Why use ordinal scales?. Some data is easier collected as ordinal.
E N D
Stats 2022n Non-Parametric Approaches to Data Chp 15.5& Appendix E
A note on ordinal scales • An ordinal scale : Example – Grades
A note on ordinal scales Ordinal scales allow ranking Example – Grades
Why use ordinal scales? • Some data is easier collected as ordinal
The case for ranking data • Ordinal data needs to be ranked before it can be tested (via non-parametric tests) • Transforming data through ranking can be a usefultool
The case for ranking data Ranking data (rank transform) can be a usefultool • If assumptions of a test are not (or cannot be) met… • Common if data has: • Non linear relationship … • Unequal variance… • High variance … • Data sometimes requires rank transformation for analysis
Rank Transformation What if ties?....
Ordinal Transformation Ranking Data, If Ties
Spearman Correlation • Only requirement – ability to rank order data • Data already ranked • Rank transformed data • Rank transform useful if relationship non-linear…
Spearman Correlation Example
Spearman Correlation Calculation
Spearman Correlation Calculation
Spearman Correlation Spearman Correlation Special Formula = = =
Spearman Correlation Spearman Correlation Special Formula v.s.
Hypothesis testing with spearman • Same process as Pearson • (still using table B.7)
Appendix E Mann - Whitney U-Test Wilcoxon signed-rank test Kruskal – Wallace Test Friedman Test
Mann - Whitney U-Test • Requirements • Hypotheses:
Mann - Whitney U-Test Illustration • Extreme difference due to conditions • Distributions of ranks unequal • No difference due to conditions • Distributions of ranks unequal
Mann - Whitney U-Test Example
Mann - Whitney U-Test Computing U by hand U=27
Mann - Whitney U-Test Computing U via formula RA = 73 RB= 63 U=27 = 8
Mann - Whitney U-Test Evaluating Significance with U H0: H1: U=27 alpha = 0.05, 2 tails, df(8,8) Critical value = 13 U > critical value, we fail to reject the null The ranks are equally distributed between samples
Mann - Whitney U-Test Write-Up The original scores were ranked ordered and a Mann-Whitney U-test was used to compare the ranks for the n = 8 participants in treatment A and the n = 8 participants in treatment B. The results indicate no significant difference between treatments, U = 27, p >.05, with the sum of the ranks equal to 27 for treatment A and 37 for treatment B.
Mann - Whitney U-Test Evaluating Significance Using Normal Approximation With n>20, the MW-U distribution tends to approximate a normal shape, and so, can be evaluated using a z-score statistic as an alternative to the MW-U table. U=27 = 8 Note: n not > 20!
Mann - Whitney U-Test Evaluating Significance Using Normal Approximation alpha = 0.05 2 tails Critical value: z = ± 1.96 -0.5251 is not in the critical region Fail to reject the null.
Wilcoxon signed-rank test • Requirements • Two related samples (repeated measure) • Rank ordered data • Hypotheses: • H0: • H1:
Wilcoxon signed-rank test n=10 alpha = .05 two tales critical value = 8 T obtained > critical value, fail to reject the null The difference scores are not systematically positive or systematically negative.
Wilcoxon signed-rank test Write up The 11 participants were rank ordered by the magnitude of their difference scores and a Wilcoxon T was used to evaluate the significance of the difference between treatments. One sample was removed due to having a zero difference score. The results indicate no significant difference, n = 10,T = 17, p <.05, with the positive ranks totaling 28 and the negative ranks totaling 17.
Wilcoxon signed-rank test A note on difference scores of zero N = 4 N = 5 N = 4
Wilcoxon signed-rank test Evaluating Significance Using Normal Approximation Note: n not > 20!
Wilcoxon signed-rank test Evaluating Significance Using Normal Approximation T = 17 alpha = 0.05 2 tails Critical value: z = ± 1.96 -0.21847 is not in the critical region Fail to reject the null.
Interim Summary Calculation of Mann-Whitney or Wilcoxon is fair game on test. When to use Mann-Whitney or Wilcoxon • If data is already ordinal or ranked • If assumptions of parametric test are not met
Kruskal – Wallace Test • Alternative to independent measures ANOVA • Expands Mann – Whitney • Requirements • Null –
Kruskal – Wallace Test • Rank ordered data (all conditions)
Kruskal – Wallace Test • For each treatment condition • n: n for each group • T: sum of ranks for each group • Overall • N: Total participants • Statistic identified with H • Distribution approximates same distribution as chi-squared (i.e. use the chi squared table)
Friedman Test • Alternative to repeated measures ANOVA • Expands Wilcoxon test • Requirements • Null
Friedman Test • Rank ordered data (within each participant)
Friedman Test • For each treatment condition • n: n for each group • r: sum of ranks for each condition • Overall • k: Total groups • Uses distribution for hypothesis testing. Chi square statistic for ranks.
Summary Ratio Data Ranked Data