ordinal data
DESCRIPTION
Ordinal Data. Ordinal Tests. Non-parametric tests No assumptions about the shape of the distribution Useful When: Scores are ranks Violated assumptions There are outliers. Frequently Used Ordinal Tests. Spearman’s Rank Correlation Coefficient (Chapter 16) Mann-Whitney U-test - PowerPoint PPT PresentationTRANSCRIPT
Ordinal DataOrdinal Data
Ordinal TestsOrdinal Tests
Non-parametric testsNon-parametric tests No assumptions about the shape of No assumptions about the shape of
the distributionthe distribution Useful When: Useful When:
– Scores are ranksScores are ranks– Violated assumptionsViolated assumptions– There are outliersThere are outliers
Frequently Used Ordinal Frequently Used Ordinal TestsTests
1.1. Spearman’s Rank Correlation Spearman’s Rank Correlation Coefficient (Chapter 16)Coefficient (Chapter 16)
2.2. Mann-Whitney U-test Mann-Whitney U-test
3.3. Wilcoxon Signed Rank TestWilcoxon Signed Rank Test
4.4. Kruskal Wallis Kruskal Wallis HH-Test-Test
5.5. Friedman testFriedman test
Spearman’s Rank Spearman’s Rank Correlation Coefficient (rCorrelation Coefficient (rss))
Designed to measure the relationship Designed to measure the relationship between variables measured on an between variables measured on an ordinal scale of measurementordinal scale of measurement
Alternative to Pearson correlationAlternative to Pearson correlation– Treatment of ordinal dataTreatment of ordinal data– Good even if data is interval or ratioGood even if data is interval or ratio– Spearman can be used for nonlinear Spearman can be used for nonlinear
relationshipsrelationships
Spearman’s Rank Spearman’s Rank Correlation Coefficient (rs)Correlation Coefficient (rs)
yx
sSSSS
SPr
Alternative FormulaAlternative Formula
2
2
61
( 1)i
s
dr
n n
2
2
61
( 1)i
s
dr
n n
where: where: nn = number of items being ranked = number of items being ranked dd = = difference between the X rank and Y difference between the X rank and Y
rank for each individualrank for each individual
ExampleExample
X Y
7 19
2 4
11 34
15 28
32 104
Original Data
XRank
X YRank
Y
7 2 19 2
2 1 4 1
11 3 34 4
15 4 28 3
32 5 104 5
Mann-Whitney U-testMann-Whitney U-test When to use:When to use:
– Two independent samples in your Two independent samples in your experimentexperiment
Data have only ordinal properties (e.g. Data have only ordinal properties (e.g. rating scale data) rating scale data) OROR there is some other there is some other problem with the data problem with the data
–Non-normalityNon-normality
–Non-homogeneity of varianceNon-homogeneity of variance
Ranked DataRanked Data
The Test ProcedureThe Test Procedure
We compute two “U” values (UA and UB) based on the sum of the ranks for each sample
AAA
BAA Rnn
nnU
2
)1(
BBB
BAB Rnn
nnU
2
)1(
Where: nA = number in sample A nB = number in sample BRA = sum of ranks group ARB = sum of ranks group B
Worked Out ExampleWorked Out ExampleSpecies A Species B
7 24
9 19
14 21
20 26
16 21
18 29
10 13
22 28
25 32
13 17
DV: amount of food consumed
nA: 10
nB: 10
Calculate UCalculate UAA and U and UBB
AAA
BAA Rnn
nnU
2
)1(
Calculate UCalculate UAA and U and UBB
BBB
BAB Rnn
nnU
2
)1(
Wilcoxon Signed Ranks TestWilcoxon Signed Ranks Test
Each participant observed twice
Compute difference scores
Analogous to related samples t-test
Preliminary Steps of the TestPreliminary Steps of the Test
Rank difference scores
Compute sum of ranks of “+” and “-” difference scores separately
If tied differences, use tied ranks
Preliminary Steps of the TestPreliminary Steps of the Test
If difference is 0: – ignore and reduce n– do not discard
Compromise: if there’s only one difference Compromise: if there’s only one difference score of 0, then we discard it. score of 0, then we discard it. – If there’s more than one, we divide them evenly If there’s more than one, we divide them evenly
into positive and negative ranks. It doesn’t into positive and negative ranks. It doesn’t matter which is which, because they’re all 0. matter which is which, because they’re all 0.
– If you have an odd number of 0 differences, then If you have an odd number of 0 differences, then discard one, and divide the rest evenly into discard one, and divide the rest evenly into positive and negative ranks. positive and negative ranks.
The smaller sum is denoted as TThe smaller sum is denoted as T
T = smaller of TT = smaller of T+ + and Tand T--
If Ho true, sum of “+” and “-” ranks approx. equal
ExampleExample
Participant Before After
1 2.1 2.2
2 3.9 2.8
3 3.8 2.5
4 2.5 2.6
5 2.4 1.9
6 3.6 1.8
7 3.4 2
8 2.4 1.6
Is there enough evidence to conclude that there is a difference in headache hours before and after the new drug?
= 0.01
Kruskal-Wallis TestKruskal-Wallis Test
Used to test for differences between three or more Used to test for differences between three or more treatment conditions from an independent treatment conditions from an independent measures designmeasures design
Analogous to the one-way independent measures Analogous to the one-way independent measures ANOVA ANOVA EXCEPT EXCEPT data consist of ranksdata consist of ranks
Does not require the assumption of normally Does not require the assumption of normally distributed populationsdistributed populations
Ri, is the sum of ranks for each groupN is the total sample sizeni is the sample size of the particular group
Friedman TestFriedman Test A nonparametric test invented by Milton A nonparametric test invented by Milton
Friedman (the Nobel prize winning Friedman (the Nobel prize winning economist)economist)
Used to test for differences between three or Used to test for differences between three or more treatment conditions from an dependent more treatment conditions from an dependent measures designmeasures design
Analogous to the one-way repeated Analogous to the one-way repeated measures ANOVA measures ANOVA EXCEPT EXCEPT data consist of data consist of ranksranks
Follows the Follows the 22 distribution when we have at distribution when we have at least 10 scores in each of the 3 columns or at least 10 scores in each of the 3 columns or at least 5 scores in each of 4 columnsleast 5 scores in each of 4 columns
July 31, 1912 – November 16, 2006
Friedman TestFriedman Test
There are specific tables for Friedman’s test statistic for There are specific tables for Friedman’s test statistic for up to k=5 variablesup to k=5 variables
Otherwise use chi-square tables because Fr is Otherwise use chi-square tables because Fr is distributed approximately as chi-square with df= k-1distributed approximately as chi-square with df= k-1
If If 22FF>= the tabled value for df =k-1, then the result is >= the tabled value for df =k-1, then the result is
significant, and we can say the difference in total ranks significant, and we can say the difference in total ranks between the k conditions is not due to chance variationbetween the k conditions is not due to chance variation
)1(3)1(
12
1
22
kNRkNk
k
jjF
Summary Table: Parametric Tests & Summary Table: Parametric Tests & Their Non-Parametric CounterpartsTheir Non-Parametric Counterparts
Parametric Test Non-Parametric Test
Independent Samples t-test Mann-Whitney U Test
Related Samples
t-test
Wilcoxon Signed Rank Test
One Way Between Subjects ANOVA
Kruskal-Wallis Test
One Way Repeated Subjects ANOVA
Friedman Test
Pearson Correlation Spearman Rank-Order Correlation