[Note: A small error in the original posted tables has been corrected.]
G = Gold; S = Silver; B = Bronze; SUM = All Medals.
The 'ACTUAL RANKING' is the ranking by raw medal count, the usual way.
'ADJUSTED' is the population adjusted ranking.
'DIFFERENCE' is the ranking by the difference between 'ACTUAL RANKING' and 'ADJUSTED' ranking.
Ties are given the same value.
The table is sorted by the average of all the difference rankings, i.e. by a measure of how much a better a country did in overall ranking compared to what would be expected given its population.
As you can see, by this measure (which to me is much more rational than raw medal count) the countries that did the best are Jamaica, Croatia, and New Zealand. Canada is 8th. The United States and China are big fat losers, 19th and 20th respectively once we adjust for the huge pool of talent they had to draw from.