Who's the Best?

How might the population size of a nation affect its chances of winning a medal?
What about the wealth of a nation?