To read more on the methodology of our site's election forecasts, See Here

To see the details on our latest forecast, See Here

To see how well our 2008 election forecasts turned out, See Here. Java Applet here.

Sunday, November 15, 2009

Gerrymandering, Compactness, and Tobler's law

Via Professor Andrew Gelman, a fascinating paper on Legislature Districting (Not a phrase often said...) To quote the abstract:

When one of the major parties in the United States wins a substantially larger share of the seats than its vote share would seem to warrant, the conventional explanation lies in manipulation of maps by the party that controls the redistricting process. Yet this paper uses a unique data set from Florida to demonstrate a common mechanism through which substantial partisan bias can emerge purely from residential patterns. When partisan preferences are spatially dependent and partisanship is highly correlated with population density, any districting scheme that generates relatively compact, contiguous districts will tend to produce bias against the urban party. In order to demonstrate this empirically, we apply automated districting algorithms driven solely by compactness and contiguity parameters, building winner-take-all districts out of the precinct-level results of the tied Florida presidential election of 2000. The simulation results demonstrate that with 50 percent of the votes statewide, the Republicans can expect to win around 59 percent of the seats without any "intentional" gerrymandering. This is because urban districts tend to be homogeneous and Democratic while suburban and rural districts tend to be moderately Republican. Thus in Florida and other states where Democrats are highly concentrated in cities, the seemingly apolitical practice of requiring compact, contiguous districts will produce systematic pro-Republican electoral bias.


The fear with district design is that the designers could create twisted unnatural districts that ensures a party can win a majority of districts, even if they receive less votes then the opposition.


U.S. congressional districts covering Travis County, Texas (outlined in red) in 2002, left, and 2004, right. In 2003, the majority of Republicans in the Texas legislature redistricted the state, diluting the voting power of the heavily Democratic county by parceling its residents out to more Republican districts.[Wikipedia]

A standard proposed solution to this problem is to take the subjectivity out of drawing districts by requiring districts to be compact(Round). But the authors find that this seemingly fair solution creates a large anti-urban and correspondingly pro-Republican bias unless there are either an absurdly high or absurdly low number of districts.


Republican share of seats after algorithmically creating n compact districts.

The crux of their result lies in a vote-theoretic version of Tobler's law
, that the probability of two voters voting in tandem is roughly inversely proportional to their distance from each other. The paper find empirical evidence of the law in the five elections they looked at.



This is more than just an urban-rural divide because of it's voter-invariance. As can be seen from the map below, there are rural blue counties, and they tend to cluster near other rural blue counties.



Assortative mixing and conformity are the main causes of a Tobler-like relationship that comes to mind. That is to say, either Democrats tend to move away from areas with large numbers of Republicans, or people who live near lots of Democrats tend to conform to local consensus, or a combination of both. Of course, more research is necessary to say which.

But to return to districting, the authors seem to show that a non-trivial consequence of Tobler's law is that placing a compactness restraint on districts produces biased and unrepresentative legislatures.

Then how do we ensure fair and representative districting? Gelman suggests multimember districts as a way around the problem, an idea that Matthew Yglesias has mentioned before. But why not a restraint of the form "If voters from the last election voted under the the proposed districting, the proportion of Democratic seats to Republican seats must be as close as possible to the proportion of Democratic voters to Republican voters"? Of course using Proportional Representation makes this whole issue irrelevant...

Update: Based on questions, I think a summary would be useful:

f we get rid of "funny-looking" districts and make all districts roughly round with equal population, there will be a strong Republican bias. That is to say, some form of gerrymandering(in the form of funny looking districts) is necessary in order to have a representative legislature.

Update 2: In the comments, I wrote the following theoretical explanation for the relationship between Tobler's law and skewed legislatures:

Here's another way to look at it. Suppose that Tobler's law holds (That your probability of voting for the same guy as someone else is inversely proportional with distance) and that your districts have to be roughly circular with equal population(say, 100,000).

Let's consider a district centred in an urban district. Since population density is so high, the circle is going to be pretty small if it's going to have 100,000 people. Because the area is so small, Tobler's law predicts that the variation inside your district is going to be pretty small.

Meanwhile, a suburban district is going to be pretty big, so Tobler's law predicts higher variation in votes then in the smaller district.

The end result is that your urban districts will be really lop-sided, so that the urban party will "waste" most of their votes, leaving the rural party with more seats

The main way around it, is that we have to make our districts funny looking and twisted...which is roughly the status quo, actually. Multimember districts or PR would do it too...

Sunday, November 8, 2009

h/t Visualisation of the House Health-Care Vote

Professor Simon Jackman has a great visualisation of the Health Care vote over here. His post isn't very long, so I'll post the whole thing:

Here is a quick look at how Democrats split on the House vote on the Affordable Health Care for America Act, as a (logistic) function of Obama vote in their district.

Healthcareobamavote-2

Davis (AL-7) and Kucinch (OH-10) are the big “errors” among the “Noe” votes; Kucinch had been telegraphing his opposition to a too meek reform bill for some time. Davis is the same boat (“is this the best we can do?“).

Marion Berry (AR-1) is the biggest “error” among the “Aye” votes; he voted yes while representing an Arkansas district where McCain got 59% of the vote and Obama just 38% (but, perhaps reflecting much about that part of Arkansas, he was unopposed in the 2008 Congressional elections) and he seems to have long history of being in the forefront of Democratic reform efforts on health care.

To add another bit of information, the only Republican crossover was Joseph Cao of New Orleans, whose seat will probably belong to a democrat soon...

Wednesday, November 4, 2009

Preliminary Judgement

While it's very important to wait for certified returns, it's now possible to get an idea of how our forecasts performed yesterday.

I'll write out more commentary and thoughts later, but I've got some errands to run and just wanted to get the raw data out there.

First, a summary:



We did better, but the difference between Pollster's performance and ours isn't large enough to be conclusive with so few races.

FiveThirtyEight didn't post margin estimates this year, only putting up probabilities derived from what could be described as a decision rule procedure. We didn't forecast the same races, but looking at the ones we both covered and comparing likelihood:



With only 5 races, this doesn't convey much information either. Still, I reserve bragging rights...

More soon!

Tuesday, November 3, 2009

Final 2009 Election Forecast

****Cross-posted at DailyKos***


For those unable to wait a couple hours, our final pre-race forecasts are below.

[7:02 pm EST] Also, fellow Stochastic Democracy Contributor Rasmus is running a live-blog over at DailyKos covering both the big-ticket races and some important local races. It's already 3am in this time zone, but I'll try to post a little over there too as late as I can.

Summary:

New Jersey Governor race:
Corzine (D) 's estimated two-way vote: 49.62% (+/- 1.53)
Corzine (D) 's estimated three-way vote: 44.55% (+/- 2.54)
Corzine (D) 's estimated probability of victory: 33%
Most Likely Outcome : Chris Christie (R) victory (67% chance)

Virginia Governor race:
Deeds (D) estimated two-way vote: 42.69% (+/- 2.89)
Deeds (D) estimated probability of victory: Rounding error...
Most Likely Outcome: Bob McDonnell (R) victory

New York City Mayor Race:
Bloomberg (I) 's estimated two-way vote: 58.1% (+/- 1.47)
Bloomberg (I) 's estimated probability of victory: >99%
Most Likely Outcome: Micheal Bloomberg (I) victory

Maine Gay Marriage Proposition:

Prop 1's estimated support: 52.36% (+/- 4.67)
Prop 1's estimated probability of passage: 69.6%
Most Likely Outcome: Passage of Prop 1, leading to the repeal of Gay Marriage in Maine. (69.6% chance)


Special Election in House District NY-23:
Owens (D) ' estimated two-way vote: 46.75% (+/- 5.62)
Owens (D) ' estimated probability of victory: 15%
Most Likely Outcome : Doug Hoffman (C) victory (85% chance)
*Disclaimer: On the basis of a single Sienna Poll with 18% of respondents undecided.

Quick Definitions

Two-Way Vote - The two-way vote strips out third party support and only looks at how the leading candidate does compared to his strongest competitor. It has the useful property that a winning candidate will always win more then 50% of the two-way vote. Formula: 100*Candidate_1/(Candidate_1+Candidate_2)

Three-Way Vote - Like Two-way vote, but for three candidates. Formula: 100*Candidate_1/(Candidate_1+Candidate_2+Candidate_3)

New Jersey

Smoothed Corzine two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering


Democratic Candidate Jon Corzine is forecasted to win 49.62% (+/- 1.53) of the two-way vote and 44.55% (+/-2.54) of the three-way vote. This leaves him with a 33% chance of winning the election, making republican Chris Christie a 3-1 favourite. Christie and Dagget are expected to receive 45.18% (+/-4) and 8.58% (+/- 6.6) of the vote respectively.*

