I don’t watch the Olympics because Scotland isn’t allowed to compete as a nation. However, I did find this great site that ranks each country by the number of medals won per head of population. This is a much fairer ranking system than just totting up the medal score which obviously favours larger countries. The table below shows where Scotland would have finished in Rio (the UK without Scotland finished 24th).
Interesting that the top 4 countries are all former British colonies which are now independent.
Population per Medal