Correcting the Spearman correlation for ties
Every time there is a tie, count the number of people with the same score, and call it t. Then calculate t3 – t. Add up all the t scores, for each variable, and call that t. We’ll call them tx for display, and ty for change in testosterone.
There is one tie for change in testosterone (y) – two people have scored 1.06, so t is 2.
We calculate t3 – t = 23 – 2 = 6, because this is the only tie, ty = 6.
For display behaviour, there are 4 sets of ties:
2 people scored 3.2; t3 – t = 6
2 people scored 3.6; t3 – t = 6
2 people scored 3.8; t3 – t = 6
3 people scored 4.6; t3 – t = 24
2 people scored 5.2; t3 – t = 6
tx = 6 + 6 + 24 + 6 = 42
Next we calculate T for each variable.

For change in testosterone, we calculate Tx

And for display behaviour:

Finally, we use a different version of the Spearman formula:

See, that was worth it wasn’t it?