Few people expected Eric Cantor to lose his primary in Virginia on Tuesday night. The House majority leader was up 13 points in the polls, though there were few in the race, and he had cash, incumbency and the Republican establishment on his side. He’d won his last general election, in 2012, with 58 percent of the vote. But one challenge of election analysis is that primaries and general elections are sometimes more different than alike, and primaries are more likely to be catastrophes.

Below is a chart of general elections. It’s a frequency distribution showing the vote share received by incumbent Republican senators in every November election since 2004, rounded to the nearest 10 percent increment.

That’s a nice bell curve distribution, centered around 60 percent of the vote. Incumbents sometimes lose in November, but they almost never get less than 40 percent of the vote. They also almost never get more than 70 or 80 percent of the vote unless they’re running unopposed.

Now a chart showing primary election results. This one looks a lot different. It shows the share of the primary vote received by all incumbent Republican senators who ran for renomination since 2004.

Most of the senators are clustered along the right wall of the chart, having won their primary elections unopposed or with 80 percent or more of the vote. Some do slightly worse than that. But every now and then they do a lot worse, getting less than 50 percent of the vote and losing their nominations — a catastrophic outcome from their standpoint.

Commentators from CBS News’ Major Garrett to the former Republican congressman Vin Weber are describing Cantor’s defeat as the political equivalent of an earthquake. As metaphors go, it’s not bad. Here’s a chart showing every earthquake of magnitude 3.5 or greater in Southern California since 1999:

The comparison isn’t perfect. The earthquake distribution has a much steeper slope (there are about 10 magnitude-5 earthquakes for every magnitude-6 earthquake, for instance). Also, earthquake magnitudes are logarithmic — a magnitude-6 earthquake releases about 32 times more energy than a magnitude 5. Nevertheless, the analogy tells us a few useful things about Cantor’s loss and the properties of primary challenges.

Like earthquakes, primary challenges rarely produce catastrophic outcomes.

There are thousands of earthquakes around the world each day, most of them too small to be detected. Only a tiny fraction produce substantial damage on a human scale. Likewise, although Republican primary challenges have been a constant source of news media attention for the past four years, few have succeeded. Only seven Republicans running for the U.S. House have lost their primaries since 2010, counting Cantor but not those in redistricting races. That would put the success rate of challenges in the range of 1 percent to 2 percent. It’s been higher in the Senate — between 10 percent and 20 percent depending on how you count a couple of cases — but still low.

Like earthquakes, primary challenges are hard to predict.

Although scientists understand the cause (plate tectonics) of earthquakes in a broad sense, they’ve tried and failed to understand why any one earthquake occurs in any one place on any one day. There have been failed theories implicating everything from radon gas to the behavior of frogs. There have been predictions of spectacular earthquakes — including a magnitude-9.5 earthquake in Lima, Peru — that failed to occur. There have also been false negatives: For instance, some Japanese seismologists were convinced that the Tōhoku region couldn’t possibly produce an earthquake as large as the magnitude-9 quake that actually happened there in 2011.

After an earthquake, scientists seek to piece its causes together. But it’s hard to monitor tectonic behavior directly because the activity is underground. Indirect attempts to model earthquake activity are prone to overfitting, a fancy term for picking up on coincidences that apply to a few incidents but that don’t generalize well enough to explain a system’s underlying dynamics.

In the case of Cantor’s defeat, as Bloomberg’s Ramesh Ponnuru points out, a good model would not only explain why challenger David Brat’s campaign succeeded but also why so many others like it failed. On Tuesday alone, Sen. Lindsey Graham won renomination in South Carolina despite having given far more explicit support to immigration reform than Cantor did. Sen. Susan Collins won renomination in Maine unopposed, despite having a far more moderate voting record. Cantor himself offers an interesting comparison: In 2012, he faced a primary challenge from a tea party candidate — and won 79 percent of the vote.

