Bank robberies are great case studies for the economics of crime. They’re premeditated affairs in which a perpetrator has evaluated (consciously or not) the rationality of proceeding. The gains are quantifiable. They also come with a built-in dilemma: every minute a robber stays in the bank increases both the haul and the chance of getting caught.

If you are an economist curious about bank robberies, there is no better laboratory than Italy. From 2000-2006, the last period for which comprehensive public data are available, Italy averaged nearly as many bank robberies each year than the rest of Europe combined. The Italian Banking Association also retains detailed records of every heist, including the duration, amount seized, and if and when an arrest was made.

Economists Giovanni Mastrobuoni and David A. Rivers studied nearly 5,000 bank robberies in Italy between 2005 and 2007. The average heist lasted 4 minutes, 16 seconds and yielded €16,000 (about $19,800 at the exchange rate of the time). Though each additional minute in the bank, on average, leads to about €1,400 more in earnings, the majority of robberies last three minutes or less because the risk of getting caught increases with time.

The researchers also examined the economic factors that affect the decision to rob and how that information might be used to deter future crimes.

All bank robberies begin with an implicit question: Is it worth it to me to rob this particular bank, at this particular time? It’s a complicated equation that takes into account the expected haul, the would-be perpetrator’s risk aversion, and the opportunity costs of prison, among other factors. (How complicated? The economists rendered the decision to rob a bank as the formula: V(t)=[1−Pr(T p <t)]E[U(W +Y(t),δ)]+Pr(T p <t)(W,d,S,δ). We’ll let them explain it.)

Preventing bank robberies, then, is a matter of adjusting the value of those variables so that the act becomes a lot less rational. The data were limited—the Mastrobuoni and Rivers only had access to data about the crimes, not the individuals who committed them. But by looking at the amounts stolen, the duration of heists, and the frequency of arrests, they were able to discern two general phenotypes of thieves: those who are good at stealing, and those who aren’t.

High-skilled thieves—those who steal a lot quickly, with fewer arrests—have essentially found a lucrative line of work. It may be tough for this group to find an alternative career as profitable as crime. Therefore, the researchers suggest the best deterrent for the elite thief may be a long prison sentence, during which he would not be able to practice his (or her) trade.

Low-skilled robbers, on the other hand, have less to gain from a life of crime. The authors suggest this group is best served by expanding educational and training programs that offer attractive alternatives to theft and increase the opportunity costs of incarceration.

The decision to rob can be a surprisingly rational one. The decision to deter robberies can be too.