I have looked around and I'm not sure I've seen an appropriate answer though this questions is, I think, similar:
it does not answer my question - which more succinctly would be:
'How similar are two ranked lists, and, if similar, is this similarity greater than that which would occur by chance?'
I have two ranked lists, for example two lists of the most popular animals as pets in two towns:
town 1 = [dog, cat, possum, fish, pig, degu]
town 2 = [dog, cat, degu, fish, cow, goat]
In both towns, dogs and cats are the first and second most popular pets respectively, but possums are more popular than degus in town 1.
How might I show the correlation between the preferences in both towns.
I believe I need to use a rank correlation but I am not sure what values to compare.
My understanding is that I should make a list of all animals:
total = [dog, cat, possum, fish, pig, degu, cow, goat]
and then convert the town lists:
town 1 = [1, 2, 3, 4, 5, 6]
town 2 = [1, 2, 6, 4, 7, 8]
and perform a Spearmans correlation on these values, but I'm not sure if that is an accurate method.