Note how much smaller the margin of error is for Corzine's share of the vote in comparison to Christie and Dagget. This is because most of the variation in the race has been voters jumping between Christie and Dagget, while Corzine voters have mainly kept put.**

This is a close race and there have been a lot of polls showing both Corzine and Christie ahead. But since yesterday, PPP and Quinnepac released pro-Christie polls with large sample sizes that pushed our estimate against Corzine. Keep in mind, these two agencies believe that conservative turnout today will be higher then other pollsters assume. If the other pollster's assumptions were right then Corzine will win, if PPP is right, then there is a much larger enthusiasm gap between Democrats and Republicans then is generally believed.

*Haven't had time to update 3-day estimates from yesterday, so they do not reflect today's polls

*Statistics Trivia: Why do the candidate's vote shares add up to 100? Because when jointly estimating 3 correlated random variables [u, v, w], the vector [Most likely value of u, most likely value of v, most likely value of w] need not be equal to [Most likely combination of u, v, and w]. Joint estimation of 3 or more random variables a little non-intuitive, this makes talking about multi-party races more complicated.


Virginia


Smoothed Deeds two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Democratic Gubernatorial Candidate Creigh Deeds is set to be defeated by Republican Bob McDonnell with 43.23% of the two-way vote.

New York

Smoothed Thompson two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Mayor Bloomberg will annihilate his Democratic challenger Bill Thompson with an estimated 58.1% (+/-1.47) of the two-way vote.

Maine

Smoothed vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Proposition 1, to repeal the State Legislature's legalization of Gay Marriage, is set to pass with 52.36% (+/-4.67) of the vote. However, this outcome is not a sure thing. We estimate that the measure has approximately a 30.45% chance of failing.

This is a strong reversal from our last update, when the amendment had a 70% chance of failing. What happened?

PPP released a poll showing the Yes side 4 points ahead with a large sample size. In this particular case, the Maine election has been very lightly polled, so a single outlier poll with a large sample size like PPP's can push estimates a lot. This is especially true because the few other polls in this race have tiny sample sizes.

Like in New Jersey, PPP shows large Republican leads on the basis of high conservative turnout on one end, while nearly every other pollster forecasts relatively comfortable Democratic victories. It isn't obvious which side is right.



****Cross-posted at DailyKos***

Sunday, November 1, 2009

Election 2009!

Summary:

New Jersey Governor race:
Corzine (D) 's estimated two-way vote: 49.93% (+/- 1.78)
Corzine (D) 's estimated three-way vote: 44.55% (+/- 2.36)
Corzine (D) 's estimated probability of victory: 47.12

Virginia Governor race:
Deeds (D) estimated two-way vote: 43.23% (+/- 3.66)
Deeds (D) estimated probability of victory: Rounding error...

New York City Mayor Race:
Bloomberg (I) 's estimated two-way vote: 58.1% (+/- 1.47)
Bloomberg (I) 's estimated probability of victory: >99%

Maine Gay Marriage Proposition:
Prop 1's estimated support: 51.5% (+/- 3.87)
Prop 1's estimated probability of passage: 22.4%

Special Election in House District NY-23:
Not a clue...

Quick Definitions

Two-Way Vote - The two-way vote strips out third party support and only looks at how the leading candidate does compared to his strongest competitor. It has the useful property that a winning candidate will always win more then 50% of the two-way vote. Formula: 100*Candidate_1/(Candidate_1+Candidate_2)

Three-Way Vote - Like Two-way vote, but for three candidates. Formula: 100*Candidate_1/(Candidate_1+Candidate_2+Candidate_3)

New Jersey

Smoothed Corzine two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Smoothed Corzine three-way vote and 95% confidence intervals.

Democratic Candidate Jon Corzine is forecasted to win 49.93% (+/- 1.78) of the two-way vote and 44.55% (+/-2.36) of the three-way vote. This leaves him with a 47.1% chance of winning the election, making republican Chris Christie a (very) slight favourite.


Virginia


Smoothed Deeds two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Democratic Gubernatorial Candidate Creigh Deeds is set to be defeated by Republican Bob McDonnell with 43.23% of the two-way vote.

New York

Smoothed Thompson two-way vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Mayor Bloomberg will annihilate his Democratic challenger Bill Thompson with an estimated 58.1% (+/-1.47) of the two-way vote.

Maine

Smoothed vote and 95% confidence intervals. Smoothing done via Bayesian filtering

Proposition 1, to repeal the State Legislature's legalization of Gay Marriage, is set to fail with 48.5% (+/-3.87) of the vote. However, this outcome is not a sure thing. We estimate that the measure has approximately a 22.4% chance of passing.

--
Expect an update tomorrow to incorporate last-minute polling.

And, as a quick note, an announcement to explain the paucity of recent posts: I've been in Russia! Specifically the Math in Moscow program. Oddly enough, people here don't find election forecasting to be terribly impressive...

Sunday, June 21, 2009

More than 100% turnout?

This isn't the most sophisticated way of looking at things, but I've been matching up census data with city level voting data.

The census gives a year-by-year age breakdown, so I've conservatively estimate turnout by counting the entire population over the age of 15(The voting age is 18, and the census is 3 years old), and assuming no mortality.

So far, I've only looked at the 10 subdivisions in the Province Yazd, and three provinces stand out with suspiciously high turnout. Saduq(صدوق ), Mehriz(مهريز) , and Taft(تفت) , with 97%, 104%, and 130% turnout respectively. Excluding those provinces, the average turnout was 77%.

Perhaps there is an innocent explanation (Immigration or Migratory workers?), but it warrents explanation. I'll expand the analysis to other provinces and see if the result holds.

Update: See Nate Silver

Friday, June 19, 2009

Iranian Statistics Round-up - Updated 11:35AM June 21st

In the last couple of days, a dizzying number of different statistical arguments have been put forward regarding the legitimacy of the 2009 Iranian election.

In order to keep track of them all, I've made a summary of all the major quantitative arguments I've heard so far and my thoughts on them. Let me know by email or in the comments if I have missed any.


1) Professor Mebane's work

i) Second digit Benford Law test:

Previous research by the professor has found that testing the frequency of the second digit of vote returns is a more reliable measure of electoral fraud then the more traditional first digit test, which can often produce false positives.

He did not find any statistically significant discrepancies using a second digit Benford law test on city-level election returns.

However, his Second-Digit Benford Analysis was developed for precinct level data which has not been available. At such a high level of aggregation, sheer scale can overwhelm foul play. Because of this, conformity to Benford's law is not suggestive of authenticity in this case.

Update[4:35 pm]: Professor Mebane has obtained ballot-level data and indicated that serious discrepencies were found with Karroubi and Rezaee returns, will update when more information is available

Update[9:23 pm]: A report incorporating Ballot-Box returns can be seen here. To quote:

The initially released polling station data show evidence of signi cant distortions
in the vote counts especially for Karroubi and Rezaei. No signi cant distortions are apparentfor Mousavi's vote counts. There is very marginal evidence of distortions in Ahmadinejad's vote counts. A key to interpreting these results is understanding why the vote counts for Karroubi and Rezaei are typically so small. 

Is it (a) inherently low levels of support, (b) voters strategically abandoning the candidates, or (c) fraudulent counts? If there is goodreason to believe either (a) or (b), then (c) is less likely.


ii) Election models:

Professor Mebane found that when conditioning 2009 data on first and second round 2005 data using simple models, he found behavior that violated "natural election processes". He came to the conclusion that it constituted "moderately strong evidence for fraud".

I don't feel qualified to comment on his assertion, but he is considered an expert in this field, and so I attach weight to the fact that he is convinced. Still, I would like to see his methods applied to other elections as a "control"

2) The work of Dr.Roukema
 

Update 4:50PM 5/21 :Updated to reflect comments from the author

His arguments are the following in order of "strength":

i)That reformist candidate Karroubi's vote returns have a large number of excess 7's assuming Benford's law or empircal variations on Benford's law

ii) That Ahmedinejad had an excess number of 2's and a deficit of 1's, according to Benford's law but not according to some Benford variants

iii) That none of the candidates have log-normal distributed returns except for Mousavi.



To me, i is interesting and merits further study, though even the author wouldn't characterize it as conclusive.

This is particularly interesting because the largest discrepancy between Iranian opinion polling and the actual results was the massive collapse in support of Karroubi and Rezaee. Every opinion poll showed their combined support in the double digits, when they ended up obtaining less than 3% of the vote between them.

The major criticism of ii is that there has been research showing that candidate vote returns often do not always conform to Benford's law.


Histogram showing the distribution of vote totals in voting areas is approximately log-normal, pulled from original paper.

