Only a handful of polling outfits were surveying voters ahead of the Indiana Democratic primary—but none of them saw a Bernie Sanders win coming.

The RealClearPolitics polling average for the state had former Secretary of State Hillary Clinton up by just under 7 percentage points as of this morning. But minutes ago, the TV networks began to call the race for the senator from Vermont.

It still looks mighty unlikely that Clinton will fail to accrue enough delegates to ensure a win on the first round of voting at July's Democratic convention—and that's if Sanders doesn't drop out before then, which he may well do. But a state that was supposed to deal a major blow to his campaign is instead giving him a chance to remind people it ain't over yet.

Ultimately, this should also be a reminder that primary polling is susceptible to major misses, in large part because a primary electorate is so hard to pin down. Far fewer people turn out at this stage than will for the presidential general, and figuring out who will actually cast a ballot on Election Day is, as I explained in my feature for the February issue of Reason ("Why Polls Don't Work"), the most difficult part of conducting a good poll.

Modern survey takers know that, due to plummeting response rates (that is, people's refusal to answer questions from a stranger), they probably aren't getting a true random sample of voters. So they take pains to carefully adjust their data using statistical weights, trying to make their numbers approximate the demographic characteristics not of the group of people they managed to get on the phone but of the group that will actually show up.

But of course, this assumes that they can accurately guess what percentage of the future electorate will belong to various demographic groups, something we can't possibly know for sure until after the election has happened.

Pollsters also generally try to "screen out" from their surveys people who they believe are unlikely to show up for the primary. One way to do that is by limiting yourself mostly to people who have a track record of voting in similar races in the past. But that assumes large numbers who didn't vote in prior years won't be motivated by an usually exciting candidate to "surge" to the polls this time around. Sanders—who likes to say the country is ripe for a political revolution—is arguably one such candidate, and indeed, he's done significantly better over the last three months in "open primary" states where people not formally aligned with the Democratic Party can nonetheless participate.

The team over at FiveThirtyEight is pointing out that this is nowhere near the shock upset that Sanders' win in the Michigan primary was. There, the pre-election polls were consistently finding Clinton up by close to 20 points. Here, they found her up by more like 7. "That was an historic upset for Sanders," writes Nate Silver; "this would be a pretty normal primary miss."

Still, it's a miss that no one saw coming. Even in the best of times, the polls are going to be off-target once in a while, especially in a state like this where there are so few data points to look at. (All the polls in the RCP average finished fielding before the weekend, as well, meaning it's also possible voters changed their minds in the final stretch.) But as I wrote the morning after the New Hampshire primary, it's virtually impossible to know ahead of time which races are the ones pollsters are getting right and which are the ones they're getting wrong.