Doping appears to be pervasive in sports. If one wants to fight it, it opens the question about what the optimal strategy is, where the strategy space is comprised of the test frequency and the penalty. It is quite obvious that test should not be predictable.
Dmitry Ryvkin approaches this question using winner-take-all contests. With low participant numbers, the larger the tournament, the more frequently players need to be tested. But starting from some threshold, the frequency can decease. The reason is that as more players join, the expected payoffs of dopers and non-dopers decrease, but the payoff of doping first increases and then decreases. This is based on the assumption that the expected payoff of winning decreases in the number of players (thus prestige of winning does not increase faster than the number of players).
In terms of penalty, players that are caught doping are excluded from the contest, no surprise, but are also subject to a small penalty. This is required because it enhances the effectiveness of testing by making the testing probability non-monotonic in the number of players. This seems a rather technical argument. But I surmise that making players risk averse instead of risk neutral would not make this additional penalty necessary.