As for iii: Statistically, I don't see why total returns on a district level being log-normally distributed would imply that every candidate would have log-normally distributed votes. On the contrary, Log-Normal distributions are not stable under addition, and so at least one of the candidate's returns would need to deviate from a log-normal distribution in order to maintain the observed total vote's log-normality. (At least if you ignore the fact that different candidate vote returns are not independent).

Nate Silver and Professor Andrew Gelman's commentary on all three points are invaluable. See here, here, and here.

Update 11:35 AM June 21st : 
Dr.Roukema has updated his paper, which can be seen here. He finds that evidence that irregularities might have been concentrated in high population areas. 


"Among the six biggest cities, why should those three cities that voted more for Ahmadinejad be exactly the same ones where there are 70xx votes for Karroubi?" - Dr.Roukema


 To quote the abstract:
Three of the six most populous voting areas have
vote totals for K[Karroubi] that start with 7. All three of these have
greater proportions of votes for A[Ahmedinejad] than the other three voting
areas. Interpreting this as an overestimate of the true
vote assumed to be 50% to match other data, while retaining
constant total vote numbers and increasing votes for the
other three candidates in proportion to the average voting
percentages, would imply that the difference between A’s 
and M’s[Mousavi] vote totals would drop by about one million votes.




3) Samuel Wang's look at Tehran Opinion polls

Professor Samuel Wang asserts that while the public opinion polls conducted for Iran at large were all over the place and of suspect quality (Polls ranged from Ahmedinejad +16 to Mousavi +32), polls for Tehran specifically might be more reliable.

He then looks at Tehran-specific polls and finds that the discrepancy between the Ahmedinejad's poll-forecasted winning-margin in Tehran and his official margin there was large enough to be statistically significant. He concludes "For now, my interpretation is that the official returns in Tehran are unbelievable."

Some thoughts:

i) I'm not sure what the polling area the polls referred to when they polled "Tehran", the translation wasn't clear. If they were polling "Tehran, Tehran", then the results would have been within the margin of error.

ii) Focusing on margins obscures the fact that in terms of actual candidate vote-share, the polls seem to have been massively off. Mousavi+Ahmedinejad was estimated to be around 60%, but ended up at 97%. This could have been due to an abnormal number of undecided voters or some other factor, but it should be explored.

4) Nate Silver's Analysis

Nate has had some interesting qualitative analysis and statistical commentary on other research, but his best piece so far has been this , where he shows that Ahmedinejad did not do very well in rural areas in the first round results of 2005, while doing much better in 2009. He posits that such a radical change in the rural-urban divide in so little time is suspicious.


Before: First Round Iranian Elections in 2005


After: First Round Iranian Elections in 2009

I have to check if this result holds on when I replace the Ahmedinejad variable with a "conservative" variable showing the combined support of the 4 conservative candidates in 2005. But so far, this has been one of the most convincing points in favor of fraud I've heard so far.

5) Miscellaneous criticisms


i) Mousavi lost his home region:

I don't find this suspicious. There were some polls conducted by Western Organizations that showed that Ahmedinejad had much higher support than Mousavi among Azeri's, Mousavi's ethnicity. This could be related to unconfirmed reports that Ahmedinejad was a popular administrator in Azerbaijan for 8earlier in his career.

ii) Ahmedinejad won Tehran, which should have gone for Mousavi:

Some polls showed that Ahmedinejad winning Tehran by around the margins that he did. Not only that, but he was formerly elected Mayor of Tehran. I don't find this necessarily suspicious by itself either.

iii) Counting was done implausibly quickly:

Paper ballots can be counted very quickly. It doesn't take very long to call a 63% lead.

iv) There are numerical discrepancies in the voting data.

To summarize the arguments I've previously made here:

There are about 100,000 missing votes, because Valid votes+Invalid votes is 100,000 less than "Total votes".

Also, the percentage of spoiled ballots in a district is highly correlated with the district's reformist candidate vote share, while being negatively correlated with Ahmedinejad vote-share.


Percent of ballots declared invalid vs Candidate vote-share

One simple explanation, would be that new voters are more likely to make mistakes and produce spoiled ballots. But this would imply that the surge in turnout mainly went to reformist candidates. If this was the case, I don't see how Ahmedinejad could have won.

v) The idea that Ahmedinejad's share of the vote stayed too constant while results were being announced to be real. Shown via following popular graph:



This has been thoroughly debunked by multiple sources, see here and here.

Yet Another Iran Stat Analysis

Professor Sam Wang of Princeton, of Princeton Election Consortium fame, just posted an analysis of the 2009 Iranian election here.

Basically, he asserts that while the public opinion polls conducted for Iran at large were all over the place and of suspect quality (Polls ranged from Ahmedinejad +16 to Mousavi +32), polls for Tehran specifically might be more reliable.

Looking at a six-poll aggregate (which includes polls from before the June 3rd presidential debate), the polling median is Mousavi +4 +/- 4 (Median +/- MAD-based SEM), while the 3-poll aggregate (only includes polls from after the June 3rd debate) has a polling median of Mousavi +4 +/- 11.

The announced official result was Ahmedinejad +12% (51.6% to 39.4%), a discrepancy of 16 points. This discrepancy does not reach statistical significance compared with the last 3 polls (p=0.07), but does compared with all 6 polls (p=0.003).

For now, my interpretation is that the official returns in Tehran are unbelievable.




Some points:

1) While the three poll-aggregate discrepancy from the result does not meet the standard threshold for statistical significance (p=0.05), it's sufficiently close so that I would count it as such anyway. The 0.05 statistical significance threshold was not given to us by God, see here.

2) There might be some confusion as to what "Tehran" is. Ahmedinejad supposedly won by 12 points in the "Oshtan" (Region) of Tehran. Yet official results show that Mousavi won Tehran (تهران ), Tehran with 52% of the vote and Mousavi + 8.66. This creates a discrepancy from the polling aggregate of only 4.66 points, a result fully within the margins of error of both the three and six poll aggregate.

It is possible that pollsters conducting estimates of "Tehran" were only polling people in "Tehran, Tehran", much like polls of New York City wouldn't include anyone from Albany in their sample. People with local expertise should speak up.

3) I can't find the Tehran poll internals in English, but based on a relatively incomprehensible translation courtesy of Google, it seems that 34.4% of respondents in a pre-election poll indicated that they would not vote for either Mousavi or Ahmedinejad.

According to the official results, only 3% of voters in the Tehran province voted for somebody other than Mousavi or Ahmedinejad.(1% for reformist candidate Karroubi and 2% for conservative Rezaee).

The 34.4% might include Undecided/Don't know/Refused (knowledge of Farsi would be useful), but even then, this is a suspicious discrepancy that warrants further study.

Thursday, June 18, 2009

Breaking - "I think the results give moderately strong support for a diagnosis that the 2009 election was affected by significant fraud."

Professor Mebane, whose analysis we have linked to earlier, has just updated his report.

More in depth analysis on it later, but after looking at first-round data from 2005, he finds evidence of significant discrepancies.

See it here.

Money Quote:

"The results give moderately strong support for a diagnosis that the 2009 election was affected by significant fraud."

Wednesday, June 17, 2009

New Benford Law Analysis [Update:4:01 pm 6/18]


Hot off the arXiv, Dr.Roukema has published an
analysis of the 2009 regional level data, finding evidence of serious anomolies.


Some highlights:

Benford's Law says that numbers starting with the digit 7 should occur about log10(1-1/7) = 5.7% of the time. So for 366 voting areas, the first digit should be 7 for about 21 voting areas, plus or minus (one standard deviation) roughly sqrt(21) = 4.6. But the actual table published by the MOI gives 41 vote counts for Karroubi starting with 7. This is about four standard deviations too high.

They also found deviations from Benford's law that they deem highly significant(p=0.0069) when analysing Karoubbi returns. Karoubbi is the canidate who recieved less than 1% of the vote after recieving 17% of the vote in 2005, an outcome that many commentators have deemed suspicious.

After examining Ahmedinejad's vote returns, they find that if the standard version of Benford's law applies, then a larger number of voting areas have vote numbers that start with the digit 2, and find fewer than expected digits that start with the digit 1. The authors speculate:

If we were to consider the alternative hypothesis that someone interfered with the data in order to increase A’s votes, replacement of 1’s by 2’s in a few dozen voting areas would be one method of achieving this without leading to numbers that are “obviously” artificial.

Lastly, to quote the abstract regarding this alternative hypothesis

A less significant anomaly suggested by Benford’s Law could be interpreted
as an overestimate of candidate A’s total vote count by
several million votes.

Update:

I'm not sure how much weight to actually put toward this analysis. It certainly is interesting and warrants further research, but it is not itself conclusive(As the author would likely agree).

See Andrew Gelman (here and here) and Nate Silver. (Gelman has some good notes elsewhere on his blog as well) And to quote an Professor Mebane when asked to comment.

