if i have 10 pairs of values but the range of the values is very narrow - values are 2 or 3. is it ok to calculate spearman correlation for this? for example:
2 3
2 2
3 3
2 3
2 2
3 3
3 3
3 2
if i have 10 pairs of values but the range of the values is very narrow - values are 2 or 3. is it ok to calculate spearman correlation for this? for example:
2 3
2 2
3 3
2 3
2 2
3 3
3 3
3 2
Because Spearman's correlation uses ranks, it tends to work best if there are few ties. (In the example you just posted, the number of ties seems excessive. It is not clear what you'd mean by 'correlation'.)
The numeric span from smallest to largest is not important. Multiplying both x and y by 100 would not change the Spearman correlation.
Consider my example for continuous data (no ties) and then for rounded data with a moderate number of ties.
set.seed(1124)
x = rnorm(20, 50, 2)
e = rnorm(20, 0, 2)
y = x + e
cor(x,y, meth="s")
[1] 0.7789474
X = round(x)
Y = round(y)
cor(X,Y, meth="s")
[1] 0.7097657 # smaller Spearman corr for rounded data
par(mfrow=c(1,2))
plot(x,y, pch=20, main="Original")
plot(X,Y, pch=20, main="Rounded")
par(mfrow=c(1,1))
Addendum for your data (if I copied them correctly):
cor(c(2,2,3,2,2,3,3,3), c(3,2,3,3,2,3,3,2), meth="s")
[1] 0.2581989