Two months since the election, and ex-comedian and Democrat candidate Al Franken is almost, but not quite, set to represent Minnesota in the US Senate.

The state’s canvassing board this week certified Franken as the winner at the conclusion of the recount, by 225 votes. But Franken was not there when new senators were sworn in on Tuesday: Minnesota’s governor cannot send his name to the Senate until his opponent, defeated Republican incumbent Norm Coleman, has had the opportunity to exhaust his legal challenges. Sure enough, Coleman filed a lawsuit yesterday.

Coleman’s supporters have tried to cast doubt on the result by pointing to a range of alleged irregularities, summarised by Monday’s Wall Street Journal (which was comprehensively dissected by Nate Silver at fivethirtyeight). They have been helped by the apparent unlikeliness of the turnaround Franken has achieved: he trailed Coleman by 215 votes in the original count.

But there is a general lesson here about how elections work, and it’s important to understand why the outcome of the recount is really not all that surprising — and why, although the result is extraordinarily close, it is extremely unlikely to change from this point on.

Counting of American elections is almost all mechanised; in Minnesota, voters filled in mark-sensitive ballots that were then run through a scanner. Because the vote was so close — just under a hundredth of one per cent — they were all recounted by hand.

The manual recount picked up a lot of ballots that hadn’t been recorded properly by the machine, but where the voter’s intention was clear once a human counter looked at them. It also found a sizable number of postal ballots (called “absentee” votes in the US) that had been wrongly rejected for various technical reasons. Neither sort of error, however, occurs randomly; voters who make those sort of non-fatal mistakes are disproportionately likely to be poorer, less well-educated or from minority groups — which means they are more likely to (be trying to) vote Democrat.

Random errors are subject to the law of large numbers; if you’re relying on them to overturn the result, the margin doesn’t have to be very big before that becomes extremely unlikely. (It also doesn’t vary as much as you might think with the size of the electorate: a 200-vote margin out of 2 million isn’t ten times more likely to change than 200 out of 20 million.)

That’s now Coleman’s problem: because there’s a rational explanation for why the recount favored Franken, he can’t just say “well, recounting them once produced a 440-vote turnaround one way, so doing it again might reverse that.” Unless he’s got some systematic reason why the recount might have been biased Franken’s way, any further shuffling of the ballots is likely to be pretty much a wash.

That’s especially so because errors are inherently less likely to be found the second (or third) time around; as Silver puts it, “The process is somewhat analogous to vacuuming your floor; you aren’t going to gobble up nearly as much dust on your second sweep through the living room as you did the first time around, even if you’d done a haphazard job.”

It’s understandable Coleman and the GOP would try everything they can, in the hope that something might just happen to fall their way. But there’s no serious doubt that Al Franken will be the new junior senator from Minnesota.