In general my research has not focused on first digits, because in the precinct-level data I've emphasized first digits are often arbitrarily distributed (far from Benford) while second digits match the distribution. Here of course the data are much more highly aggregated than precincts. My discussion of the second digits has so far also turned up a few oddities (e.g., Table 4), but I don't know what to make of them. I have some ideas of further things to look at. Overall I don't know that I expected the first digits to satisfy Benford's Law, so I'm not surprised that they are slightly off. But I don't dismiss the finding, either.


Update: changed to reflect the input of the author, Graph courtesy of author.

Monday, June 15, 2009

Iran Elections - Final Update for now [Update: 6/16 1:31 PM]

Professor Mebane of University of Michigan, someone with quite a bit of expertise in election diagnostics, has posted a brief report here based on the city-level election data discussed earlier.

To summarize, the data conforms to Benford's law, but the scale is so large that conformity doesn't prove much. There are a couple of odd findings, but, given the limited data available, it's hard to say anything.

To quote Professor Mebane from private correspondance,

At this point I have no confidence in the election results but also not much concrete evidence to demonstrate they are invalid. If anyone has polling station level data, I'd love to see them.
Update: Professor Mebane has updated his analysis to incorporate 2005 second round district-level data.

In 2005 some opposition politicians called for a boycott of the election. The surge in turnout in 2009 is widely interpreted as meaning that many who boycotted in 2005 decided to vote in 2009. Hence towns that have high ratios should have lower proportions of the vote for Ahmadinejad (the coecient should be negative).

He then tested this hypothisis using a overdispersed binomial model, finding that it worked well for most districts.

In particular, the following districts stood out:

Tabriz, Azerbaijan Sharghi
Terhan, Tehran
Shemiranat, Tehran
Karaj, Tehran
Chabahar, Sistan va Balauchistan
Khash, Sistan va Balauchistan
Zahedan, Sistan va Balauchistan
Saravan, Sistan va Balauchistan
Yazd, Yazd

Anyone with any local knowledge of these regions should leave a comment.
In general, combining the 2005 and 2009 data conveys the impression that a substantial core of the 2009 results reflected natural political processes. In 2009 Ahmadinejad tended to do best in towns where his support in 2005 was highest, and he tended to do worst in towns where turnout surged the most. These natural aspects of the election results stand in contrast to the unusual pattern in which all of the notable discrepancies between the support Ahmadinejad actually received and the support the model predicts are always negative. This pattern needs to be explained before one can have con dence that natural election processes were not supplemented with arti cial manipulations
The updated report can be seen here, while associated data and R-code can be seen here.

Sunday, June 14, 2009

Preliminary Iranian Data Analysis

After looking a bit at the data from the last post:

1) The data seems to confrom to Benford's law, which suggests that if it was falsified, it might have been falsified in an "organic" way(For example, "every 3rd vote for the opponent goes to the incumbant).

With data:
Bin Frequency Freq Theoretical Freq
1 95 0.259 0.301
2 85 0.232 0.176
3 54 0.147 0.125
4 30 0.081 0.097
5 32 0.087 0.079
6 23 0.062 0.067
7 17 0.046 0.058
8 20 0.054 0.051
9 10 0.027 0.046

2) The data isn't entirely clean, the "total" number of votes is larger than the "valid" votes + the "invalid" votes. This leaves about 100,000 votes unaccounted for. This isn't extremely unusual, though on the high side.

3) The number of invalid votes seems high in certain districts. In تركمن in Golestan for example, about 10% of ballots were declared invalid(This was a place where Mousavi did very well).

Furthermore, the percentage of spoiled ballots seems to be higher in regions where the opposition did better.


Statistically, the correlations were statisticly significant (p<.001) for every canidate except Rezaee. This could just mean that Opposition voters are younger and more prone to make mistakes, or it could imply voter suppression and tally bias. But still, invalid votes only made up 1% of ballots, and so even if this was the result of foul play, it wouldn't be enough to change the results.

All and all, I've yet to find convincing statistical evidence for fraud in the data. But I'll keep looking and post findings here. If anyone has any ideas or observations, please let me know in the comments or email me at dms at the-beach.net.



Breaking Update: Iranian Data Found

I've found a lot of Iranian regional data here, from a source here.

I've just started the stat analysis now, we'll see if anything turns up. (What better way to spend a vacation in Paris?). I invite others to do the same.

Iran Update


It seems that Iran doesn't post election returns publicly as a policy. All of the figures that have been touted (Ahmadinejad ahead in Tehran! Mousavi loses in native Azeri areas!, etc), have been figures reported by the state owned media. I'll keep an eye out, but I suppose we shouldn't be suprised that Iran isn't particularly transparent.

Regarding the graph from yesterday thrown around as proof of fraud,
'

More evidence has come out showing that the graph's high R^2 is actually typical of all election returns.

Nate Silver has posted an analysis based on a similated election night from 2008 US data, similar to the analysis that HudsonBayMark did yesterday with data from Latin America, both showing high R^2 values for election returns and concluding that the Iranian graph was not usual.
From Nate Silver's FiveThirtyEight

Most convincingly, VoteForAmerica managed to have real time election return data from the 2008 election laying around.

The empirical evidence cannot be argued; I could go through and create similar graphs for every state and the linear relationship with a very high R^2 would hold. For the record, I did analyze data from California, Minnesota, Vermont and West Virginia to verify this result.


This shows conclusively that the R^2 critique pushed by the Tehran Bureau has no basis. Of course, this doesn't actually prove the election was clean(I personally suspect it was stolen). To quote VoteForAmerica:

The direct result of this research seems to support the idea that the election wasclean, but that in and of itself is peculiar; the election outcome was almost too consistent for an 85% turnout. Either the election was rigged very carefully, or the riggers got lucky; my money's on the former. If a conscious decision had been made to alter the result of this election, it would seem illogical to ignore statistics. The people of power in Iran definitely had the means to ensure that the election appeared clean from a statistical point of view. Going forward, I plainly expect other anomalies to appear, but I highly doubt the smoking gun will come in the form of mathematical/statistical analysis.

Saturday, June 13, 2009

Electoral Fraud in Iran?

**Crossposted at DailyKos**

There has been a lot of discussion about a graph showing partial vote returns that Andrew Sullivan posted on his blog.

Yes, this obviously was a "divine assessment". They didn't even attempt to disguise the fraud. Which, to me, tells me they panicked. This graph is a red flag to Iran and the world.


Is this so unusual? I thought that looking at raw vote totals might make things look artificially fishy.

After some searching, the original data source turned out to be from here. From there, a graph of vote-share can be created:



Considering that 20% of returns had already come in by the first data point, this doesn't seem unusual at all.

I don't have any raw data lying around, but HudsonValleyMark ran a "simulation" of vote returns from an election dataset, finding similar amounts of variation.

Real data would be preferable, and if anyone has any data of real-time election returns out there, please share them in the comments. (I actually have some at home, because I worked on real-time election projection for my blog. But, I'm in Europe at the moment, so that it isn't too useful...)

