A caucus chair looks over a group of Pete Buttigieg supporters during a Democratic caucus in Des Moines last week. (Daniel Acker/Bloomberg News)

One week ago, five people from Ocheyedan, Iowa — population 461 — met in the Osceola County Courthouse in nearby Sibley. They were there to decide which candidate for the Democratic presidential nomination would get the three county delegates their precinct would allocate. Former South Bend, Ind., mayor Pete Buttigieg was the preferred candidate of three of the people who showed up. The other two backed Sens. Amy Klobuchar (Minn.) or Bernie Sanders (I-Vt.).

In a winner-take-all system, what happens next would have been straightforward. Buttigieg won the majority, so he gets the delegates.

Candidate Votes
Buttigieg 3
Klobuchar 1
Sanders 1

But Iowa is not a normal system. Because there were three county delegates at stake, each candidate needed to receive the support of at least one-sixth of the precinct’s voters to be considered “viable.” That viability threshold was higher for the voters from Ocheyedan than in most places in the state, a function of the smaller number of delegates in play. The way the caucuses work is that supporters of any candidate who didn’t hit that threshold would have to pick from the candidates who did, what’s known as the “realignment.” But in this case, that wasn’t necessary. One-sixth of five voters is 0.8, meaning that, after rounding, the viability threshold was one vote. Buttigieg, Sanders and Klobuchar all hit that benchmark. What’s more, no voter was allowed to change their mind once they were supporting a viable candidate.

You are forgiven if you are already lost.

The process then moved on to divvying up the county delegates. There’s a formula for this. You take the number of county delegates at stake and multiply it by the number of votes a viable candidate received, then divide the total by the number of voters at the precinct. So for Buttigieg, there were three county delegates times three votes (nine) divided by five total voters, giving us a total of 1.8. Round that up, and you get two — suggesting that Buttigieg should get two county delegates.

But now we have a problem. Who gets the other one? Both Sanders and Klobuchar each got one vote, which, per the formula above, gives each of them 0.6 delegates. Those round up, too, to one delegate each. Now we have four delegates being awarded out of three total.

Candidate Votes Delegates Rounded
Buttigieg 3 1.8 2
Klobuchar 1 0.6 1
Sanders 1 0.6 1

Were Buttigieg not in the mix and Sanders and Klobuchar were tied and trying to figure out who got that third delegate, they’d flip a coin for it, according to the rules. That’s not the case here. Instead, the rules call for rounding down the person with the smallest fraction — but you can’t lose a county delegate in doing so. So the number that can be rounded down without causing a candidate to lose all of their delegates is Buttigieg’s, which gets rounded from 1.8 to 1. The result? A one-to-one-to-one tie.

Candidate Votes Delegates Rounded Adjusted
Buttigieg 3 1.8 2 1
Klobuchar 1 0.6 1 1
Sanders 1 0.6 1 1

In the abstract, this is unfair but not egregiously so. We’re talking about such small numbers after all. But this is Iowa, were small oddities can become big problems.

In that Ocheyedan precinct, each county delegate was worth 0.1 state-delegate equivalents, a number that roughly corresponds to the number of delegates a candidate will get at Iowa’s state convention and then to the actual delegates who go vote for a nominee at the convention. The results in Ocheyedan would yield 0.1 state-delegate equivalents for both Sanders and Buttigieg, a tie that wouldn’t affect the margin between the two at the state level.

Candidate County delegates SDEs
Buttigieg 1 0.1
Klobuchar 1 0.1
Sanders 1 0.1

That statewide margin is important. Buttigieg has been declared the winner statewide because, although Sanders earned more votes in both initial preference and after realignments, Buttigieg earned more state-delegate equivalents. As of writing, Buttigieg leads on that metric by a 564.29-to-561.46 margin. That’s a difference of 2.83 state-delegate equivalents.

And now here’s the kicker. Those figures include an error in the results from the Ocheyedan precinct, an error that’s been obvious for some time and that is by no means the only one in the purportedly final data provided by the state.

According to the Iowa Democratic Party, which compiled the precinct-level results from the caucuses, the county-delegate distribution in Ocheyedan yielded two for Buttigieg (as the initial math would suggest) and one for Klobuchar. Sanders, despite tying Klobuchar, gets zero county delegates and therefore state-delegate equivalents.

Candidate Correct dels Correct SDEs Reported dels Reported SDEs
Buttigieg 1 0.1 2 0.2
Klobuchar 1 0.1 1 0.1
Sanders 1 0.1 0 0

If this result were corrected, the Buttigieg-Sanders state-delegate equivalent numbers become 564.19-to-561.56 — and the margin between the two drops to 2.63.

Because of a mistake in one precinct with five voters.

That example comes from the Appeal’s Daniel Nichanian, who’s been tracking errors in the party’s data for the past week. Again, it’s a relatively minor one that just happens to affect the Buttigieg-Sanders margin. Many of the mistakes are larger; many affect the numbers for other candidates, too.

Consider the 14th precinct in Des Moines. There, former vice president Joe Biden ended up with 25 votes, Buttigieg with 52, Sanders with 50 and Warren with 31. According to the math, Buttigieg and Sanders should each have won two of the six county delegates being allocated and Biden and Warren should have won one. Each county delegate was worth 0.28 state-delegate equivalents.

For some reason, though, while Biden and Buttigieg got the right number of state-delegate equivalents, Sanders and Warren didn’t. She got 0.56 — equivalent to two county delegates — and he only got 0.28. In other words, Warren got twice as many delegates despite getting 19 fewer votes.

In another precinct, Nichanian obtained the original count from a caucus location itself. The state party for some reason granted one more delegate than should have been awarded, messing up the math. But the data reported to the party was also wrong in its calculations.

On Sunday, a representative for the party told CNN that the data would stand as is.

“We cannot go back and change results because it would be us changing the data, changing the information provided from each of the precincts,” the representative said. Though, of course, that means allowing obvious mistakes to go without correction.

Siddharth Mehta, a student at the University of North Carolina at Chapel Hill, created a script that automatically compared the caucus results with the rules that were supposed to govern the outcome. He provided the results of that analysis with The Washington Post.

According to his analysis, a nonviable candidate still earned delegates in 78 precincts. In nine, a viable candidate wasn’t given delegates he or she had earned. (That included Ocheyedan.) More than 100 precincts had more than one problem, including other possible allocation issues, which affected 257 precincts in total.

We say “possible” issues because some of those allocation issues were ties resolved with coin tosses. It appears that the coin tosses may not have been documented independently.

There were other problems, too. Magnolia precinct in Harrison County, for example, gave out 0.56 state-delegate equivalents when it was allotted 0.47. Seven of the state’s 99 counties gave out more delegates than they were allotted.

Then there were issues of dealing with lots of data. Mehta identified one precinct’s results, which perfectly mirrored another, despite there being different numbers of delegates at stake — suggesting that the same data was added or cut-and-pasted twice.

“That type of error made me really lose faith” in the party data, he told me over Twitter direct message. To resolve issues, he said, he would “like to see every precinct math worksheet scanned and uploaded for the public.”

That seems unlikely. Although campaigns can challenge the results and ask for a recanvass — as the Sanders team is prepared to do — the party seems to be willing to let its error-riddled tally be the official record of the results of the caucus.

Raising an interesting, eternal question about the democratic process: What’s the actual result of an election, the votes cast or the way those votes were counted?