As you know, 74 people were killed this Wednesday when Egyptian soccer fans stampeded into a bottleneck after a 3-1 hometown upset win. While certainly tragic, it’s far from irrational: it turns out the behavioral economics were stacked against them.

Take the link between football and domestic violence. In2011 economists Gordon Dahl and David Card showed that when a home team loses, domestic violence in the home city increases by 10- percent. On police reports, you can see reports start to rise in the final quarter as a loss looks likely. Then reports peak an hour after the game and return to normal a couple hours later.

Actually, there’s one more important element of this domestic violence spike: it only happens after an unexpected loss. If a home team is supposed to lose and then loses,nothing happens. But when a favored home team loses, husbands and boyfriends turn violent. If the unexpected loss is against a traditional rival, the spike in domestic violence is 15 percent instead of 10. If the losing home team is in playoff contention, the spike can be as high as 20 percent. 

Dahl and Card found that the flip side isn’t equally true: a home team’s unexpected win does nothing to lower domestic violence. But what about other crime?

University of Denver economist Dan Rees took a look inside the National Incident-Based Reporting System on Division 1A college football game days to see what happens when a home team wins. Of course, rowdy crime goes up across the board as would be expected when the young, male demographic drinks too much Pabst. But when the home team beats a team ranked higher in the BCS standings, crime skyrockets. 

Imagine an expected versus an unexpected home team win –which of the following crime statistics do you think is the most different between the two: assault, vandalism, DUIs, disorderly conduct or liquor law violations? You guessed it – it’s DUIs, which are 12 times higher if the win was an upset than if the winning home team was favored.

In fact, an exciting game increases the emotional salience of everything – including the commercials shown in timeouts. A study forthcoming in the Journal of Advertising by Oregon State researcher Colleen Bee showed that people rate ads more favorably when watching a close, exciting game than they do when watching a blowout. In her study, it didn’t even matter who won or lost –“Games with high excitement levels result in a transfer of that emotion to the ads,” she said. This was especially true of ads shown later in the game – when the result came down to the wire.

But what happened in Egypt is beyond driving around a college town honking your horn with a few too many Blue Ribbons in you, or getting caught up in the action of a kiddie Darth Vader starting a Passat, or,perhaps even beyond a 10 percent increase in a city’s domestic violence rate.

In Egypt, fans rushed the field and by the time cooler heads prevailed, 74 people were dead.

To explain the complete loss of self in the moment of sports ecstasy, let’s turn to one more economist: Berkeley’s George Akerlof, Nobel Laureate in Economic Sciences, who I recently interviewed for my book, Brain Trust: 93 Top Scientists Dish the Lab-Tested Secrets of Surfing, Dating, Dieting,Gambling, Growing Man-Eating Plants and More.

Economics had long wondered why, in identical circumstances,one person might act one way while another person might act oppositely. And according to Akerlof, the thumb on the scale is that of identity.

In short, if you have the identity of “host” you maximize your utility (to put it economically) by serving drinks. And if you have the identity of “life of the party”, you maximize your utility by consuming them.

“You act according to your identity or you pay a cost in utility,” says Akerlof. The stronger the identity, the higher the cost of acting contrary to it. For example, once the Army builds into recruits the identity of soldier, any soldier refusing to charge a machine gun nest would pay a dear price in identity – in fact, a dear enough cost to outweigh the physical danger of charging. (Good schools and business do similar, Akerlof says.)

Now imagine Egypt, in which unrest and uncertainty have stripped away the identities of work or school or security in many young men. This identity vacuum leaves plenty of room for identity takeover by that of “soccer fan.” Perhaps when hometown underdog Al-Masry beat rival Al-Ahry, there were no competing identities to keep “soccer fan” in check.

And without this weight on the other side of the scale, perhaps it suddenly became economically rational to act according to this identity and rush the field, rather than paying an identity cost for abstaining. Perhaps the benefit outweighed the risk. 

And in that tragic but rational balance, 74 lives were lost.