An interesting machine learning problem: Can one figure out the relationship between the popular vote margin, voter turnout, and the percentage of electoral college votes a candidate wins? Going back to the election of John Quincy Adams, the raw data looks like this:

Clearly, the percentage of electoral college votes a candidate depends nonlinearly on the voter turnout percentage and popular vote margin (%) as this non-parametric regression shows:

We therefore chose to perform a nonlinear regression using neural networks, for which our structure was:

As is turns out, this simple neural network structure with one hidden layer gave the lowest test error, which was 0.002496419 in this case.

Now, looking at the most recent national polls for the upcoming election, we see that Hillary Clinton has a 6.1% lead in the popular vote. Our neural network model then predicts the following:

Simulation Popular Vote Margin Percentage of Voter Turnout Predicted Percentage of Electoral College Votes (+/- 0.04996417) 1 0.061 0.30 0.6607371 2 0.061 0.35 0.6647464 3 0.061 0.40 0.6687115 4 0.061 0.45 0.6726314 5 0.061 0.50 0.6765048 6 0.061 0.55 0.6803307 7 0.061 0.60 0.6841083 8 0.061 0.65 0.6878366 9 0.061 0.70 0.6915149 10 0.061 0.75 0.6951424

One sees that even for an extremely low voter turnout (30%), at this point Hillary Clinton can expect to win the Electoral College by a margin of 61.078% to 71.07013%, or 328 to 382 electoral college votes. Therefore, what seems like a relatively small lead in the popular vote (6.1%) translates according to this neural network model into a large margin of victory in the electoral college.

One can see that the predicted percentage of electoral college votes really depends on popular vote margin and voter turnout. For example, if we reduce the popular vote margin to 1%, the results are less promising for the leading candidate:

Pop.Vote Margin Voter Turnout % E.C. % Win E.C% Win Best Case E.C.% Win Worst Case 0.01 0.30 0.5182854 0.4675000 0.5690708 0.01 0.35 0.5244157 0.4736303 0.5752011 0.01 0.40 0.5305820 0.4797967 0.5813674 0.01 0.45 0.5367790 0.4859937 0.5875644 0.01 0.50 0.5430013 0.4922160 0.5937867 0.01 0.55 0.5492434 0.4984580 0.6000287 0.01 0.60 0.5554995 0.5047141 0.6062849 0.01 0.65 0.5617642 0.5109788 0.6125496 0.01 0.70 0.5680317 0.5172463 0.6188171 0.01 0.75 0.5742963 0.5235109 0.6250817

One sees that if the popular vote margin is just 1% for the leading candidate, that candidate is not in the clear unless the popular vote exceeds 60%.