That’s not to say we’re completely in the dark. As my colleague Harry Enten pointed out, Cantor’s loss appeared to have something to do with the fact that he is deeply identified with the Republican establishment. But the statistical model Harry developed would not have predicted Cantor’s ouster — instead it might have suggested just a marginally heightened risk that he would lose (perhaps a 5 percent chance against a baseline rate of 2 percent). When it comes to predicting the outcome of any one primary, we’re much closer to ignorance than to knowledge.

Like earthquakes, primary challenges are inevitable so we should monitor for signs of risk.

There is one method that works reasonably well to predict the long-term risk of a catastrophic earthquake. That technique is to monitor the number of smaller earthquakes. As I mentioned earlier, earthquakes become about 10 times less frequent for every one-point increase in magnitude: This is an empirical property known as the Gutenberg-Richter law. For example, if you’ve detected one magnitude-6 earthquake in a certain region of Iran every five years, you might infer that the same region would have a magnitude-7 earthquake once every 50 years.

The limitation is that the forecast is not time-specific. You might know there’s a 1-in-50 chance of a severe earthquake each year in a certain part of Iran. But you might go hundreds of years without one — and then you might have several major earthquakes within a decade or two. (It’s largely a myth that a region may be “due” for an earthquake.)

In Cantor’s case, we had some evidence about the hazard he faced — that the baseline rate of successful primary challenges to Republican incumbents was somewhat higher than in the past — even if it was hard to know whether he might have been one of the victims.

We also might have derived some information from primary challenges even when they didn’t succeed in unseating the incumbent — much as seismologists can draw inferences about the chance of a magnitude-7 earthquake by observing the number of magnitude 6s.

As I pointed out at the time, the news media may have drawn several incorrect lessons from Senate Minority Leader Mitch McConnell’s victory against a conservative challenger in Kentucky last month. McConnell’s challenger, Matt Bevin, lost the race with 35 percent of the vote to McConnell’s 60 percent. In a general election, that would constitute a blowout — nowhere near close. In the context of a primary, Bevin did much better than challengers normally do. Between much lower turnout and a much higher rate of persuadable voters (in general elections, perhaps 85 percent of voters are choosing candidates based on party labels — but all candidates belong to the same party in a primary) it may not take all that much for a challenger to go from winning 35 percent of the vote to 55 percent instead.

However, like any one earthquake, one primary doesn’t tell us much.

A corollary to the principles above is that when you have a reasonably good estimate of the hazard, the occurrence of any one catastrophic event shouldn’t really change that estimate. For instance, if there’s a magnitude-7 earthquake in Los Angeles tomorrow, it wouldn’t greatly change the odds we’d place on another such earthquake happening in 2024. We already have good data on Southern California’s seismicity, and we know magnitude 7s will happen there once in a while. (If the earthquake occurred in a part of the world with poorer geological records, it would change our estimate of the odds more.)

Similarly, we know that primary challenges succeed sometimes — it’s dramatic when they do and more dramatic when the victim is a politician of Cantor’s stature. But we ought to have known that before Tuesday. Part of the shock from Cantor’s defeat may be in reaction to the news media’s narrative that the threat to GOP incumbents had ebbed — an all-clear signal that was never supported by much evidence.

I don’t mean to suggest that this is the sole correct interpretation of Cantor’s defeat — but there’s an entirely prudent interpretation along the these lines:

The incidence of successful primary challenges to Republican incumbents is high by historical standards. But we knew that already, and it’s not all that high in an absolute sense. Cantor’s defeat doesn’t tell us that much about the risk — nor did McConnell’s victory. We can perform an autopsy on Cantor’s campaign — and he should probably fire his pollster. But many Republicans won renomination easily under similar circumstances. Primary challenges are stochastic and there is some danger in “overfitting” our model and overreacting to this one.

I’d expect few people to react in this way. The tea party versus establishment storyline is a great storyline for the news media. It’s a great storyline for Democrats. It’s a great story line for the tea party. It’s a terrible story line for the Republican establishment — but they may be scared. Unlike earthquakes, which don’t give a rip about how we react to them, politicians do. So there may be a number of aftershocks, even if they’re man-made.