September 27, 2014

Political spending. Clown car time!

Election season is upon us, and one of the features of American electioneering is political advertisement. Every time an election demands our attention, the amounts of money spent on advertising becomes somebody's interest. Among the many sites telling us how much is being spent and by whom, is the Center for Public Integrity. Their "Ad Wars Tracker" has good information. It's particularly useful if you restrict yourself to a single state. I hope they don't intend for it to be used to compare different states for one simple reason. If you've actually read any of my other entries, you already know what it is. They have re-invented the population density map!

Not to worry, though. Taking their total for each state and comparing it to population estimates (from the US Census, of course), we can easily adjust for that. This time around, I didn't just want to "adjust". I wanted to measure the actual effect of population size on political ad spending. It's not that hard to do. The only tricky bits are 1) different states have different costs of living and 2) the range of spending and populations is enormous. The first can be adjusted by looking up the consumer price index for each state and using that as a crude adjuster for cost of living. The other requires using a little trick called "log-log transformation". This means take the logarithm of each "end" of your model, the "input" and the "output", and build the model with the logarithms. What this does is reduce the extreme effects that extremely high values have. Anyway, I did that and came up with a model that was ln ( Dollars Spent Cost of Living ) = 1.49 ln ( Population ) - 8.55 .

The important part of this is the "1.49". It means that, for every 1.49% population increases, average political spending in a state goes up by 1%. For those who care, the "significance" of this model is << 0.0001. The adjusted R2 of the model, which expresses "how much" of the change in overall spending is "accounted for" by change in population, is 0.38, which means that 38% of political spending just reflects population changes. Doesn't sound like a big proportion until you start looking into all the other things that could influence political spending in a state. At that point, a single factor that accounts for more than a third of the total becomes a pretty big deal. For social sciences, which look at messy things like people it's a big deal.

But, so what? That's where the ugly map to the right comes in. When you create one of these mathematical models, most of the data won't actually fit exactly on it. The difference between where the model says data would be and where it really turns out to be is called a "residual". The residuals on this model weren't too bad, which is why the R2 is where it is. But there's interesting information in those residuals. Just how much "under" or "over" is a given state? This plots the "under" or "over" for each state. The more orange the state, the more "over" it is in political spending per person. The more blue a state, the more "under" it is in political spending per person. White would be a state that fits the model perfectly (zero residual). The black states have no data. If you hover your mouse over a state, you'll see how much money per person has been spent so far on political TV ads in that state. Remember, this was all done on cost-of-living adjusted money, so claiming that a state is just "more expensive" doesn't quite hold water.

That's it. Nothing big, nothing elaborate, no social commentary. I was just curious and decided to share my look-see.