#!/usr/bin/env python # coding: utf-8 #
Peter Norvig
Dec 2019
# # # Predicting Presidential Electoral Votes from Approval Polls # # Various sites aggregate opinion polls on presidential job performance. The polls are broken out state-by-state, month-by-month at [Mourning Consult](https://morningconsult.com/tracking-trump/). Trump's national **net approval** (percent approving minus percent disapproving) is currently -7% on [RealClearPolitics](https://www.realclearpolitics.com/epolls/other/president_trump_job_approval-6179.html), -8% on [538](https://projects.fivethirtyeight.com/trump-approval-ratings/), and -9% on [Gallup](https://news.gallup.com/poll/203198/presidential-approval-ratings-donald-trump.aspx). There are four big caveats in jumping from these numbers to conclusions about the election: # # 1. Today is not election day 2020. # # 2. We don't know who will be on the ballot in 2020. # # 3. Approval polls are not votes. # # 4. Popular votes are not electoral votes. # # I have nothing to offer on the first three points. But can we use state-by-state approval polls to # predict electoral votes? ***Yes we can!*** # # # # TL;DR: In this model, Trump gets 104 to 235 Electoral Votes # # There is a lot of uncertainty, so I won't try to give an exact single number. Rather, I will say that, as of December 2019, under the assumption that Trump wins the electoral votes of states where he currently has positive net approval and loses the states where he has negative net approval: # - His mean expected number of electoral votes is **149.5**. # - He is tied (net approval zero) in Texas and North Carolina, so depending on how they go, the total would be **123 to 176**. # - If you allow for a swing of up to 3.5% across the board, then the totals range anywere from **104 to 235**. # - Recall that you need **270** to win. # - To reach 270, he'd need to take all the states where he is ahead or tied, plus six states where he is behind by up to **5%**. # # # Details for data science nerds # # View, verify, or modify **[my code](ElectoralVotesCode.ipynb)**. # In[1]: get_ipython().run_line_magic('run', 'ElectoralVotesCode.ipynb') EV(states) # Number of electoral vote Trump can expect according to this model # The `.5` indicates a tie in one or more states. # # Imagine a swing in voter approval of just 0.5% in either direction, for every state across the board. That would break ties, and we'd get a range of electoral votes: fewer in one direction, more in the other. If we allowed larger swings in approval, we'd get an even larger range. Here's how it goes: # In[2]: show_swings() # That is, the `4.5%` row says that if Trump's approval slipped 4.5% in every state, he would suffer a blowout loss, getting only 104 electoral votes. If he gained 4.5% in every state, it would be a close loss with 253 electoral votes (to 285 for the opponent). # # Details for policy wonks # # The following plot shows, for each month in office, the expected number of electoral votes, with error bars indicating a 3% approval swing in either direction (that is: the blue diamond is the total number of electoral votes for states where he has net positive approval; the top and bottom of the grey bars give the total if he were to gain or lose 3% in every state. Why 3%? That was the [average error](https://fivethirtyeight.com/features/the-polls-are-all-right/) in national presidential polls in 2016: Clinton was predicted to win the popular vote by 6% but actually only won by 3%.) Trump hasn't been above 270 since 4 months into his term. He's been below 200 for a year. # In[3]: show_evs() # # Uncertainty # # There's a lot of uncertainty. We don't know who will be on the ballot and what their approval levels will be, we don't know if there is systematic bias in the polling data, we don't know who will decide not to vote, we don't know who will be prevented or dissuaded from voting by interference foreign or domestic, we don't know if future events will change voters' perceptions. In what follows, I assume there is no big event (or events) that makes a dramatic change in the public perception of candidates; rather, just the normal range of change in approval as tracked over the last 3 years of Trump's presidency. I have five ways of understanding the fluidity of the situation: # # - **Undecided**: Undecided voters could make up their minds late in the election cycle. But there are few undecided voters: in most states, only 3% or 4%. # # - **Variance**: How much are voters changing their minds from month to month in each state? I track the standard deviation, 𝝈, of the net approval for each state over the last 12 months (variance is the square of standard deviation). # # - **Movement**: I define the **maximum expected movement** of approval as 1/5 of the undecided voters (i.e., assume the undecided voters broke 60/40 one way or the other) plus 2 standard deviations in the monthly net approval. # # - **Swing state**: I define a swing state as one whose maximum expected movement is greater than the absolute value of the net approval. There are **12** such states now. The swing states are shown below in **BOLD CAPS**. # # - **Margin**: If you list states in order of net approval, the key turning-point state is Pennsylvania; Trump would need to win that and every state in which he is more popular to reach 270. He currently is **5% behind in Pennsylvania**, so we say that his margin is just over 5%. # # # State-by-state summary table # # The following table packs in a lot of information. States are sorted by net approval. The columns are: # # - **State**: name of state. # - **Net**: President's current net approval in state. # - **Move**: Expected maximum movement: 1/5 of the undecided voters plus 2 standard deviations in the net approval over the last 12 months. # - **EV**: State's number of electoral votes. # - **ΣEV**: Cumulative running sum of electoral votes of this state and all states above. # - **+**: President's current approval in state. # - **-**: President's current disapproval in state. # - **?**: Undecideds in state. # - **𝝈**: Standard deviation in net approval over the past 12 months in state. # # The table shows that: # - If Trump wins the states he is leading or tied in, he gets **176** electoral votes (the **ΣEV** in the TEXAS row). # - If he also wins all the swing states, he gets **235** electoral votes (**ΣEV** in the ARIZONA row). # - To get to **270**, he would also need to win Ohio and Pennsylvania. # - He is currently down by **5%** in Pennsylvania, so that's the margin. # - Some traditional swing states currently seem out of reach for Trump: he's at **-15%** in Michigan and **-9%** in Wisconsin. # # In[4]: show_states() # # Margin and country-wide net approval by month # # The next plot gives the swing margin needed to reach 270 for each month, along with the country-wide net approval. Trump has been in negative territory on all metrics since his fourth month in office. He's been net -10% or worse country-wide every month since his third in office. We see that the state-by-state margin roughly correlates with the country-wide net approval, but not exactly. # In[5]: show_approval() # # Popularity Above Replacement President (PARP) # # Fivethirtyeight is a combination sports/politics site, and it has a lot of statistics about sports players and how much better they are than the average replacement player. Given that, they [decided](https://fivethirtyeight.com/features/the-states-where-trump-is-more-and-less-popular-than-he-should-be/) to rate the president's approval versus each state's overall approval of the president's party (in recent elections), which is a way of rating the president's performance versus an average replacement candidate from the same party. I'll duplicate that work and keep it up to date. We define the PARP for a state as the president's net approval minus the average party-member's net approval in that state (known as the "partisan lean"). # # In the table below, states are ordered by PARP. In each row we have the state name followed by the partisan lean of the state (positive numbers lean towards the president's party), the electoral votes, and then a pair of statistics (PARP, and net approval (in parentheses)) for four time periods (today, followed by January of 2019, 2018, and 2017). Trump was more popular than an average Republican at his inauguration in January 2017, with positive PARP in 42 states. But by 2018 he had positive PARP in only 6 states, and today only 2, Hawaii and Rhode Island, where he is deeply unpopular, but not quite as unpopular as other Republicans. # In[6]: show_parp()