You are the only sane voter in a state with two candidates running for Senate. There are N other people in the state, and each of them votes completely randomly! Those voters all act independently and have a 50-50 chance of voting for either candidate. What are the odds that your vote changes the outcome of the election toward your preferred candidate?

More importantly, how do these odds scale with the number of people in the state? For example, if twice as many people lived in the state, how much would your chances of swinging the election change?

-From FiveThirtyEight

  • 11
    $\begingroup$ I'm voting to close this question as off-topic because it's part of an ongoing competition on another site, and as such is forbidden until that competition is completed. $\endgroup$ – Sconibulus Nov 8 '16 at 18:31
  • 3
    $\begingroup$ On the other hand, this is well-formatted and nicely sourced, so barring that problem, would probably be an excellent contribution. $\endgroup$ – Sconibulus Nov 8 '16 at 18:33
  • 2
    $\begingroup$ @Sconibulus In this particular instance I see no harm in someone posting a solution here. Many people post their answers publicly and The Riddler himself has retweeted someone's solution already. $\endgroup$ – Will Nov 8 '16 at 18:38
  • 4
    $\begingroup$ Also, they only accept submissions over the weekend (i.e. until 11:59 EST on Sunday), so it's no longer "ongoing". $\endgroup$ – kayzeroshort Nov 8 '16 at 19:14
  • 2
    $\begingroup$ I'm voting to close because it is a math problem and not a puzzle — this is obvious (IMO) if you look at the answer. $\endgroup$ – Peregrine Rook Nov 8 '16 at 22:51

If $N$ is even, so $N = 2n$, you can only influence the election if

the votes are tied. There are $2^N$ possible vote distributions, and in ${N}\choose{n}$ of them the votes are tied. (The symbol is the binominal coefficient.)

The chance for this to happen can be expressed with factorials, which look like exclamation marks, and is equal to

$\frac{N!}{2^N \cdot n! \cdot n!}$ which is very small if N is high enough.

This scales in a rather complicated way. There are approximation formulas for the factorials, but they are not nice. We'll use the one called Stirling's approximation; this might seem to be a rather complicated formula, but fortunately most terms cancel out and we arrive at a chance of

$\sqrt{2\over{\pi N}}$

If you have a small state with, say 100,000 voters, this amounts to


If we double the amount of voters, your chance reduces by


If $N$ is odd, so $N = 2n + 1$, you can influence the election if

exactly $n$ people vote for your candidate.

The chance for this to happen is

again really small: $\frac{N!}{2^N \cdot n! \cdot (n + 1)!}$.

I could work out the approximation formula, but I'm sure it will give the same result as in the even case.

  • 2
    $\begingroup$ "you can at most make it a tie" - we could argue that does indeed "change the outcome of the election toward your preferred candidate" $\endgroup$ – Will Nov 8 '16 at 18:44
  • 2
    $\begingroup$ Isn't making it a tie influencing the vote? $\endgroup$ – Ian MacDonald Nov 8 '16 at 18:45
  • $\begingroup$ So, for the pop. of Colorado ~ 5 million. The chance of the voting electorate being tied would be 0.00035682482323055425. That's slightly greater 1 / 3000 chance ~ 0.000333333333333... That seems high. $\endgroup$ – maxwell Nov 8 '16 at 21:24
  • $\begingroup$ Yes, that's correct if everybody votes randomly. $\endgroup$ – Glorfindel Nov 8 '16 at 21:26
  • $\begingroup$ @Glorfindel (and no one votes for Mickey Mouse) $\endgroup$ – kaine Nov 8 '16 at 21:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.