Rank correlation is when two variables are ranked the change in one shows the same/positive/negative change in another rank when we measure it across two points. Don’t worry if you still don’t understand, we will find Kendall rank correlation using below dataset.
We are trying to see if there is any correlation if size of engine increases will it affect the price of the car.
You can download dataset here
For Kendall rank correlation we need to arrange our dataset to ascending order as shown below.
Now let’s give rank based on ascending order, for example for Engine size we have two observations with 108 which is the least value so for the both the observations we ranked as 1 and so on for remaining observations and in the same way we will do it for price.
Now find the difference of the rank and square it.
As per spearman rank correlation engine size and price has 55% correlation