Correlation between population density & votes for Obama

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Surlethe
HATES GRADING
Posts: 12267
Joined: 2004-12-29 03:41pm

Correlation between population density & votes for Obama

Post by Surlethe »

I was interested in the correlation between population density and tendency to vote Democratic. So, I got some election results data and some population density data and ran a regression. Here are the results - an EViews printout - where PCTDEM is the percentage of people in the county who voted for Obama and DENSITY is population density. Interestingly, the correlation is significant at the 5% level, but R2 = 0.02 and the slope is tiny.

Code: Select all

Dependent Variable: PCTDEM				
Method: Least Squares				
Date: 04/10/09   Time: 08:45				
Sample: 1 3114				
Included observations: 2980				
				
Variable	Coefficient	Std. Error	t-Statistic	Prob.  
				
DENSITY	1.20E-05	1.42E-06	8.441798	0.0000
C	0.410064	0.002535	161.7295	0.0000
				
R-squared	0.023371	    Mean dependent var		0.412870
Adjusted R-squared	0.023043	    S.D. dependent var		0.138825
S.E. of regression	0.137216	    Akaike info criterion		-1.133844
Sum squared resid	56.07079	    Schwarz criterion		-1.129818
Log likelihood	1691.428	    Hannan-Quinn criter.		-1.132395
F-statistic	71.26396	    Durbin-Watson stat		1.318977
Prob(F-statistic)	0.000000			
I plan to go back through the data and double-check them at some point in the near future, as I'm not sure all of the population data are lined up with the correct counties, but in the meanwhile I figured some people might find this interesting.

County-by-county population density. County-by-county election results linked from here.
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Correlation between population density & votes for Obama

Post by Eris »

With a sample size of 2980, your power is going to be pretty damn high so I'm not at all surprised you found some correlation, but honestly with an R2 of 0.02 I wouldn't want to attribute it to anything without more numbers to stare at. That sounds like a very candidate for a common cause to both or something of that nature. Although this makes it interesting for the opposite reason - urban areas tend to be thought of as democratic strongholds, so I would have expected a stronger correlation to be in evidence.

I wonder if the inverse is true and how strongly - I think I may fire up Stata later today and check after I finish my actual work.
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
Grandmaster Jogurt
Jedi Council Member
Posts: 1725
Joined: 2004-12-16 04:01am

Re: Correlation between population density & votes for Obama

Post by Grandmaster Jogurt »

You went county-by-county, right? A possible explanation for the lack of strong correlation is that there aren't many counties that I'm aware of that are purely urban centers (New York's boroughs and Virginia's independent cities being the exceptions that come to mind), and so the high-density counties are going to be largely moderate-to-conservative suburban areas and, in the West, contain vast chunks of highly conservative rural or nearly-uninhabited land.
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Correlation between population density & votes for Obama

Post by Eris »

Here's the raw output:

Code: Select all


. reg pctmccain density

      Source |       SS       df       MS              Number of obs =    3114
-------------+------------------------------           F(  1,  3112) =  143.16
       Model |  2.62173277     1  2.62173277           Prob > F      =  0.0000
    Residual |   56.989607  3112  .018312856           R-squared     =  0.0440
-------------+------------------------------           Adj R-squared =  0.0437
       Total |  59.6113398  3113  .019149162           Root MSE      =  .13533

------------------------------------------------------------------------------
   pctmccain |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     density |  -.0000164   1.37e-06   -11.97   0.000    -.0000191   -.0000137
       _cons |   .5731997   .0024511   233.85   0.000     .5683937    .5780058
------------------------------------------------------------------------------

And for those of you who can't read statistical output, here's a pretty graph, courtesy of Stata, plotting population density in people per square mile versus the percentage vote for McCain:

Image