This doesn't rule out election fraud of course, it only suggests that other avenues should be explored. I'm trying to find regional vote data, to see if I could use something some more traditional data-verification tools (Benford's law, etc). My knowledge of Iranian data sources is limited, so any help in this direction would be greatly appreciated.

**Crossposted at DailyKos**

Wednesday, May 13, 2009

Head's Up - European Parlimentary Elections

The European Parliamentary Elections are coming up, and this site does an excellent job at forecasting.  




The site doesn't seem to make any rigorous attempt at forecasting "temporal error", that is, take into account how public opinion could change between now and the election, though the regression component of their model might implicitly do so.  This is forgivable however, because any attempt at such would involve restrictive assumptions due to the large number of parties and states.

Instead, their model results and distributions can be roughly translated as "What will happen if the election happens tomorrow".



It'd be fascinating to see if the non-normal distributions observed are an artifact of the small sample-size (n=1000)  for his Monte-Carlo simulation or something deeper. Hopefully the authors write about this in the future. 


I've requested the data to see if the model I developed for the Israeli elections might be relevant here, but in the meantime, this is probably one of the best election-forecasting websites created so far.

Friday, May 8, 2009

Unintended Side-Effects from Cap'n'Trade?

MasterResource looks at the effects on global temperature of the proposed Waxman Climate-Change Bill. (OECD90 refers to getting the OECD-30 developed countries to agree to return 1990 emission levels, with other classifications listed here

As the graph shows, not much is accomplished if the US acts unilaterally. 

What concerns me though, is that the effect might be worse, as US cuts in demand cause a large drop in international oil prices due to the high price elasticity of fossil fuels. Depending on the energy efficiency of non-participating countries, this may actually cause an increase in total emissions! Of course, it will spur research and development that would spill over to the rest of the world. How this would all balance out isn't immediately clear. Atleast for coal, which isn't as price sensitive to demand, I'd suspect the latter effect would outweigh the former.

But I'll look around the literature to see if I can model this more rigorously...

Saturday, April 4, 2009

Anti-Mean Reversion

Andrew Gelman at FiveThirtyEight writes 

Beyond that, there's a systematic pattern that Obama did better than the polls in Deomocratic states and worse than the polls in Republican states. Does this represent a real pattern of voters--perhaps people reverting to their more predictable positions at the last minute, with Vermonters moving to the Democrats and residents of Wyoming going the other way? Or maybe it's an artifact of the poll aggregation, with the predictions being pushed too close to 50%, on average? 

This was a point brought up by Sam Wang at the Princeton Election Consortum back in November. 

But since it was November, he dealt with election-day precertified data. Since we have it now, it's better to work with the certified data from December. This distinction makes It makes a large difference. On average, about 3% of the vote is left uncounted in the days immediately after election-day(With Alaska it was 43%!), and so post-election analysis might say more about the characteristics of votes that take a long time to count than anything else.

I quickly revisited the finding about likely voter models, and checked to see if it was true with the post-certified data-set. Checking, it seems Wang's results are very robust . I used my predicted margin because it did not incorporate any regression, making it a better representation of polling consensus. 

Under a weighted-least square regression with robust standard errors (Weighted to account for differing sample sizes across states), the Actual margin was 1.64(+/-.6) points higher than the predicted margin on average (p=.0085).

Under a Least Absolute Deviation without any weights, the actual margin was 1.34(+/-.58) larger than the predicted margin (p=0.03) .

The dataset, containing FiveThirtyEight and Stochastic Democracy forecasts, along with certified vote totals, is available here. Feel free to download it and look for other patterns. 

Gay Marriage Support Over Time

Nate Silver has an interesting write-up where he model's support for Gay Marriage bans accross states. He then proceeds to predict at what point each state would reject a gay-marriage ban ballot initiative.

As he says, 

It turns out that you can build a very effective model by including just three variables:

1. The year in which the amendment was voted upon;
2. The percentage of adults in 2008 Gallup tracking surveys who said that religion was an important part of their daily lives;
3. The percentage of white evangelicals in the state.


This is interesting, and confirms what most people would initialy suspect: Support for gay marriage is primarily determined by religion and decreases over time.

I wouldn't put too much stock the forecast numbers though. The R^2 for his model is only about .66, which is fine for confirming the overlying trends noted above, but really poor for forecasting purposes. It is however, a good initial model.

People don't change their minds about gay marriage very often. So fundementaly, the structural shift in opinions on gay marriage can be explained solely by looking at how quickly the young replace the old. 

Estimating the support among the various age groups could be done individualy for every state by looking at raw survey or exit poll data. This would cut out the uncertainty behind indirectly estimating support via regression. At that point, the support is matched with demographic projections from the senate, and it would be straightforward to predict changes in public opinion over time.

This would automaticaly account for the different demographic structures of each state. For example, a state where young people flee would see it's support for gay marriage evolve differently than one where young people flock. Moreover, it would automaticaly incorporate the idiosyncracies behind a state like Utah. 

Hopefully someone else does it. But if there's a demand, Rasmus and I might take a look into this when we can find time...

Wednesday, April 1, 2009

Partner Reduction and HIV

Ross Douthat, defending the Catholic Church's actions regarding HIV in Africa, says

But it's my impression - created, in large part, by reading Helen Epstein's The Invisible Cure (and if there's a devastating rebuttal to her arguments, please send it my way) - that an awful lot of the money poured into condom-promotion over the years would have much been better spent promoting "partner reduction" in cultures inclined to promiscuity and de facto polygamy instead.


Leaving aside arguments of the practicality behind partner reduction, it's desirability relative to condom promotion is more complicated than he implies.

Consider two sexual networks A and B

Network A represents a case where a prostitute has three clients and a husband, while each of her clients have a wife(A relatively common situation in certain countries).


Network B is more egalitarian , every man and women has two sexual partners.


While the average number of sexual partners is higher in Network B than Network A, a disease would spread far easier in Network A.(This is because the prostitute is "close" to everybody, so she will quickly contract the disease and give it to everyone else).


Taken from Liljeros(2003)

While most people report only a couple sexual partners during their lifetimes, some report several hundred or more. The promiscuity of the average person isn't terribly relevant, it's the small number of "hubs", people who have sex with large numbers of people, who are most important to disease transmission.

In Epidemiology, this is represented by the formula for a disease's basic reproduction number, which tracks how far a disease will spread in a network.


p0 is the average number of infections produced by an
infected person in an uninfected population, σ^2 is the variance of the number of partners, and μ is the mean number of partners in the population.


My concern with Partner reduction is that it's only realistic means of implementation, social stigmatization of sex, might decrease μ a bit, but drastically shoot up σ.

To see how this could happen, imagine if we shifted to a culture where guys usually do not have sex with their pre-marital girlfriends, since that's not something that "good girls do". Instead, some of the guys get their fix by sharing prostitutes.

In this new world, all of the "good girls" have at most 1 partner, and the guys only have one or two. So there has been a lot of partner-reduction. However, because the variance of sexual partners has shot up due to the prostitutes, society has become more vulnerable to STD's.

Epidemiologist Elizabeth Pisani, author of a book I strongly recommend, explained this better than I here:



Because of these complications, I'd shy away from benefit-reduction for the purposes of public-health. After all, it's a rather straightforward case of social engineering, and conservatives like Douthat are usually against that.

Instead, the most effective means of targeting HIV is to focus on making sure the groups that do most of the transmission work(Intravenous drug users, sex workers, and people who have an enormous amount of sex) are using clean needles, condoms, and have access to antiretrovirals. Unfortunately, most conservatives don't seem to favor this approach...

***Cross-Posted at Daily Kos ***

Tuesday, March 31, 2009

Quick Special Election Note

As most political junkies know, there is a special election today in House District NY-20 to determine the successor to now NY-Senator Kirsten Gillibrand.

Unfortunately, there don't seem to be enough non-internal polls for any conclusive predictions, but running what's available through a quick Kalman filter...

Date Observed Filtered MOE
2/18/2009 42.5 43.12 3.92
3/9/2009 47.67442 47.7 3.2536
3/25/2009 52.22222 51.71 3.4496

With an observed volatility of 1.33(+/- .3) (With a sample size of three, keep in mind), The Democrat's probability of winning the race is roughly 68%.

Usual caveats about low special election turnout apply

***Cross-Posted at Daily Kos ***

Wednesday, March 4, 2009

International Fiscal Stimulus

Justin Fox writes about the stimulus packages in other countries. At first glance, it seems that the US, China, and Spain are trying hard, while the rest of the world is shirking.

The concern is that if we in the U.S. do lots of stimulating and other economies don't, much of the money will just leak out overseas as we spend on imports but others don't buy our exports.

These concerns have echoed across the blogosphere. Germany in particular attracted a lot of ire for only spending 0.9% of GDP.

But money does not need to be in a specially branded stimulus package in order to be stimulative. Any deficit spending can do the trick.

I pulled up each of the countries mentioned in the Brookings report, and looked up their deficit numbers from the Economist's Intelligence unit.

It's unclear the extent to which these numbers include the stimulus packages mentioned in the Brookings report, but even if we solely look at deficit spending, Germany looks a lot less frugal(at 3.7% of GDP), while China doesn't seem as generous(at 2.7%).


Country Sum spent (in billions of $) Stimulus % of GDP Deficit % of GDP
Saudi-Arabia 17.3 3.3 11.8
US 787 5.5 11.5
UK 36.35 0.9 11.3
Vietnam 1 1.1 7.3
Spain 113.37 8.1 7.2
Malaysia 1.88 1 6.6
New Zealand 5 3.7 6.5
India 6.3 0.3 6.1
Japan 110 2.3 5.4
France 33 1.3 5.4
Portugal 2.77 1.3 4.5
Italy 5 0.3 4.3
Thailand 300 3.3 4.2
Germany 103.3 1.6 3.7
Russia 20 1.1 3.1
Australia 10.15 0.9 3.1
Chile 4 2.2 3
China 586 6.9 2.7
Philippines 6.12 4 2.7
Hungary 6.5 4 2.6
Belgium 2.52 0.6 2.5
Korea 10.8 1.1 2.2
South Africa 3.76 1.2 1.7
Switzerland 1.34 0.3 1.7
Indonesia 4.5 0.9 1.5
Brazil 3.6 0.2 1.4
Netherlands 7.56 1 1.3
Mexico 54 4.7 1
Argentina 13.2 3.9 0.8
Norway 2.9 0.6 -9.8

County-Level Foreclosure Map




Ezra Klein looks at this graph and writes

“What we had is less a foreclosure problem than a foreclosures in California, Nevada, Arizona, and Florida problem. The way you get 42 states with foreclosure rates beneath the national average is that those last eight states are post-crash dystopias inhabited mainly by squatters and feral dogs. And the way eight states bring down the economy is that the foreclosed assets were heavily leveraged: The whole country might as well have been the Golden State given that Citibank would bet $56 dollars on every buck of California mortgages.”
Matt Yglesias responds

But what I really want is some more fine-grained data. When I was at the Atlantic, we were able to put together a county-level map showing foreclosure rates (no reference to national averages), for my prescient charticle “There Goes the Neighborhood” in our January/February 2008 issue:

foreclosuremap_1.png
Unfortunately, the charticle was so prescient that the data is now hopelessly outdated. And I don’t really know how to get more updated data or make such a good-looking map

Luckily, Hotpads provides rather up-to-date Foreclosure heat maps. While they don't let you see the entire country at once at a county-level, a combination of screen-captures and photo-stitching allows the creation of this:



Not terribly pretty, but conveys the general point: Foreclosures are spreading, as the the poor economy, at first driven south by unexpected foreclosures, causes further foreclosures.

Unfortunately, not that much data analysis can be done, since the owner has refused to make the raw data available on a county-level. Though, someone might be interested with the CD-level data.

Saturday, February 21, 2009

The Pirate Bay

The Pirate Bay, a very heavily influential BitTorrent tracker and founder of a minor political party in Sweden, is in the fifth day of their trial for copyright infringement. My views on copyright are outside the scope of this blog, but I did notice one bizarre quote from the trial:

When Altin asked about the amount of copyright material tracked by TPB, Peter explained that he carried out a survey of a random 1000 torrents from the tracker and 80% of the content linked by the site was not copyrighted, noting that there is much more illegal material on YouTube.

As someone rather familiar with the File Sharing Scene, this initially seemed a little far-fetched to me. But Torrents exhibit Pareto phenomena, where most visitors are concentrated to the most popular downloads. Perhaps a lot of legitimate content was hiding in the long tail.

To obtain a "random" sample of Pirate Bay Torrents, I looked at the 30 most recent torrents, provided here, and checked each one for copyright infringement(The Sample size is rather small, but I can't think of an automated way to check for copyright infringement). I then ran a similar procedure for Youtube.



Bar Graph of results, with red lines showing 95% confidence intervals

I found that about 70% of the torrents on Pirate Bay looked at likely violate US copyright laws, while roughly 30% of the content looked at on Youtube likely violate copyright law. The margin of error, given the sample size, is +/- 16% with 95% confidence.

However, a good deal of the illegal content on The Pirate Bay was very old and obscure(Think, 1960's era Hungarian Jazz), and most of the illegal content on Youtube involved videos that used copyrighted music as a background.

So it's possible, depending on your interpretation of fair use, that Peter's comment is true under Swedish copyright law, but it still seems doubtful that his website is more "clean" than Youtube.

***Cross-Posted at Daily Kos ***

Tuesday, February 10, 2009

Israel Update

It looks like Kadima might pull this off after all.

It wouldn't be good for my accuracy record, but it'd make ever so happy.

Not that I should be glum there. It seems that I predicted the number of seats in the (Arab+Kadima+Labor+Meretz) coalition perfectly at 55 seats. I also correctly predicted that Gil and the Greens would miss the electoral threshold necessary to receive a seat.

But I can't brag too much, since I never released any party specific breakdowns, mainly since I couldn't get a good handle on individual party volatility. (As shown by the surprise shift from Labor to Kadima).


So far, with 99% of the votes counted, the break-down(in order of left to right) is:

Arab Parties: 11
Meretz: 3
Labor: 13
Kadima:28

Likud:27
Yisrael Bitenu:15
Shas:11
Haredi Parties: 12

Everyone is talking about Yisrael Bitenu's role as a "King-Maker", but I'd give that prize to Shas. Yisrael Bitenu is toxic to any coalition.

Because Yisrael Bitenu is not going to be in a coalition with the Arab parties, for obvious reasons, and without the Arab parties, Meretz+Labor+Kadima + Yisrael Bitenu = 59 seats=Not a majority.

And as for their place on in a right-wing coalition, Shas hates them. And if Shas defects to the traditional left-block, then it would push the left to a majority.

So, if anything, I'd say Shas is the king-maker. Shas could easily fit with Kadima or Likud, since it's demands are mainly unrelated to the peace-process(More religious funding, less pork shops, etc). I'm just unsure if they would coalition with the arab parties.

But, we'll see, coalition politics is weird...

Tuesday, February 3, 2009

More Israel

I'm aware that I've promised updates for tonight, but a power-outage and my tendency not to save my work has forced me to set that back by a day or so. In the meantime, I'll go over some of the challenges with generalizing our model to the Israeli elections.

1) Israeli Pollsters usually do not publicize the raw percentages that each party receive in their polls. Instead, they run D'Hont parliamentary seat allocation algorithm used to allocate seats in Israel on their poll, and report the seat outcomes. This creates something best described as rounding error on steroids, entirely negating the advantages of the unusualy large sample sizes found in Israeli polls. Since the D'Hont method is intractable in terms of random variable algebra, this requires a good deal of Monte-Carlo simulation to determine the extent of the possible "rounding error", and incorporate it into the observation error distributions of our Bayesian filter.

2) In the Israeli parlimentary system, parties that recieve less than 2% of the vote have their votes thrown away. Since there are a couple of parties that hover near the electoral threshold, this creates problems for modeling.

The first problem, is that since pollsters only report the number of seats instead of percentages, a poll that shows a party recieving no seats could actualy have had 1.9% of the vote in the sample. Luckily, this Censoring problem is remarkably easy to implement in our Hidden Markov Framework.

The second problem, more fundemental to parlimentary democracy, is that whether or not these small parties reach the threshold has huge effect on the dynamics of potential coalitions. I use Monte-Carlo to do the best I can, but due to the non-tractability of the D'Hont Algorithm, sensitivity analysis is a bit difficult.

3) Moving from two parties to 14 is a huge jump, both analyticaly and computationaly. In order to keep things computationaly feasible(pending a new CPU), I've had to assume that day to day opinion changes are Gaussian. This is not true, as I've gone over before, but the approximation is still pretty good thanks to the Central Limit Theorem.

4) It's really hard to find information on Israeli Pollster Methodology. For example, I have no idea what Israeli pollsters do with undecided voters, or their sampling method. These are low concerns, since the election isn't close at all, but any information on this front from people who speak hebrew would be great.

Finaly, a quote from our Kos page comment forum that I especily enjoyed.

Expecting rationality from humans is a mistake. Expecting it from politicians is a bigger mistake. Expecting it from Israeli politicians ... well .... - plf515

Pretty graphs soon...

Monday, February 2, 2009

Stochastic Democracy: Israel


Left- Smoothed estimate of support for the Left-wing Coalition.
CI- The 95% confidence intervals for what public opinion is today, based on the sampling error in the poll aggregate
FI- The 95% prediction intervals for what the outcome will be on election day, based on estimation of variance when treating polls as observations of a random walk(under a hidden Markov Bayesian framework).


More details tomorrow, but I've modified the Bayesian filter a little to accommodate the upcoming Israeli election(It's a fairly hefty generalization of what we did for the Georgia Senate Race). I'm still working out some of the kinks, but it seems that conventional wisdom is correct. We estimate that Benjamin Netanyahu has an 84% chance of becoming Israel's next prime minister.

