An hour before I started writing this, I watched a video clip from Kyiv, Ukraine. There are policemen taking cover behind their tall shields as they are shot at, as they try to help fallen colleagues and bring in stretchers. The immediacy of it all is unsettling, disturbing, as if I had a ringside seat to the conflict itself.

And it makes me wonder, why Ukraine? Or in fact, why such a lot of protest violence, the world over, in recent years? We’ve watched the Arab Spring, Venezuela, Syria—and that’s just for starters. All kinds of people have erupted in protests against their governments, with varying degrees of success. In some cases, the protests have died out. In others, they continue. Ukraine is the most recent of these, but it’s happened in several more countries. Why all this?

In one word, or actually two, food prices. Or let me put it this way. There’s mathematical research that suggests a link between food prices and the occurrence of riots (admittedly, you could argue that you hardly need research to suggest such a link). And this research has pretty accurately predicted the unrest we’ve seen in so many corners of the globe. It gets attributed to political failures and repressive governments, but as an article in MIT Technology Review points out, “High food prices lead to a kind of tipping point when almost anything can trigger a riot, like a lighted match in a dry forest.”

The link comes from a 2011 paper by Marco Lagi, Karla Bertrand and Yaneer Bar-Yam of the New England Complex Systems Institute. They studied the behaviour of the Food Price Index (FPI) from the UN’s Food and Agriculture Organization (FAO). FPI is a weighted average of the prices of five major food groups—sugar, meat, dairy products, vegetable oil and cereals—that’s calculated and announced monthly. In January this year, for example, it was 203.4. To compare, it was 91.1 in 2000, and 127.2 in 2006.

Lagi and his colleagues matched FPI’s behaviour to outbreaks of unrest around the world. That produced an interesting correlation: “Food riots occur above a threshold of the FAO price index of 210.”

That threshold was breached for the first time in 2008—which you will remember was when we saw a worldwide economic meltdown. Sure enough, the paper lists unrest that year in, for example, Mozambique, Yemen, Cameroon, Tunisia, Haiti and even India. This violence tailed off as economies limped back to health through 2009—and as FPI sank to 2007 levels, about 150.

But then it began rising again. By late 2010, it had crossed 210 once more. Sure enough, on 17 December that year, a street vendor called Mohammed Bouazizi set himself on fire in a small Tunisian town, protesting police harassment. That little tragedy triggered the famous Arab Spring. The next many months saw several long-entrenched Arab regimes overthrown.

Lagi et al had monitored FPI’s rise through 2010 with concern. Interestingly, on 13 December that year, when FPI was at about 220, they sent a report to the US government. In it, they explained the link between global food prices and unrest, warning that if the price index rose above 210 and stayed there, people across the globe would rise up to protest.

Just four days later, poor Mohammed Bouazizi set off the Arab Spring.

But Lagi et al were actually more worried about the longer term effects of their thesis. FPI had crossed the 210 threshold in 2008 and 2010, but those were relatively temporary peaks in its behaviour. They masked “a more gradual, but still rapid, increase of the food prices during the period starting in 2004”, said the paper. Extrapolating, they predicted that FPI would breach 210 by August 2013, and tend to stay above that mark. With that, they warned, “the security of vulnerable populations will be broadly and persistently compromised. Such a threat to security should be a key concern to policymakers worldwide”.

Turns out that FPI actually rose past 210 earlier—in 2013—than the paper predicted. And while it’s been slowly falling since—apparently sugar and vegetable oils have led that broad downward trend—it did remain above 210 for much of the year.

And sure enough, in the last few months, we’ve seen outbreaks of violence in several places around the world. Like Thailand. Like Venezuela (where food prices are the highest they have been since 1996). And now it’s Ukraine.

All of which is what I’ve been thinking about, watching the street-fighting in Kyiv.

As I mentioned briefly above, the link between high food prices and unrest is not, by itself, remarkable. What’s fascinating to me is that these scientists actually found a sensible correlation in this data, one that nobody else has examined rigorously beyond just saying it was likely.

And then they used it to predict, if not head off, eruptions of chaos. Mathematics, as always, has its uses.

Once a computer scientist, Dilip D’Souza now lives in Mumbai and writes for his dinners. A Matter of Numbers will explore the joy of mathematics, with occasional forays into other sciences.