In: Statistics and Probability
pl use r studio to do that
What is the most appropriate analysis to perform on the following data?
x<-c(8.1, 9.4, 9.9, 9.6, 10.7, 10.2, 10.4, 13.6, 15.5, 17.8)
Y<-c(7.3, 8.6, 9.9, 9.6, 9.3, 9.2, 10.9, 10.7, 11.4, 16.1)
Determine Spearman’s Rho coefficient (2dp) for the following data.
x<-c(56,56,65,65,50,25,87,44,35)
y<-c(87,91,85,91,75,28,122,66,58)
Sol:
Rcode is
x<-c(56,56,65,65,50,25,87,44,35)
y<-c(87,91,85,91,75,28,122,66,58)
cor(x,y,method="spearman")
Output:
0.9114005
spearman Rho coefficient=rho=0.9114005
there exists a strong positive relationship between x and y as x increases y increases and viceversa