Bevin led Comer in the counties that reported their results first, leading to some premature celebrations. Bevin claimed victory as he spoke to supporters, and Paul tweeted his congratulations only to delete the tweet when it became clear the primary was too close to call.

Comer has already asked election officials to recanvass the vote, a process in which county boards will double-check each machine to confirm the count. But as the University of Kentucky’s Election Law Society notes, that process is unlikely to change the outcome. Comer’s next option would be to petition a court for a formal recount. About one-third of ballots are cast electronically in Kentucky, so those machines would simply be checked for a third time. The remaining two-thirds of ballots would be counted by hand. That may yield a different winner, but it might not be the right one.

A 2012 study found that hand counting ballots can result in error rates of up to 2 percent—a margin of error much higher than the .04 percent (that’s four-hundreths of one percent) separating Bevin and Comer. “The issue is, any race where the margin of victory is very, very small, we don’t really know who won,” said Michael Byrne, a co-author of the study who is a professor of psychology and computer science at Rice University. The study tested two different procedures of hand-counting in which multiple people checked each other’s work for accuracy. “It’s just hard. People are just not really good at counting.”

Anyone who watched television during the month after the 2000 election can remember the agonizing experience of seeing Florida election officials and campaign lawyers haggle over hanging chads. But Byrne said even the federal Help America Vote Act in 2002 failed to find an effective and uniform way of counting ballots across the country. An emerging idea that is now being tried in parts of California, he said, is to rely on a system called a “risk-limiting audit” to check the accuracy of machine counts. Rather than going through every ballot by hand, a random sample would be checked to make sure they have the correct information for the machine to read. “We’re not replacing counting with a statistical estimate,” Byrne explained. “What we’re doing is we’re counting everything, and then we’re going back to do an audit to make sure that we really were counting the right stuff.”

It might not be perfect, but relying on a statistical formula could be better than the human error that comes with a full-hand recount. “I would be much happier if I knew that elections that I voted in were being risk-limiting audited,” Byrne said. Voters in Kentucky don’t yet have that option. If Comer wants a recount, he might just be hoping for some better luck.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.