← Projects Archived project: This page preserves the original 2020 election model content and outputs
for historical reference.
Archived Project
2020 Election Model
A state-by-state statistical predictive model for the 2020 U.S. presidential election.
Python Forecasting Statistics Election Modeling
Introduction
Hi, I'm Wyatt Entrekin, a 3rd-year Industrial Engineering student at the Georgia Institute of Technology with
a strong interest in data analysis and a fascination with electoral politics. I created this election model as
the result of a desire to develop my programming skills and a near obsession with the topic. Below, you will
see the results of the model, an explanation of the methods I used to produce the data you're looking at, and
some interesting insights I gathered from these results. If you have any questions, wish to connect
professionally, or are interested in learning more about the project, feel free to email me at
wmentrekin@gmail.com, connect with me on
LinkedIn,
or check out the code on
GitHub.
Methods
Disclaimer: This model is not an official prediction. I am in no way attesting to its
potential accuracy or claiming it to be correct. The point of this project was to be a learning exercise for
me as well as an outlet for an interest of mine. I am not in any way a professional election forecaster.
Nonetheless, I hope this peaks your interest.
When I first decided to begin working on this model in August, I wanted to challenge myself to learn more
about different Python libraries, such as Scipy, Numpy, Pandas, and Matplotlib and to see if I could come up
with anything accurate. I utilized my prior skills in webscraping and data manipulation while using new
knowledge in statistics and data visualization. The entire model is written in Python.
This model essentially uses election data from 2016 and polling for this current election cycle to create a
rough forecast of the 2020 election. I gathered data about all 50 states and the District of Columbia from
the census website, 2016 election data
from the FEC website, 2020 election
polling data from 270 to win, and
pollster ratings and bias from 538.
After the data was gathered and cleaned, I had three classes of objects: States, Polls, and Pollsters. I
wanted to use the data I gathered about each of these objects, to implement this model. The model thus breaks
down into these parts: correcting polls based on the grade and historical bias of their pollsters, aggregating
polls in each state into a singular rating with a vote share for both candidates and margin of error based on
the combined margins of all the polls (for states with no polling data, this rating was simply based on the
2016 election results, as states with no polling data are not assumed to be competitive or change much in
their results from the prior election cycle), combining the prior election results and the ratings for each
state into distributions of possible vote share for each candidate in each state, simulating 10,000 races in
each state, and visualizing the data with the map and graphs you see below.
Results
Average Margin of Victory
In the model, there are 10,000 scenarios that were run. This map visualizes the average margin of victory
of either candidate in each state on a color scale. States in blue are projected to be won by former Vice
President Joe Biden, whereas states in red are projected to be won by incumbent President Donald Trump. The
darker the color of the state, the larger the margin expected for the winning candidate.
Closest Projected Margins of Victory
The table below shows states where the winner is projected to win by less than 10% of the vote.
| State | Projected Margin | Projected Winner |
| North Carolina | 0.41% | Joe Biden |
| Arizona | 0.58% | Joe Biden |
| Ohio | 1.1% | Donald Trump |
| Georgia | 1.13% | Donald Trump |
| Nevada | 1.24% | Joe Biden |
| Florida | 2.0% | Joe Biden |
| Wisconsin | 2.61% | Joe Biden |
| Texas | 3.48% | Donald Trump |
| Michigan | 4.03% | Joe Biden |
| Pennsylvania | 4.07% | Joe Biden |
| Iowa | 4.47% | Donald Trump |
| Virginia | 4.84% | Joe Biden |
| Minnesota | 4.91% | Joe Biden |
| New Hampshire | 5.39% | Joe Biden |
| South Carolina | 7.58% | Donald Trump |
| Alaska | 8.11% | Donald Trump |
| Colorado | 9.92% | Joe Biden |
Most Lopsided Projected Margins of Victory
The table below shows states where the winner is projected to win by more than 25% of the vote.
| State | Projected Margin | Projected Winner |
| District of Columbia | 86.79% | Joe Biden |
| Wyoming | 46.3% | Donald Trump |
| West Virginia | 42.09% | Donald Trump |
| Oklahoma | 36.4% | Donald Trump |
| North Dakota | 35.78% | Donald Trump |
| Massachusetts | 32.46% | Joe Biden |
| Hawaii | 32.2% | Joe Biden |
| Idaho | 31.79% | Donald Trump |
| California | 29.53% | Joe Biden |
| Arkansas | 26.91% | Donald Trump |
| Maryland | 26.41% | Joe Biden |
| Vermont | 26.4% | Joe Biden |
| New York | 25.4% | Joe Biden |
| Nebraska | 25.01% | Donald Trump |
Projected Tossup States
The table below shows states where both candidates have at least a 40% chance of winning.
| State | Trump Projected Chance | Biden Projected Chance |
| North Carolina | 49.52% | 50.48% |
| Arizona | 44.53% | 55.47% |
| Ohio | 55.55% | 44.45% |
| Georgia | 58.64% | 41.36% |
Projected Flipped States
This table below shows states where the projected winner in 2020 is from a different party than the one
which won in 2016.
| State | 2016 Winner | 2016 Margin | 2020 Projected Winner | 2020 Projected Margin |
| Pennsylvania | Donald Trump | 0.72% | Joe Biden | 4.07% |
| Michigan | Donald Trump | 0.22% | Joe Biden | 4.03% |
| Arizona | Donald Trump | 3.55% | Joe Biden | 0.58% |
| North Carolina | Donald Trump | 3.66% | Joe Biden | 0.41% |
| Wisconsin | Donald Trump | 0.76% | Joe Biden | 2.61% |
| Florida | Donald Trump | 1.2% | Joe Biden | 2.0% |
Full Results
The table below shows the full results of the model in all 50 states and the District of Columbia. Below
you can see, for each state, the projected vote share for either candidate, the chance of victory, and the
projected vote margin from the model.
| State | Trump Projected Vote | Biden Projected Vote | Projected Margin | Trump Chance | Biden Chance |
| Alabama | 58.98% | 36.82% | 22.16% | 99.96% | 0.04% |
| Alaska | 49.99% | 41.88% | 8.11% | 83.43% | 16.57% |
| Arizona | 46.33% | 46.91% | 0.58% | 44.53% | 55.47% |
| Arkansas | 60.59% | 33.68% | 26.91% | 100.0% | 0.0% |
| California | 31.26% | 60.79% | 29.53% | 0.0% | 100.0% |
| Colorado | 41.87% | 51.79% | 9.92% | 4.27% | 95.73% |
| Connecticut | 35.23% | 54.06% | 18.83% | 1.45% | 98.55% |
| Delaware | 38.6% | 56.15% | 17.55% | 0.45% | 99.55% |
| District of Columbia | 4.1% | 90.89% | 86.79% | 0.0% | 100.0% |
| Florida | 45.81% | 47.81% | 2.0% | 35.15% | 64.85% |
| Georgia | 47.67% | 46.54% | 1.13% | 58.64% | 41.36% |
| Hawaii | 30.01% | 62.21% | 32.2% | 0.0% | 100.0% |
| Idaho | 59.29% | 27.5% | 31.79% | 100.0% | 0.0% |
| Illinois | 38.79% | 55.81% | 17.02% | 0.0% | 100.0% |
| Indiana | 51.71% | 40.56% | 11.15% | 89.17% | 10.83% |
| Iowa | 48.96% | 44.49% | 4.47% | 78.39% | 21.61% |
| Kansas | 52.82% | 39.47% | 13.35% | 95.91% | 4.09% |
| Kentucky | 57.1% | 36.98% | 20.12% | 97.11% | 2.89% |
| Louisiana | 58.1% | 38.42% | 19.68% | 100.0% | 0.0% |
| Maine | 41.25% | 52.2% | 10.95% | 10.32% | 89.68% |
| Maryland | 33.9% | 60.31% | 26.41% | 0.0% | 100.0% |
| Massachusetts | 31.14% | 63.6% | 32.46% | 0.0% | 100.0% |
| Michigan | 44.96% | 48.99% | 4.03% | 20.23% | 79.77% |
| Minnesota | 43.34% | 48.25% | 4.91% | 9.8% | 90.2% |
| Mississippi | 56.22% | 40.7% | 15.52% | 100.0% | 0.0% |
| Missouri | 56.79% | 38.11% | 18.68% | 100.0% | 0.0% |
| Montana | 53.28% | 41.13% | 12.15% | 89.98% | 10.02% |
| Nebraska | 58.71% | 33.7% | 25.01% | 100.0% | 0.0% |
| Nevada | 48.18% | 49.42% | 1.24% | 39.45% | 60.55% |
| New Hampshire | 44.37% | 49.76% | 5.39% | 17.81% | 82.19% |
| New Jersey | 38.38% | 54.29% | 15.91% | 0.06% | 99.94% |
| New Mexico | 40.68% | 51.19% | 10.51% | 1.31% | 98.69% |
| New York | 33.47% | 58.87% | 25.4% | 0.0% | 100.0% |
| North Carolina | 47.41% | 47.82% | 0.41% | 49.52% | 50.48% |
| North Dakota | 62.99% | 27.21% | 35.78% | 100.0% | 0.0% |
| Ohio | 47.64% | 46.54% | 1.1% | 55.55% | 44.45% |
| Oklahoma | 65.31% | 28.91% | 36.4% | 100.0% | 0.0% |
| Oregon | 39.1% | 50.09% | 10.99% | 0.0% | 100.0% |
| Pennsylvania | 45.14% | 49.21% | 4.07% | 23.34% | 76.66% |
| Rhode Island | 38.9% | 54.4% | 15.5% | 0.0% | 100.0% |
| South Carolina | 51.28% | 43.7% | 7.58% | 85.14% | 14.86% |
| South Dakota | 53.99% | 37.17% | 16.82% | 88.01% | 11.99% |
| Tennessee | 56.54% | 37.55% | 18.99% | 99.28% | 0.72% |
| Texas | 48.79% | 45.31% | 3.48% | 71.12% | 28.88% |
| Utah | 45.51% | 27.49% | 18.02% | 100.0% | 0.0% |
| Vermont | 30.29% | 56.69% | 26.4% | 0.0% | 100.0% |
| Virginia | 44.4% | 49.24% | 4.84% | 0.0% | 100.0% |
| Washington | 34.93% | 56.41% | 21.48% | 0.05% | 99.95% |
| West Virginia | 68.5% | 26.41% | 42.09% | 100.0% | 0.0% |
| Wisconsin | 45.94% | 48.55% | 2.61% | 24.5% | 75.5% |
| Wyoming | 68.19% | 21.89% | 46.3% | 100.0% | 0.0% |
Win Probabilities & Expected Electoral Votes
The table below represents the expected value of electoral votes and chance of winning the electoral
college for either candidate. The expected value of electoral votes was found by multiplying both
candidates' probabilities of winning in every state by the electoral votes of every state. The chances of
victory are simply a proportion of the scenarios in my model in which either candidate wins the electoral
college.
| Expected Electoral Votes: Joe Biden | 327 |
| Expected Electoral Votes: Donald Trump | 211 |
| Chance of Victory: Joe Biden | 97.74% |
| Chance of Victory: Donald Trump | 2.26% |
Insights
The first interesting result that I noted while getting the first results of this model were how some states
have very slim projected margins while the candidate favored to win had very high chances of victory. For
example, Donald Trump is expected to win South Carolina and Alaska by margins of less than 10%, yet has more
than 80% chance of victory in both states. Likewise, Joe Biden is expected to win both Minnesota and Virginia
by margins of less than 5%, yet has more than 90% chance of victory in both states. This is probably a result
of the polling data in these states having low variance and error.
Next, I noticed that the model only predicts four true toss-up states: North Carolina, Arizona, Ohio, and
Georgia, all of which Donald Trump won in 2016. While candidates campaign all over the country, many of the
states they visit are, at least statistically, already likely to vote a certain way. This reflects in the
projected flipped states as well, where all of them are expected to flip from Trump to Biden, with Biden
projected to win by larger margins than Trump won them in 2016, with the exception of Arizona and North
Carolina, which out of these states, are the more traditionally Republican states.
Lastly, my model gives Joe Biden an almost guaranteed victory in the electoral college. While many models and
pundits show Biden as the favorite, I am wary of the results of my own model. In general, I believe that my
results don't paint an unrealistic picture, but that some of the numbers can be potentially misleading. The
goal was not to definitively predict the winner of the election, but rather to project the chances of victory
and vote shares in each state. Nonetheless, Joe Biden wins in almost every scenario. I believe that my model's
victory chances don't necessarily represent an accurate number, but that they do reflect the narrow path to
victory for the incumbent president. While Joe Biden has many paths to the presidency (winning in the Rust
Belt, the South, or the Southwest), Trump's chance rely heavily on repeating as closely his victory in 2016,
which relied heavily on slim margins in key states. While this model gives the president decent chances in
states he needs to win, such as Wisconsin, Michigan, Pennsylvania, and Florida, there are not many scenarios
where my model has him winning all or enough of them to secure a victory. It shows that Biden can win either
by close margins or in a landslide, but that if Trump wins, it will be a narrow victory. My model, regardless
of how accurate it turns out to be, shows that this election is not unlike 2016, in that this is the
Democrats' election to lose and that Donald Trump needs to perform in a very specific way to win another term.
Overall, most of the simulations project Joe Biden winning with around 310-340 electoral votes to Donald
Trump's 200-230 electoral votes.