As of now, we predict that the likely right-wing block (Likud, Shas, Yisrael Bitenu, Jewish Home, National Union, and United Torah) will win roughly 65 seats in the Israeli Knesset, beating out likely left-wing block (Kadima, Labor, Meretz, and the Arab parties).

The two "swing" parties which do not easily fit on the hawk-dove spectrum, Gil(Senior Citizens Party) and the Greens(Environmentalists), are currently right below the 2% threshold necessary to obtain seats, and the most likely outcome is that they will not obtain any representation.

Note, religious parties have often been in coalition with Labor and (recently) Kadima. Meanwhile, Meretz(and Shinui before it), have coalitioned with Likud.

But for predicting the likely government, we only need to consider 1st choice coalitions. For example, given the choice, Shas would prefer Likud to Labor]

In the past, there have been coalitions of national unity between Likud and Labor, but that is rather unlikely this time around.

Things to Watch For:

There are several parties that are right at the threshold. On the right, Jewish Home, a "Religious Zionist" party, is estimated to have roughly 2.5% support. On the left, Balad, a Arab party, is estimated to have 2.2% support.

The Left's main hope is that Jewish Home fails to make the threshold, while Balad, Gil, and the Greens each manage to get over 2%. If that happens, then it may be possible to lure the neutral parties into a coalition to barely keep Likud out of power.

