Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spearman’s Rank Correlation

Similar presentations


Presentation on theme: "Spearman’s Rank Correlation"— Presentation transcript:

1 Spearman’s Rank Correlation
:1, 1, 3

2 Spearman’s Rank Correlation Coefficient
Measures correlation between ranks Corresponds to Pearson product moment correlation coefficient Values range from –1 to +1 Formula (shortcut) di = ui – vi (difference in ranks of ith observation for samples 1 and 2) n = number of pairs of observations

3 Spearman’s Rank Correlation Procedure
Assign ranks, Ri , to the observations of each variable separately Calculate differences, di , between each pair of ranks Square differences, di2, between ranks Sum squared differences for each variable Use shortcut approximation formula

4 Spearman’s Rank Correlation Example
You’re a research assistant for the FBI. You’re investigating the relationship between a person’s attempts at deception and percent changes in their pupil size. You ask subjects a series of questions, some of which they must answer dishonestly. At the .05 level of significance, what is the correlation coefficient? Subj. Deception Pupil size 112

5 Spearman’s Rank Correlation Table
2 Subj. Decep. R1i Pupil R2i di di 1 87 10 2 63 6 3 95 11 4 50 7 5 43 4 4 1 -1 1 2 3 2 5 5 2 3 1 1 Σdi2=

6 Spearman’s Rank Correlation Solution

7 Correlation using Rstudio
Hours, x 1 2 3 5 6 7 10 Test score, y 96 85 82 74 95 68 76 84 58 65 75 50 x<- c(0, 1, 2, 3, 3, 5, 5, 5, 6, 7, 7, 10) y<- c(96, 85, 82, 74, 95, 68, 76, 84, 58, 65, 75, 50) cor(x,y) [1] cor.test(x,y) data: x and y t = , df = 10, p-value = alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: sample estimates: cor

8 Plot X and Y using Rstudio
Hours, x 1 2 3 5 6 7 10 Test score, y 96 85 82 74 95 68 76 84 58 65 75 50 x<- c(0, 1, 2, 3, 3, 5, 5, 5, 6, 7, 7, 10) y<- c(96, 85, 82, 74, 95, 68, 76, 84, 58, 65, 75, 50) cor(x,y) [1] cor.test(x,y) data: x and y t = , df = 10, p-value = alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: sample estimates: cor

9 cor(x, y = NULL, use = "everything",
method = c("pearson", "kendall", "spearman")) Dec<-c(87,63,95,50,43) Pup<-c(10,6,11,7,0) Data<-data.frame(cbind(Dec, Pup)) cor(Dec, Pup, method="spearman")


Download ppt "Spearman’s Rank Correlation"

Similar presentations


Ads by Google