# Calculemus

Instead of burning incense or resorting to prayer to influence the outcome of an election that is already over, let us recall that the final outcome will be determined by numbers of votes, and by numbers of votes only. The ballots are all in the boxes, and no amount of incense burning or prayer are going to change them.

Instead of hoping for miracles in the past, let us calculate a bit, based on what we know now about what has happened, just for the fun of it.

Here are some lists that I got from the Guardian web page (afternoon of Nov 4, Amsterdam time).

Wisconsin has 5 percent of votes left to count, which amounts to 173000 votes. Biden leads by a margin of 20748 votes, and it is highly unlikely that the remaining mail-in ballots are suddenly going to lean to Trump. For that to happen, Trump would need that at least 56 percent of the remaining ballots are votes for him. This is highly unlikely. I conclude that Wisconsin will be declared for Biden. This gives Biden 10 electoral college votes.

Georgia has 6 percent of the votes left to count. These are 301000 ballots. Trump leads by a margin of 102823 votes. What is needed for Biden to overtake him? At least 0.671 of the remaining votes would have to be for Biden. Possible, but highly unlikely, so I assume Georgia goes to Trump. This gives Trump 16 electoral college votes.

North Carolina has 348000 ballots left to count. Trump currently leads by a margin of 76712 votes. For Biden to overtake him he would need at least 0.611 of the remaining ballots voting for him. Not very likely. North Carolina seems to go to Trump. This gives Trump 15 electoral college votes.

Nevada has 589000 ballots left to count. Biden has a small lead of 7647 votes. For Trump to overtake him, at least 51 percent of the remaining ballots would have to go to Trump. Given that the mail-in ballots are counted last this is unlikely. Nevada goes to Biden, with 6 electoral college votes.

Michigan has 484000 ballots left to count. Biden leads by a small margin of only 24248 votes. For Trump to overtake Biden he would need at least 0.526 of the remaining ballots for him. Given the skew in the mail-in ballots for Biden I consider that unlikely. So I assume Michigan goes to Biden. 16 electoral college votes for Biden.

Pennsylvania has 2992000 ballots left to count. A huge number. Trump leads by a margin of 675012 votes. For Biden to overtake him he would need that at least 0.613 of the remaining ballots are votes for him. Well, it is possible. But we know by now that the margins for swing states are much smaller. So my best guess is that Pennsylvania goes to Trump. That would be 20 electoral college votes for Trump.

Alaska has 210000 ballots left to count and Trump leads by 51382 votes. At least 0.623 of the remaining ballots would have to go to Biden for him to overtake Trump. Alaska is not a swing state, and the vast majority of the votes that are already counted are for Trump. Alaska goes to Trump, with 3 electoral college votes.

Summing up, I predict a win for Biden in the electoral college, but by the smallest possible margin: 238 + 16 (Michigan) + 10 (Wisconsin) + 6 (Nevada) = 270.

To quickly calculate the required percentages for a flip of the result I used a tiny Haskell script.

```
margin n p = p*n - (1-p)*n
lst = take 1000 (iterate (+0.001) 0.51)
predict n = zip lst (map (margin n) lst)
calculate n m = head [ (x,y) | (x,y) <- predict n, y > m ]
wisconsin = calculate 173000 20748 -- 0.56,20760
georgia = calculate 301000 102823 -- 0.671,102942
ncarolina = calculate 348000 76712 -- 0.611,77256
nevada = calculate 589000 7647 -- 0.51,11780
michigan = calculate 484000 24248 -- 0.526,25168
pennsylvania = calculate 2992000 675012 -- 0.613,676192
alaska = calculate 210000 51382 -- 0.623,51660
```