4 ms·
Is there a link to a more technical version of this somewhere? That might settle alot of the debates going on (on this website that is).
by Dilpil 17y ago
Is there a link to a more technical version of this somewhere? That might settle alot of the debates going on (on this website that is).
- earl 17y agoYou can go straight to their website, but here is an alternate analysis. My apologies for not having time to do both their analyses, I'll try when I get home, but I have to run. Grab their data: Iran_2009.csv Then: (apparently I can't embed preformatted text. Sorry.) Try this: http://img.skitch.com/20090621-xrmw8yrxaec15jku414ffb2cjq.png http://img.skitch.com/20090621-xrmw8yrxaec15jku414ffb2cjq.pn... -or- http://earlh.com/HN/iran.R http://earlh.com/HN/iran.R , and http://earlh.com/HN/Iran_2009.csv http://earlh.com/HN/Iran_2009.csv Here's a histogram: http://img.skitch.com/20090621-ewdbtr9q2cw5hyemn64fg3kbqd.png http://img.skitch.com/20090621-ewdbtr9q2cw5hyemn64fg3kbqd.pn... The p-value I get is p-value = 0.07685 NB: there is something weird going on with their data: it doesn't sum properly. http://img.skitch.com/20090621-dx6nqws4u9rc5p3nghsnuy24j3.png http://img.skitch.com/20090621-dx6nqws4u9rc5p3nghsnuy24j3.pn... --------- So, the way this works is that I look at the last digit in each of the totals, then ask what is the probability that we should observe such a distribution of final digits if the final digit were distributed as discrete uniform U[0,9]. I use a chi2 goodness of fit test, then calculate the p-value with H0 = the final digits are distributed uniformly. We would reject H0 and say the election was rigged at an alpha level of 0.9, but not at 0.95. Take of this what you will, but I'd hope to have a higher significance level for elections. : shrug :
- mattyb 17y agohttp://news.ycombinator.com/formatdoc http://news.ycombinator.com/formatdoc
- earl 17y agoOh thanks! I suck for missing that... Code for above: d <- read.csv(file='~/stuff/earlh/Iran_2009.csv', header=T, sep=',') lastDigit <- function(v){ v - 10*floor(v/10) } digits <- lastDigit( c(d$Ahmadinejad, d$Karroubi, d$Mousavi, d$Rezaee)) hist(digits, breaks=10) #chi2 gof tab <- table(digits) n <- length(digits) model <- chisq.test(x=tab, p=rep(0.1, 10)) model # hand generated -- check our work above ts <- 0 for(i in 1:length(tab)){ ts <- ts + ( tab[[i]] - 0.1*n)^2 / (0.1*n) } qchisq(p=1-0.076, df=9)