When candidates for public office win by large margins, we usually agree that the result is not due to various vagaries of the election process -- the result would hold even if everyone voted; even if the ballots were recounted properly (rarely is the original count accurate); even if every voter flipped the lever for the intended candidate.
But what about really close elections? And...how close is "really close"? 5 votes, 50 votes, 500 votes, 5000 votes? What sort of cut-off is legitimate? When should there be a recount?
One way of asking this is: How consistent is the result with what might happen if all voters merely tossed a coin to determine their votes. (This presumes a two candidate race; what I say here is failry close to true as long as all other candidates have small aggreagate amount of support.)
If there are n total votes, and the difference is d, we can compute the probability of a difference of d or less between heads and tails for n tosses. This is quickly approximated by the following formula.
(How'd the ratio between a circle's diameter and circumference, p, get in there?)
A recent election found that of the n = 6 million voters in a certain state, the split favored one of the candidates by d = 300 votes. The likelihood of such a close race when votes are determined by coin flipping, is
That is, only one in ten times would the race be this close if people were flipping coins to determine their votes. This was a close race. This formula may only be applied to really close races. For ease of computation, this formula is a simplified version of the proper formula: The simplification always overstates the probability (.09740 is what the more complex formula gives).
In the national election associated with the results given above, the margin of victory was about 200,000 votes out of 100 million total votes. Interestingly enough, this is not a close race. Using the formula above results in nonsense.
15.98 is not a probability at all (the formula only works for truly close races).
One good question is: Is this a statistically significant margin? How likely would a margin of 200,000 or more be if each voter were merely tossing a coin to decide? The answer is essentially a probability of 0. An interesting observation is that, if 100,000,000 people each toss a fair coin, the actual difference between heads and tails will be within 10,000 95% of the time. Close elections involving millions of voters have differences on the order of 100s, not 1000s.
Disclaimer: People do not flip coins to determine their votes (at least most don't). Coin flipping is used only a basis for assessing "closeness."