I'm pretty sure I didn't vote for that!

WHEN Barack Obama won the American presidency in 2008 his supporters cheered, cried, hugged—and in many cases logged on to their computers to look at pornography. And, lest Republicans crow about the decadence of their opponents, precisely the obverse happened when their man won in 2004.

That, at least, is the conclusion of a study by Patrick Markey of Villanova University, in Pennsylvania, and his wife Charlotte, who works at Rutgers, in New Jersey. The Markeys were looking for confirmation of a phenomenon called the challenge hypothesis. This suggests that males involved in a competition will experience a rise in testosterone levels if they win, and a fall if they lose.

The challenge hypothesis was first advanced to explain the mating behaviour of monogamous birds. In these species, males' testosterone levels increase in the spring, to promote aggression against potential rivals. When the time comes for the males to settle down and help tend their young, their testosterone falls, along with their aggressive tendencies.

Something similar has since been found to apply to fish, lizards, ring-tailed lemurs, rhesus monkeys, chimpanzees—and humans. In many of these animals, though, there is a twist. It is not just that testosterone ramps up for breeding and ramps down for nurturing. Rather, its production is sensitive to a male's success in the breeding competition itself. In men, then, levels of the hormone rise in preparation for a challenge and go up even more if that challenge is successfully completed. Failure, by contrast, causes the level to fall.

Previous research has found these hormonal ups and downs in male wrestlers, martial artists, tennis players, chess players and even people playing a coin-flip game. In evolutionary terms, it makes sense. If a losing male continues to be aggressive, the chances are he will be seriously injured (it is unlikely natural selection could have foreseen competitive coin-tossing). Turning down his testosterone level helps ward off that risk. Conversely, the winner can afford to get really dominant, as the threat of retaliation has receded.

For most species, determining that this actually happens requires a lot of boring fieldwork. But the Markeys realised that in the case of people they could cut the tedium by asking what was going on in those parts of the web that provide a lot more traffic than their users will ever admit to, on the assumption that men fired up by testosterone have a greater appetite for pornography than those who are not.

To do this they first used a web service called WordTracker to identify the top ten search terms employed by people seeking pornography (“xvideos” was the politest among them). Then they asked a second service, Google Trends, to analyse how often those words were used in the week before and the week after an American election, broken down by state.

Their results, just published in Evolution and Human Behavior, were the same for all three of the elections they looked at—the 2004 and 2008 presidential contests, and the 2006 mid-terms (in which the Democrats made big gains in both houses of Congress). No matter which side won, searches for porn increased in states that had voted for the winners and decreased in those that had voted for the losers. The difference was not huge; it was a matter of one or two per cent. But it was consistent and statistically significant.

If the polls are right, then, next Tuesday's mid-term elections will see red faces in the red states for those furtive surfers who are caught in the act. In the blue states, meanwhile, a fit of the blues will mean the screens stay switched off.