# Weighting dataset by one of its fields

I'm looking at the Olympics medal count rankings, I've created a points system for medals (Gold - 3, Silver - 2, Bronze - 1). Could someone please tell me how I can weigh the resulting points by population of the countries, favouring smaller populations?

-

Sometimes, it's useful to think in terms of the units that you want.

The number of medals is an absolute unit: it simply tallies the number of medals for each nation. Whereas if you want to control for population, then you might want to look at medals per capita, which is another way of saying medals/person.

However, you could also do more tricks in the same way. You might want to look at medals per GDP in dollars (directly): medals/\\$GDP. Alternatively, maybe you feel that's not right, and what you really want is to normalize population numbers by GDP: $$\rm medals/person \cdot person/\GDP = medals/\GDP.$$

A useful trick is to note that units can be treated like variables: dividing by equivalent units "cancels them out" so to speak. So this is a way to approach your problem.

Formally, this is known as dimensional analysis, and if you're interested in the technique, you might want to look at the Buckingham Pi Theorem

-

Seems pretty simple. Why not just weigh inversely proportional to population size (i.e. divide the country's medal count points by its population)?

-
And if you don't like really tiny numbers, first multiply by, say, 100,000,000. –  Gerry Myerson Aug 8 '12 at 2:15
Yes Gerry it could be a scaled version of division by population size. –  Michael Chernick Aug 8 '12 at 3:39