# Which statistical test to use: 1000 pairs of ordinals

#### sevenquid

##### New Member
Hello,

I have a table of approximately 1000 pairs of values.
x is an integer between 0 and 365, representing birthday
y is an integer between 1 and 4, being a measure of achievement.

I am investigating whether there is positive correlation between x and y.

I am not sure which test to use. I have considered:
Pearson's correlation coefficient (but my variables are not bivariate normal)
Spearman's rank correlation coefficient (looks promising)
Kendall's rank correlation coefficient (but variable y has a large number of tied ranks)

I have managed to conduct a Chi-squared test for association between x and y (association was not significant), but that's not really what I want - I want to test for positive correlation.

Spearman's is tempting, so I entered the following code:
Code:
cor.test(x, y, alternative = "greater", method = "spearman")
This gives rho = 0.07359, p-value = 0.009817. This seems like a significant result, but I get a Warning: "Cannot compute exact p-value with ties" so I don't know whether to trust it or not.

Is there another test that I should be using? Or can I trust this p-value and conclude that there is a significant positive correlation?

Hope you can help. Thank you - it's much appreciated.

Last edited:

#### consuli

##### Member
This gives rho = 0.07359, p-value = 0.009817. This seems like a significant result, but I get a Warning: "Cannot compute exact p-value with ties" so I don't know whether to trust it or not.
The warning appears because one or more outcomes of at least one variable are not unique, meaning there are value dublicates.

If you can trust the computed p-value or not depends from how many dublicated values there are.

#### sevenquid

##### New Member
I have solved this.
I have effectively generated my own critical value by randomly generating 10000 datasets with the same structure as my own dataset.

I found there was >0.07 correlation on only 1.34% of occasions. I.e, a correlation coefficient at least as extreme as 0.07 is sufficiently unlikely to occur by chance for me to reject the null hypothesis; at the 5% significance level there is evidence my dataset is positively correlated.