I saw an R2 somewhat higher than Surlethe's at a 95% confidence and higher, although 0.044 isn't that much greater than 0.023. That is, 4.4% of the variation in voting for McCain can be explained by population density. Also, looking at the graphics enhanced version, the numbers make much more sense. The outliers that voted overwhelmingly Obama were almost all New York - Manhatten, the Bronx, and Queens in particular. However, the massive blob of green is so mixed up in the moderate to low density areas, that it overwhelms the contribution from the large cities and reduces R2. Makes sense to me. Obviously the trend line dips below 0 which is impossible, so this isn't a linear relationship, but it's not bad as a rough visualisation for things at least. For those of you curious, that one relatively dense area that McCain won by 64% is St Louis, Missouri.

Also, Surlethe - the data sets have a few mismatches in how they're organised. For instance, the population density list has Manhattan Island listed as "Kings County" while on the voting list it's just "Manhattan." So far as I can tell it just effects New York (due to NYC being nonstandard), Baltimore, St Louis, Missouri, and Virginia. All due to city/county mismatches. If you didn't, that might explain why my R2 is higher than yours.
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Correlation between population density & votes for Obama

Post by Eris »

Grandmaster Jogurt wrote:You went county-by-county, right? A possible explanation for the lack of strong correlation is that there aren't many counties that I'm aware of that are purely urban centers (New York's boroughs and Virginia's independent cities being the exceptions that come to mind), and so the high-density counties are going to be largely moderate-to-conservative suburban areas and, in the West, contain vast chunks of highly conservative rural or nearly-uninhabited land.
Looking at the graph, this makes more sense. It is county by county, or in some states with cities and counties, or in the case of Alaska just the entire damn state at once. What the graph tells us is that McCain's support was almost exclusively in relatively low density places - probably suburbs and rural areas primarily. Obama by contrast not only swept the cities, but he also did well in low density areas as well. This reduces R2, since it's no longer vote is more Republican/Democrat as you get less/more dense, but vote is more for Obama as you get more dense, and split as you get less dense. Ergo, relatively little explanatory power based on population density alone.
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
User avatar
Surlethe
HATES GRADING
Posts: 12267
Joined: 2004-12-29 03:41pm

Re: Correlation between population density & votes for Obama

Post by Surlethe »

Ack, I was afraid of that. I'll have to go back and check every state individually. On my original dataset, I didn't bother including any of Virginia's cities since there were so many to rearrange, it was late, and I was tired.

How does it regress if you remove the strong outliers? I don't have EViews on my home machine.
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Correlation between population density & votes for Obama

Post by Eris »

Surlethe wrote:Ack, I was afraid of that. I'll have to go back and check every state individually. On my original dataset, I didn't bother including any of Virginia's cities since there were so many to rearrange, it was late, and I was tired.

How does it regress if you remove the strong outliers? I don't have EViews on my home machine.
I cut off New York (or at least, all the boroughs but Staten Island), which clipped off everything above 20,000 people/sq.mi. and the R2 jumped all the way to 0.083. Now we're starting to see a trend I can tentatively get behind. That's about as far as it goes, though - cutting off everything above 10,000 brings R2 up only to 0.086.

Code: Select all

. reg pctmccain density

      Source |       SS       df       MS              Number of obs =    3110
-------------+------------------------------           F(  1,  3108) =  282.58
       Model |  4.91544372     1  4.91544372           Prob > F      =  0.0000
    Residual |  54.0626723  3108  .017394682           R-squared     =  0.0833
-------------+------------------------------           Adj R-squared =  0.0830
       Total |  58.9781161  3109  .018970124           Root MSE      =  .13189

------------------------------------------------------------------------------
   pctmccain |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     density |  -.0000524   3.12e-06   -16.81   0.000    -.0000585   -.0000463
       _cons |   .5803299   .0024521   236.66   0.000     .5755219    .5851379
------------------------------------------------------------------------------

. 
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
User avatar
Jaepheth
Jedi Master
Posts: 1055
Joined: 2004-03-18 02:13am
Location: between epsilon and zero

Re: Correlation between population density & votes for Obama

Post by Jaepheth »

If the data is county by county, aren't your results going to be heavily influenced by gerrymandering?

EDIT: Nevermind, I'm thinking of districts.
Children of the Ancients
I'm sorry, but the number you have dialed is imaginary. Please rotate the phone by 90 degrees and try again.
Post Reply