Category: Uncategorized

Visualizing the Electoral College 2016

With the recent Presidential Elections of 2000 and 2016, twice has a candidate won the popular vote and lost the Electoral College (EC). As a refresher, the rules of the electoral college are as follows:

  1. Each state is given 2 Electoral Votes (EVs) plus additional EVs depending on their population, with a minimum of 3 EVs
  2. Whoever wins the popular vote within each state is given every single EV (with the exceptions of Maine and Nebraska)

A common idea is that the EC provides protection to small states, stopping large ones from dominating the popular vote. I will be using 2016 election data and treemaps to present a visualization of state voting power using various metrics to examine this idea. Each state’s area will represent a metric, and its colour represents how it voted in 2016.

First, visualizing the popular vote. In this treemap, you can see the voting population by state:

popvote

Right away you can notice that the USA’s voting population isn’t as concentrated in large states as one commonly hears. Here’s how one political cartoonist (very misleadingly) represents it:

mrz111916-color_orig
Cartoon by Michael Ramirez

How do you represent how the election looks with the EC in place? A common way of doing it is to represent the states as EVs granted per popular voting population. This is a highly misleading way of doing this, because a state’s EVs are winner take all (WTA).

 

One quick way to do this is to look at the EVs granted per popular vote margin for each state. This represents how worthwhile it is to get people in each state to vote for you – the closer the state, the easier it is to pick up all of those EVs, and the more EVs the better. This is one way to represent how America looks with the electoral college:

ecvote1

Right away this visualization shows you the disproportionate power afforded to large swing states in the electoral college. NH, MI, PA, and WI take up most of the image. All the small states are packed into the corner (as well as large ones). Right away you can see that the EC massively disenfranchises small states.

Another appropriate metric to use is the tipping point chance. Not all EVs are created equal, because the presidency is also winner-take-all. Someone gets 270 EVs and wins or they don’t. Hence the EVs that are closest to this 270 threshold are more valuable, and those far away are less valuable (EVs after 270 are wasted). To represent this, the states were ranked by popular vote margin fraction, and their cumulative EVs added up, finding the margin corresponding to 270 EVs. In 2016, the tipping point state was Wisconsin, with a margin of 0.7%. Hence you can get a rough idea of the relative tipping point chance by taking the difference between the margin of a given state and this tipping point margin, and taking the square root of the reciprocal. This makes states more important the closer they are to the tipping point margin (the attached R code will make this more clear). You can read more about tipping point states here: http://fivethirtyeight.com/features/will-the-electoral-college-doom-the-democrats-again/

ecvote2

 

The same offenders pop up again, but show the increased roles of Pennsylvania and Wisconsin as opposed to New Hampshire in the previous visualization. This represents how if Trump had won NH he probably would have already won, and it didn’t do much for Clinton either – she needed PA and WI at least, and then even with the loss of MI she could have picked off FF or NC to make up the difference.

The best way then to demonstrate voter power is to combine these two metrics. The first one tells you the power of each voter in terms of how many EVs they are worth, and the second one tells you the power of each of these EVs.

ecvotecomb

This tells the complete story and gives you an idea of how each candidate had a path to victory – in the end it came down to these 5 states. PA, WI, NH, FL, and MI.

The power of these visualizations is that it 1) debunks the common myth that the EC favours small states, 2) shows that the EC massively pumps up the power of a handful of large swing states, 3) demonstrates clearly how a candidate can win the popular vote and lose the EC, and 4) debunks the myth that a few large states would dominate a popular vote contest.

A good question would be can we test these metrics to see if they match up to reality? Yes. It is a matter of public record of how many visits each candidate made to these states, and how much campaign money they spent there (on ads, events, etc). If these metrics are a good measure of a state’s importance, they should be good predictors of visits and campaign spending. I’ll write this up after crunching some more data.

Want to play with my data and methodology? Stay tuned, after some cleanup I’ll post the R source code and a Google Spreadsheet of the data I used.

 

 

How to solve a physics problem (or any other quantitative problem!)

This is the method I use for most problems I come across, and is how I teach people to do their own problems. It’s how I do most modeling.

The ultimate trick is compartmentalization. Most problems have many moving parts, and it’s impossible to keep them all in your head at the same time – don’t even try! It’s the fastest way to get overwhelmed and give up on ever being able to solve it. Every problem, no matter how hard, is going to be made up of easy sub-problems.

I want you to keep in your head which “mode” you are currently in. Here are the main three modes:

  1. “Physics” mode. This is where you establish which quantities you know, which quantities you want to know, and write down your equations to define the problem. Usually you will need one equation for each unknown quantity.
  2. “Maths” mode. This is when you manipulate your equations using algebra to solve for the unknown quantity you want.
  3. “Arithmetic” mode – this is when you actually plug in your numbers to get the unknown quantity you want.

Side note – I know it’s very tempting to plug in your numbers right into your equation (doing arithmetic before you do your maths), but it’s very important to avoid this. You should avoid plugging in numbers as long as possible for the following reasons:

  1. You are doing more work than you need to do – it is easier to write “v” than it is to write “50 miles/hour”
  2. You may be doing more work than you need to do – some quantities might cancel out, making your arithmetic redundant.
  3. You may be doing more work than you need to do – there might be another similar problem you need to do in the future but with a few quantities changed. If you solve the problem algebraically, changing a quantity is just a matter of plugging your new quantity in. Otherwise it’s a lot more work you have to do.
  4. The numbers are distracting – you should be thinking about maths and how quantities are related, not simple arithmetic. We are trying to compartmentalize.
  5. Rounding errors – doing the arithmetic as you go can make errors accumulate.

Here’s a very easy example of how to use this method.

Problem: A car is traveling at 50 miles per hour. How long does it take to travel 25 miles?

Step 1: Physics mode

We know velocity (50 miles per hour) and distance (25 miles). We’ll call these v and d. We want to know time. We’ll call this t.

We know the following fundamental equation for velocity:

v=\frac{d}{t}

Now we have one equation and one unknown. We are done with physics mode and completely forget we are even doing physics.

Step 2: Maths mode

We want to solve our for t. We have one equation. Multiply both sides of the equation by t.

v\, t=d

Divide both sides by v.

t=\frac{d}{v}

Now we have t on one side of the equation. Every quantity on the other side is known, so we know we are finished doing maths and can do the arithmetic.

Step 3: Arithmetic mode

Plug in our values for v and d.

t=\frac{25\text{ miles}}{50\,\frac{\text{miles}}{\text{hr}}}

Notice we leave our units in. This is vital. If our units work out, then we know we haven’t made any mistakes, and if we ever are given one of these quantities in different units we know how to deal with them. To get the units we want, we multiply both sides of this fraction by one hour, and cancel out the miles.

t=\frac{25\text{ hr}}{50}=0.5\text{ hr}

The problem is solved. It takes a half hour to travel a distance of 25 miles at 50 miles per hour.

This example was quite easy, but it demonstrates the method.

Note this method isn’t just useful for physics problems and will work for any sort of quantitative problem. Just replace “physics mode” with “chemistry mode” or “business mode”, the point is during that mode is when you establish how the quantities are related with the equations you know, and which quantities you know and which you want to know.

In part 2, I’ll do another example with a more complicated projectile motion problem.