Strategic Voting Recommendations:

Kadima, Labor, and Meretz voters should vote for Balad(Though they won't), Gil, or the Greens

Right Wing Parties healthily above the threshold should vote for The Jewish Home Party(But they most likely won't, since the Haredi parties are locked in some fued I don't really understand)

Monday, December 29, 2008

Gaza

Much of the talk about the latest attack in Gaza has focused on the morality of the actors involved. It's easy to get sucked into these disputes, but they don't accomplish very much.

Instead, everyone can agree that the current status-quo of endless tit-for-tat violence is bad, both for Israelis and Palestinians.

But in order to move to an equilibrium that benefits both sides of the conflict, we need to better understand the dynamics of the parties involved.

With that in mind, let's analyze the "game" of the Gaza conflict:

The Game

First, assume that the Palestinian factions mainly act rationally to maximize money and power.

There are plenty of angry Palestinians who love to kill Israeli's, but they are for the most part exploited by smarter and more level-headed people for the purposes of power and money.

The players: Israel, and roughly two dozen Palestinian factions of varying power in Gaza.

The game goes as follows: Palestinian factions each individually decide how many rockets to send into Israel, and Israel responds with retaliation against Gaza. Israel's attacks reduce rocket capacity, but also inevitably kill civilians, creating "anger".

This anger fuels recruitment and foreign funding, and Palestinian factions use the manpower from recruitment in order to exploit the economic rents prevalent in a lawless third world country(Road checkpoints, protection money, ect). Palestinian factions send rockets into Israel as a means of capturing this anger driven recruitment and foreign funding.

But this anger creates danger. Radicalized youth are hard to control, and tend to get into costly turf wars. Worse, "insufficient action" against Israel can trigger assassinations(See Sadat, Anwar). And of course, war with Israel can be inconvenient(See Yassin, Ahmed) Most of the players in the game would prefer peace.

Where does this lead? Let's look at the payoff matrix of two equally matched Palestinian Factions.

This is a classic prisoner's dilemma problem. Even though both factions are better off if they refrain from violence, they are only better off if the other party refrains from violence as well. The only way that the Gazans can stop Israeli retaliation is if they all cooperate.

But unfortunately, two dozen factions are never going to unanimously cooperate on anything(And even if they do, factions don't have much control over their members), and individual factions, knowing this, proceed to attack Israel.

This is a fairly simple model to translate into math(Just assume that new recruits are allocated to each faction in proportion to rockets sent, and that Israeli retaliation effects each faction in proportion to their size.), and for most parameter values, an Israeli strategy of "proportional" attacks leads to steady streams of rocket attacks and retaliation, with occasional spikes in violence. This equilibrium is fairly robust to changes in assumptions.

Obviously, Israel is justified to want to "totally change the rules of the game", as Ehud Barrak said.

The question is, how?

More on that tomorrow, in the meantime, I'll step out of my math-major skin and say...

Don't Invade Gaza!

Gaza has been preparing for a potential Israeli invasion for over 3 years. If Israel invades, the number of dead Israeli soldiers would likely far exceed the number of Israelis that could realistically be hurt by Palestinian rocket attacks.

While this might be justified if there was a chance of lasting peace afterwords, there doesn't seem to be a plausible path in that direction. Most likely, there would be a temporary lull in violence, and soon enough, we would end up exactly where we are now.

Except of course, with more dead Israelis and Palestinians.

But as I said, more tomorrow...


Note: The follow-up post was published at our DailyKos site.

Friday, December 26, 2008

Post-Certification Post-Mortem

Now that it seems clear that Democrat Al Franken is going to win the Minnesota Senate race, and with every state having certified their final vote totals, we can look at how accurate Stochastic Democracy fared this election cycle:

Electoral College:


Having some fun...

Our model correctly predicted the winner of the presidential race in every state except Indiana(Where we predicted Obama had a 48% chance of victory).

In terms of electoral votes, our model predicted that Obama would win 364 electoral votes, when he instead won 365.

Altogether, we called 50 out of 51 states/districts correctly, and our electoral forecast was off by 1 vote.

National Vote:

We predicted that Obama would receive 53.76% of the two-way vote. He went on to win 53.68% of the vote.

Senate and Governor:

We correctly predicted the winner of every senate race, as well as predicting that the Georgia Senate race would go to a run-off.

We also correctly predicted the outcome of every Governor race.

Comparison with FiveThirtyEight:

In terms of predicting winners, FiveThirtyEight and our site produced nearly the same predictions. The only differences were:

  1. Due to the lack of polls, we did not provide a forecast for the Omaha district of Nebraska. FiveThirtyEight did provide one, though it was incorrect.
  1. FiveThirtyEight predicted that Republicans would win the Georgia senate seat on Election Day, while we correctly predicted that no canidate would recieve a majority, sending the race to a run-off.


From our Pre-Election final Georgia Projection.

  1. We predicted that Obama would win 364 electoral votes, while FiveThirtyEight predicted that Obama would win 353 electoral votes. Obama actually won 365 electoral votes.

But because of the winner-take-all system, this is not a good way to gauge accuracy. Instead, it is a better idea to look at how we did at predicting the margins in individual states:

Presidential:

In terms of mean absolute error, my model had a slightly lower mean absolute error than his. But the Kurtosis of his prediction residuals is much higher than mine.

That means that most of the time, his predictions were about as accurate as mine. But when his predictions were off, they were really really off. In his defense though, his model was mostly off in states that were not important(Washington DC, Wyoming, etc.)

But, everyone has their own metrics for this sort of thing, so for those who want to see the raw data, click here.

Senate:

As can be seen, FiveThirtyEight outperformed Stochastic Democracy in the Senate by quite a bit. This showcases that some of Nate's methodologies really have something to them, and deserve further study.

Popular Vote:

Stochastic Democracy did quite a bit better than FiveThirtyEight, while Pollster falls in the middle. Of course, this isn't very statistically meaningful.

Also, since I don't want anyone to go through the tedious process of data collection, raw certified election results by state(Presidential, Senate, Governor), are available on a spreadsheet here.

Thursday, December 4, 2008

Econometric Models

Gelman has a nice write-up on Econometric models for election forecasting(Basicaly, models of the form "Plug in GDP Growth, multiply by inflation...").

The subtext behind these models is alluring, and really, most likely true: Campaigns don't really matter much, and elections are mostly determined by external events. But unfortunately, these models have theoretical issues, and they are not particularly useful when it comes to forecasting(Though they might be interesting for other reasons). 

To see what I mean, take a look directly at Hibb's model, referenced by Gelman, here(The meaty details are on page 4). While the theoretical model seems plausible(Namely, that incumbant party vote share is determined by weighted real-income growth over the term and war casualties), the author still is fitting a non-linear model on 14 datapoints. 

Temporarily ignoring how little data we have, these 14 datapoints were observed over 50 years. It's entirely plausible that the parameters involved have changed over the years(For example, voter expectations for real income growth were certainly different in 1952 than they were in 2004). And Crime certainly has some effect on elections, as does distributional effects of real income growth and demographic change.  Unfortunately, there is far too little data to incorporate these real world complications.

Even if we assume the model is perfectly specified, it's off by 2.5 points on average on the data it's been fitted to. This isn't particularly impressive, considering that it uses a data input(Q3 growth reports) that isn't available until a week before the election. This doesn't perform very well compared to poll aggregates available from the same period.

Election outcomes might be a function of external events. But it is likely a very complicated function. Instead of estimating such a complicated function with limited data on shaky theoretical ground, there is a much simpler way of determining who people are going to vote for: Asking them directly.




Tuesday, December 2, 2008

Georgia Run-Off

CNN has now called the Georgia Senate Run-Off to Saxby Chambless.

This isn't particularly surprising, considering the early vote totals.

Nate Silver said on his blog:

" A disappointing night for Democrats. On November 4th, Democrats became the de facto ruling party ... circa 2006 or so, the Dems got very good at figuring out what sort of messaging works when you're in the minority, but that's very different from the sort of messaging you have to do when you're in the majority. There's going to be a temptation in some circles to write this one off to poor African-American turnout or whatever, and that certainly is a large portion of the story. But I think the Democrats need to think carefully about what went wrong here as they begin to gear up for 2010."

I don't see why we need to assess "What went wrong here" too closely when the Democrats control 58(and maybe 59) seats in the senate.

But if we are going to start accessing blame, I'd say there are two main culprits here:

1) Georgia is a very red state

There might be a large number of black voters, but they already turnout well in proportion to their population, and no turnout operation can pull out a victory when Whites vote Republican 70% of the time(From the November Exit Poll).

Instead, Democrat's only path to victory in states like this is to convince large numbers of previously republican voters to vote for them(Like Obama did in Virginia, North Carolina, and Indiana).

I've heard a lot about GOTV efforts in Georgia. And getting out the vote is important. But it's not enough.

I never heard anybody, or more importantly, any ad money being spent, talking about why Jim Martin should be elected. The Republicans had a clear message "Stop the liberal takeover", and they hit it very hard. But I never heard anything resembling a coherent narrative on the Democratic side.

For some reason, we were able to form such a narrative in Indiana, but completely unable to do so in Georgia. I have no idea why, and would love to hear some commentary there.

2) Funding

This is more mundane. During the actual election cycle, Republicans had to distribute their meager funds and resources thinly across the country. After the election, they were able to send all their money to Georgia.

To some extent, this was true with the Democrats as well.

But campaign spending has rapidly diminishing returns(Approximately Square Root, if the Market Mix literature is to be believed). The first million dollars gets you volunteers and a GOTV program. The second million dollars gets you tastier food and nicer cocktails for your donors.

The Democrats were already spending lots of money in Georgia. Sending more organizers after such an extensive effort wasn't going to do much.

The Republicans on the other hand, barely had much of an operation at all. They had a lot to gain by sending in Republican celebrities and pouring money into the state.

And if on November 4th, the Democrat's organizational advantage couldn't eke out a win, it isn't much of a surprise that they couldn't do it after the Republican's redoubled.

Sunday, November 23, 2008

Minnesota Links

This seems like a good time to point out that Vote For America is doing some work on the Minnesota recount.

Update: FiveThirtyEight has it's own projections up. At first glance, Nate's methodology seems quite sound. But, as he says:

The error bars on this regression analysis are fairly high, and so even if you buy my analysis, you should not regard Franken as more than a very slight favorite. Nevertheless, there is good reason to believe that the high rate of ballot challenges is in fact hurting Franken disproportionately, and that once such challenges are resolved, Franken stands to gain ground, perhaps enough to let him overtake Coleman.
I quickly tried to replicate his regression, and a back-of-the envelope MOE is around +/- 600 votes. So it's a coin-toss.

I'm flying to France on Tuesday, so posting is going to be non-existent.

Assignment Desk: Black Turnout and Prop 8

A asks

I'd be interested to see some rigor put to the thesis that high black turnout in CA pushed prop 8 over the top. I know some other people have run back of the envelope numbers, but I'd like to see some serious stats thrown at the problem.


Before we start, some numbers to remember:


Racial breakdowns of the 2008 and 2004 electorate, as well as a breakdown of the population.

Let's recall a useful arithmetic identity that holds in every county in California:

Prop8Support= (Number of White People)*(White turnout)*(White Support)+(Number of Black People)*(Black Turnout)*(Black Support) + ... [ continue this sum for Latinos and Asians]

The racial breakdowns of these counties are available from the Census Bureau, and racial turnout estimates are available from the California exit poll.

But Racial support is not monolithic. White people in San Francisco do not necessarily vote like White people in Orange County. In order to account for that, we perform a county-level regression on the election results to estimate racial support for each county.

We then revert the 2008 racial turnout proportions to what they were in 2004. This gives us an idea of what the vote would have looked like under a "traditional" turnout scenario.

If Proposition 8 fails under such a scenario, it gives credence to the idea that the surge in African American turnout for Obama was responsible for the Proposition's passage.

And that's precisely what happens. Under the "traditional" scenario , without the surge in African-American turnout, my regression model predicts that Proposition 8 would have failed with 49.3% of the vote(+/- ~ .6%) . While the election would have been close, the finding is statistically significant(Though right outside the margin of error).

So to answer A's question: Yes, it seems that the upswing in African-American turnout due to Obama was "responsible" for the passage of proposition 8.

I'm not going to make any commentary here, but I want to point out that even if this was the case, the election was really close. One could "blame" the lackadaisical No-Campaign, or the Mormon Church just as easily as one could African-Americans. So I'm not sure what the point of these kind of questions are.

But to return to my comfort zone, I want to point out that NLS regressions are a bit tricky. Because of this, I've made the regression output available here, and the California County Data(with election results and some regression variables) available here.


Update:
Nate Silver at FiveThirtyEight seems to disagree with me.

Nate's "mistake" seems to be at:

Furthermore, it would be premature to say that new Latino and black voters were responsible for Prop 8's passage. Latinos aged 18-29 (not strictly the same as 'new' voters, but the closest available proxy) voted against Prop 8 by a 59-41 margin. These figures are not available for young black voters, but it would surprise me if their votes weren't fairly close to the 50-50 mark.


African American turnout in California increased from 30% of African Americans voting in 2004, to 50% of African Americans in 2008. This increase is too large to attribute to young black voters, which was the only group that Nate considered.

There seem to have been plenty of older voters who usually didn't vote, who wanted to vote for the first black president, yet were culturally conservative.


Update 2: OrganisedCrime asks

"White people in San Francisco do not necessarily vote like white people in Orange county"? Did/do black people vote the same throughout California, when voting on proposition 8? Where in California were the exit polls taken of black people and who did the polling? CNN? Did you break it down or take this into consideration in the black areas, as you did with white people?


I responded

That information was available on the regression internals on my website, but yes.

My model accounted for county-to-county variation for Blacks, Whites, Latinos, and Asians.

Other than the simple exit poll breakdown of turnout by race, no other polls were necessary, since support could be inferred using a county-level regression.

Friday, November 21, 2008

Assignment Desk

Every week, tons of narratives are spun, most of questionable validity.

Have a favorite pet theory that you'd like to see evidence for? Suspect a pundit was lying but don't have the time, data, or expertise to prove it?

Today's your lucky day!

Post your question or suggested topic on the comment thread below, and Stochastic Democracy's math guy will address the best questions in a new post on the weekend.

Ask Away...

Thursday, November 20, 2008

Georgia

Georgia started early voting. Due to the Civil Rights Act, they have to keep racial statistics on turnout.

See here for data.

Black turnout is at 24%, compared to 30% in November. I don't see Martin winning with those numbers, but we'll have another day of data soon.

Also, exactly two Native American voters, one male and one female. Anyone want to bet it was a couple?

Monday, November 17, 2008

Race and Obama




Referencing Charles Franklin's well known piece on racial polarization, Nate Silver has an alternative idea:

"The driving factor in determining how Obama performed vis-à-vis John Kerry, however, appears as though it might not be race, but rather how much Obama camaigned in a given state. According to the New York Times candidate tracker, Obama campaigned extensively -- by which I mean, he actually went out and spent a lot of time on the ground -- in 6 of the 15 Southern states. These include Virginia, North Carolina, Florida, and Missouri (where Obama campaigned extensively in the general election cycle), as well as South Carolina and Texas (where Obama campaigned extensively in the primaries). The other nine Southern states, Obama did not have more than a couple of apperances in, and several he did not visit at all."


The first and obvious objection, that Obama only campaigned in states where he thought whites would be favorable to him, was addressed by Nate.

I think the most telling example might be South Carolina, which Obama did not campaign in because of any particular demographic strengths, but merely because it happened to enjoy an early position on the primary calendar. In that state, Obama did 4 points better than John Kerry among white voters, even though he didn't really visit the state after January.

So does this story check out?

As much as I'd like to believe so, unfortunately not.

While I haven't yet looked at the 2008 election data(Expect that in a day or two, complete with pretty graphs), I've given a rough look at Racial Polarization in the 2004 elections before on a county-level.

On a county level, the relationship that Dr.Franklin was originally talking about, that Democrats do badly among whites where-ever black people live, seems robust, and has existed for several election cycles.

This isn't to say that Democrats shouldn't try to compete, that's a separate question. But it doesn't seem like the racial polarization in the South can be explained by differences in campaign effort.

Georgia

Chambliss, the Republican Candidate for Senate for the run-off in December, seems to be involved with an ethics scandal.

Intrade doesn't think it will very significant, and we'll have to wait a bit for polls...

Friday, November 14, 2008

Minnesota Recount Prediction

Via Andrew Gelman,

Check out this paper that shows most "undervotes" are going to be supportive of Franken.

Wednesday, November 12, 2008

Ou pas

Alright, Alaskan district breakdowns still are not in. Without that information, the uncertainty bars on my model are too high for me to say anything but this: The Democrats just picked up seat 58.

It might come in later tonight, but I've got an early class tomorrow. So I'll be asleep.

Luckily, Nate Silver is an insomniac, so check FiveThirtyEight for Alaska updates until tomorrow morning.

Holy....

Begich is ahead.

As of writing, it's a 3 vote(Yes, 3 votes) lead...

Still, my regression says the lead should hold....