Difference between revisions of "United States presidential election, 2012"

From Testiwiki
Jump to: navigation, search
m (Data)
m
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
[[en:United States presidential election, 2012]]
 +
[[Category:US presidential election 2012]]
 +
[[Category:Code under inspection]]
 
{{encyclopedia|moderator=Jouni|stub=Yes}}
 
{{encyclopedia|moderator=Jouni|stub=Yes}}
In August 13, 2012, Francois Choquette and James Johnson published a paper claiming that there are such features in the Republican primary election results that are statistically implausible to occur in an election that has not been manipulated.<ref>Francois Choquette, James Johnson: Republican Primary Election 2012 Results: Amazing Statistical Anomalies. The Money Party, 2012.  
+
In August 13, 2012, Francois Choquette and James Johnson published a paper claiming that there are such features in the Republican primary election results that are statistically implausible to occur in an election that has not been manipulated.<ref name="statisticalanomalies">Francois Choquette, James Johnson: Republican Primary Election 2012 Results: Amazing Statistical Anomalies. The Money Party, 2012.  
 
  [http://www.themoneyparty.org/main/wp-content/uploads/2012/10/Republican-Primary-Election-Results-Amazing-Statistical-Anomalies_V2.0.pdf]</ref> In Finland, the issue was first raised by the Facebook group [http://www.facebook.com/groups/OpenDemocracyFinland/ Open Democrary Finland] on October 31, 2012.
 
  [http://www.themoneyparty.org/main/wp-content/uploads/2012/10/Republican-Primary-Election-Results-Amazing-Statistical-Anomalies_V2.0.pdf]</ref> In Finland, the issue was first raised by the Facebook group [http://www.facebook.com/groups/OpenDemocracyFinland/ Open Democrary Finland] on October 31, 2012.
  
Line 10: Line 13:
 
* http://www.occupy.com/article/retired-nsa-analyst-proves-gop-stealing-elections
 
* http://www.occupy.com/article/retired-nsa-analyst-proves-gop-stealing-elections
  
==Data==
+
==Research plan==
 +
 
 +
The reseach question is this:
  
'''Various sources (not evaluated, some not very good)
+
Based on statistical analysis of the election data, is there evidence of fraud in the US presidential election, 2012?
  
* http://search.usa.gov/search?utf8=%E2%9C%93&sc=0&query=primary+election+results+2012&m=&embedded=&affiliate=usagov&filter=moderate&commit=Search
+
# Collect large enough a group of volunteers capable of a) data management, b) statistical analysis, c) wiki working, d) dissemination.
* http://www.elections.ny.gov/2012ElectionResults.html
+
# Work with the primary election data until the real presidential election data comes out on Tuesday.
* http://apps.sos.wv.gov/elections/results/
+
# Develop data management systems for voting data in Opasnet.
* http://www.nvsos.gov/silverstate2012pri/
+
# Develop statistical analyses (based on <ref name="statisticalanomalies"/>) in Opasnet.
* http://hawaii.gov/elections/results/2012/primary/ Data: http://hawaii.gov/elections/results/2012/primary/files/media.txt
+
# Agree on division of tasks for the presidential election.
* http://sos.nh.gov/2012RepPresPrim.aspx?id=12938 Data: sos.nh.gov/WorkArea/DownloadAsset.aspx?id=13168
+
# When the presidential election data becomes available, manage and analyse the data immediately based on the task devision.  
* Arizona: http://results.enr.clarityelections.com/AZ/36496/75798/en/select-county.html Arizona
+
# Publish results widely.
** Counties: http://results.enr.clarityelections.com/AZ/36496/75798/en/md_data.html?cid=105&
+
 
** Precincts: http://results.enr.clarityelections.com/AZ/Apache/36498/73412/en/md_data.html?cid=10&
+
==Data==
* Alabama: http://results.enr.clarityelections.com/AL/38312/86349/en/summary.html
 
** Counties http://results.enr.clarityelections.com/AL/38312/86349/en/md_data.html?cid=30& (similar system as in Arizona)
 
* Louisiana: http://staticresults.sos.la.gov/03242012/03242012_Statewide.html
 
** Counties: http://staticresults.sos.la.gov/03242012/03242012_45596.html
 
* West Virginia: http://apps.sos.wv.gov/elections/results/download.aspx?year=2012&eid=8
 
** Counties: apps.sos.wv.gov/elections/results/readfile.aspx?path=OC84LVN0YXRlQ291bnR5VG90YWxzLmNzdg==
 
* Kentucky: http://results.enr.clarityelections.com/KY/38672/84521/en/select-county.html
 
** http://elect.ky.gov/results/2010-2019/Pages/2012primaryandgeneralelectionresults.aspx
 
  
 
{| {{prettytable}}
 
{| {{prettytable}}
|+ Data of Presidential Primary Elections 2012, Republican Party
+
|+ Data of Presidential Election 2012, including Republican Party Primary Election.
! State|| || County-level data|| Precinct-level data || Description
+
! State|| || Primary election|| Presidential election || Description
 
|----
 
|----
| Alabama|| AL|| [http://results.enr.clarityelections.com/AL/38312/86349/en/md_data.html?cid=30&]|| ||  
+
| Alabama|| AL|| [http://results.enr.clarityelections.com/AL/38312/86349/en/md_data.html?cid=30& Precincts on county files] [http://results.enr.clarityelections.com/AL/38312/86349/en/summary.html]|| ||  
 
|----
 
|----
 
| Alaska|| AK|| || ||  
 
| Alaska|| AK|| || ||  
 
|----
 
|----
| Arizona|| AZ|| || ||  
+
| Arizona|| AZ|| [http://results.enr.clarityelections.com/AZ/36496/75798/en/md_data.html?cid=105& Precincts on county pages] [http://results.enr.clarityelections.com/AZ/36496/75798/en/select-county.html] [http://results.enr.clarityelections.com/AZ/Apache/36498/73412/en/md_data.html?cid=10& Precincts]|| ||  
 
|----
 
|----
 
| Arkansas|| AR|| || ||  
 
| Arkansas|| AR|| || ||  
 
|----
 
|----
| California|| CA|| || ||  
+
| California|| CA|| || [http://vote.sos.ca.gov/returns/president/county/alameda/ Counties] ||  
 
|----
 
|----
 
| Colorado|| CO|| || ||  
 
| Colorado|| CO|| || ||  
Line 56: Line 53:
 
| Georgia|| GA|| || ||  
 
| Georgia|| GA|| || ||  
 
|----
 
|----
| Hawaii|| HI|| || ||  
+
| Hawaii|| HI|| [http://hawaii.gov/elections/results/2012/primary/] [http://hawaii.gov/elections/results/2012/primary/files/media.txt Data]|| ||  
 
|----
 
|----
 
| Idaho|| ID|| || ||  
 
| Idaho|| ID|| || ||  
Line 68: Line 65:
 
| Kansas|| KS|| || ||  
 
| Kansas|| KS|| || ||  
 
|----
 
|----
| Kentucky|| KY|| [http://results.enr.clarityelections.com/KY/38672/84521/en/select-county.html] [http://results.enr.clarityelections.com/KY/38672/84521/en/reports.html] || ||  
+
| Kentucky|| KY|| [http://results.enr.clarityelections.com/KY/38672/84521/en/select-county.html] [http://results.enr.clarityelections.com/KY/38672/84521/en/reports.html] [http://elect.ky.gov/results/2010-2019/Pages/2012primaryandgeneralelectionresults.aspx]|| ||  
 
|----
 
|----
| Louisiana|| LA|| [http://staticresults.sos.la.gov/03242012/03242012_45596.html] || [http://staticresults.sos.la.gov/03242012/03242012_01_45596_Precinct.html Counties separately]||  
+
| Louisiana|| LA|| [http://staticresults.sos.la.gov/03242012/03242012_45596.html] [http://staticresults.sos.la.gov/03242012/03242012_01_45596_Precinct.html Counties separately] [http://staticresults.sos.la.gov/03242012/03242012_Statewide.html]  [http://staticresults.sos.la.gov/03242012/03242012_45596.html Counties]|| ||  
 
|----
 
|----
 
| Maine|| ME|| || ||  
 
| Maine|| ME|| || ||  
Line 78: Line 75:
 
| Massachusetts|| MA|| || ||  
 
| Massachusetts|| MA|| || ||  
 
|----
 
|----
| Michigan|| MI|| || ||  
+
| Michigan|| MI|| [http://miboecfr.nictusa.com/election/results/12PPR/ Counties] || ||  
 
|----
 
|----
 
| Minnesota|| MN|| || ||  
 
| Minnesota|| MN|| || ||  
Line 90: Line 87:
 
| Nebraska|| NE|| || ||  
 
| Nebraska|| NE|| || ||  
 
|----
 
|----
| Nevada|| NV|| || ||  
+
| Nevada|| NV|| [http://www.nvsos.gov/silverstate2012pri/] || ||  
 
|----
 
|----
| New Hampshire|| NH|| || ||  
+
| New Hampshire|| NH|| [http://sos.nh.gov/2012RepPresPrim.aspx?id=12938 Excel, precincts on county sheets] [http://sos.nh.gov/WorkArea/DownloadAsset.aspx?id=13168 Data]|| ||
 
|----
 
|----
 
| New Jersey|| NJ|| || ||  
 
| New Jersey|| NJ|| || ||  
Line 98: Line 95:
 
| New Mexico|| NM|| || ||  
 
| New Mexico|| NM|| || ||  
 
|----
 
|----
| New York|| NY|| || ||  
+
| New York|| NY|| [http://www.elections.ny.gov/2012ElectionResults.html]|| ||  
 
|----
 
|----
 
| North Carolina|| NC|| || ||  
 
| North Carolina|| NC|| || ||  
Line 104: Line 101:
 
| North Dakota|| ND|| || ||  
 
| North Dakota|| ND|| || ||  
 
|----
 
|----
| Ohio|| OH|| || [http://www.sos.state.oh.us/sos/elections/Research/electResultsMain/2012results/2012precincts.aspx Excel] 6th March||  
+
| Ohio|| OH|| [http://www.sos.state.oh.us/sos/elections/Research/electResultsMain/2012results/2012precincts.aspx Excel for precincts] 6th March [https://s3.amazonaws.com/redistricting_supplement_data/redist/dBlock_elect.zip block level election data created by Mark Salling] [http://www.publicmapping.org/resources/data]|| [http://www2.sos.state.oh.us/pls/enrpublic/f?p=212:27:0::NO::: County level] ||
 
|----
 
|----
 
| Oklahoma|| OK|| || [http://www.ok.gov/elections/The_Archives/Election_Results/2012_Election_Results/index.html Zip] 6th March||  
 
| Oklahoma|| OK|| || [http://www.ok.gov/elections/The_Archives/Election_Results/2012_Election_Results/index.html Zip] 6th March||  
Line 110: Line 107:
 
| Oregon|| OR|| || ||  
 
| Oregon|| OR|| || ||  
 
|----
 
|----
| Pennsylvania|| PA|| || ||  
+
| Pennsylvania|| PA|| || [http://www.chesco.org/index.aspx?NID=2112 Chester county] ||  
 
|----
 
|----
 
| Rhode Island|| RI|| || ||  
 
| Rhode Island|| RI|| || ||  
Line 130: Line 127:
 
| Washington|| WA|| || ||  
 
| Washington|| WA|| || ||  
 
|----
 
|----
| West Virginia|| WV|| || [http://apps.sos.wv.gov/elections/results/download.aspx?year=2012&eid=8 ] 8th May||  
+
| West Virginia|| WV|| [http://apps.sos.wv.gov/elections/results/download.aspx?year=2012&eid=8]
 +
[http://apps.sos.wv.gov/elections/results/readfile.aspx?path=OC84LVN0YXRlQ291bnR5VG90YWxzLmNzdg== Counties]|| [http://apps.sos.wv.gov/elections/results/download.aspx?year=2012&eid=8 Precincts in county-specific files] 8th May||  
 
|----
 
|----
 
| Wisconsin|| WI|| || ||  
 
| Wisconsin|| WI|| || ||  
Line 167: Line 165:
 
* [http://www.chicagotribune.com/search_results/?q=amazing+statistical+anomalies Chicago Tribune]
 
* [http://www.chicagotribune.com/search_results/?q=amazing+statistical+anomalies Chicago Tribune]
 
* [http://en.wikipedia.org/wiki/Talk:United_States_presidential_election,_2012#Voting_fraud_concern.2C_get_more_sources.3F Wikipedia talk page about the election] (fraud issue raised 29th October, no activity since)
 
* [http://en.wikipedia.org/wiki/Talk:United_States_presidential_election,_2012#Voting_fraud_concern.2C_get_more_sources.3F Wikipedia talk page about the election] (fraud issue raised 29th October, no activity since)
 +
 +
===Calculations===
 +
 +
With this code, you can reproduce parts of the original Choquette and Johnson paper.
 +
 +
<rcode graphics="1">
 +
library(OpasnetUtils)
 +
library(ggplot2)
 +
 +
###### Graph functions
 +
 +
fig <- function(data, candidate, log = TRUE) {
 +
out <- ggplot(data[data$Candidate == candidate , ], aes(x = Tally, y = Support)) +
 +
geom_point(shape=1) +    # Use hollow circles
 +
geom_smooth() +          # Add a loess smoothed fit curve with confidence region
 +
geom_smooth(method = lm) +
 +
opts(
 +
axis.text.x = theme_text(size = 20),
 +
axis.text.y = theme_text(size = 20),
 +
axis.title.x = theme_text(size = 20),
 +
axis.title.y = theme_text(size = 20, angle = 90),
 +
legend.text = theme_text(size = 20),
 +
legend.title = theme_text(size = 20),
 +
title = paste("Smoothed regression of support of ", candidate, " along the size of precinct"),
 +
plot.title = theme_text(size=20)
 +
) +
 +
scale_y_continuous("Candidate result in precinct, %") +
 +
if(log) {scale_x_log10("Vote tally in precinct") } else {scale_x_continuous("Vote tally in precinct") }
 +
 +
return(out)
 +
}
 +
 +
cumfig <- function(data, candidate) {
 +
out <- ggplot(data[data$Candidate == candidate , ], aes(x = Cumtally, y = Cumsupport)) +
 +
geom_point(shape = 1) +
 +
geom_smooth()
 +
return(out)
 +
}
 +
 +
## OHIO ELECTION DATA NOV 2012
 +
 +
Fetch2(data.frame(Name = "election.ohio.2012", Key = "SSDDvuDfVDKOhlkO"))
 +
colnames(election.ohio.2012@data)[colnames(election.ohio.2012@data) == "REGISTERED_VOTERS"] <- "Tally"
 +
 +
election.ohio.2012@data <- merge(
 +
election.ohio.2012@data,
 +
as.data.frame(as.table(tapply(election.ohio.2012@data$Result, election.ohio.2012@data[c("County", "Election")], sum)))
 +
) # Total votes for each county and election.
 +
 +
 +
election.ohio.2012@data$Support <- election.ohio.2012@data$Result / election.ohio.2012@data$Freq
 +
 +
 +
fig(election.ohio.2012@data, "Obama, Barack (D)")
 +
fig(election.ohio.2012@data, "Romney, Mitt (R)")
 +
 +
 +
# OHIO PRESIDENTIAL PRIMARY ELECTION DATA
 +
 +
#data.oh <- opasnet.csv("c/c8/RepublicanPrimaryElection2012_8-StateCountyTotals.csv")
 +
#head(data.oh)
 +
 +
# OKLAHOMA PRESIDENTIAL PRIMARY ELECTION DATA
 +
 +
data.ok <- opasnet.csv("6/6e/PrimaryElection2012OKresults_20120306.csv", sep = ",", header = TRUE)
 +
 +
data.ok <- data.ok[data.ok$Race_desc == "FOR PRESIDENT" & data.ok$Race_party == "REPUBLICAN" , ]
 +
data.ok$Cand_desc <- data.ok$Cand_desc[ , drop = TRUE] # Drop unused levels of candidate names.
 +
 +
data.ok$Precinct <- as.factor(data.ok$Precinct) # Change precinct numbers to factors.
 +
 +
Totals <- as.data.frame(as.table(tapply(data.ok$Total_votes, data.ok["Precinct"], sum))) # Total votes for each precinct.
 +
data.ok <- merge(data.ok, Totals)
 +
data.ok$Support <- data.ok$Total_votes / data.ok$Freq
 +
 +
# Order precincts from smaller to larger and calculate candidate-specific cumulative sums.
 +
 +
data.ok <- data.ok[order(data.ok$Freq), ]
 +
for(i in levels(data.ok$Cand_desc)) {
 +
data.ok$Cumvote[data.ok$Cand_desc == i] <- cumsum(data.ok$Total_vote[data.ok$Cand_desc == i])
 +
data.ok$Cumtally[data.ok$Cand_desc == i] <- cumsum(data.ok$Freq[data.ok$Cand_desc == i])
 +
}
 +
 +
colnames(data.ok)[colnames(data.ok) == "Freq"] <- "Tally"
 +
colnames(data.ok)[colnames(data.ok) == "Cand_desc"] <- "Candidate"
 +
 +
 +
# Calculate cumulative support
 +
 +
data.ok$Cumsupport <- data.ok$Cumvote / data.ok$Cumtally
 +
 +
ggplot(data.ok, aes(x = Cumtally, y = Cumsupport, colour = Candidate)) +
 +
geom_line(size = 1.2) +
 +
opts(
 +
axis.text.x = theme_text(size = 20),
 +
axis.text.y = theme_text(size = 20),
 +
axis.title.x = theme_text(size = 20),
 +
axis.title.y = theme_text(size = 20, angle = 90),
 +
legend.text = theme_text(size = 20),
 +
legend.title = theme_text(size = 20),
 +
title = "Cumulative support of candidates, Oklahoma Primary election, March 6th, 2012",
 +
plot.title = theme_text(size=20)
 +
) +
 +
scale_x_continuous("Cumulative vote tally") +
 +
scale_y_continuous("Candidate result, fraction", limits = c(0, 0.5))
 +
 +
fig(data.ok, "JON HUNTSMAN")
 +
fig(data.ok, "MICHELE BACHMANN")
 +
fig(data.ok, "MITT ROMNEY")
 +
fig(data.ok, "MITT ROMNEY", log = FALSE)
 +
fig(data.ok, "NEWT GINGRICH")
 +
fig(data.ok, "NEWT GINGRICH", log = FALSE)
 +
fig(data.ok, "OVER VOTES")
 +
fig(data.ok, "RICK PERRY")
 +
fig(data.ok, "RICK SANTORUM")
 +
fig(data.ok, "RICK SANTORUM", log = FALSE)
 +
fig(data.ok, "RON PAUL")
 +
fig(data.ok, "UNDER VOTES")
 +
 +
</rcode>
 +
 +
{{comment|# |Code seems to work, but gives a huge yellow errorbox.|--[[User:Heta|Heta]] 12:53, 27 August 2013 (EEST)}}
 +
 +
* [http://wiki.stdout.org/rcookbook/Graphs/Scatterplots%20%28ggplot2%29/ Help for geom_smooth()]
 +
 +
[[image:Cumulative support in Oklahoma primary election 2012.png|thumb|500px|The data does indeed show like in the Choquette and Johnson paper. Compare to Fig 6 in <ref name="statisticalanomalies"/>]]
  
 
==See also==
 
==See also==
Line 172: Line 296:
 
* [[:op_fi:Venäjän vaalit 2011]]
 
* [[:op_fi:Venäjän vaalit 2011]]
 
* [http://www.ukprogressive.co.uk/breaking-retired-nsa-analyst-proves-gop-is-stealing-elections/article20598.html An UK column about the Amazing Statistical Anomalies paper]
 
* [http://www.ukprogressive.co.uk/breaking-retired-nsa-analyst-proves-gop-is-stealing-elections/article20598.html An UK column about the Amazing Statistical Anomalies paper]
 +
* [http://swampland.time.com/2012/11/07/inside-the-secret-world-of-quants-and-data-crunchers-who-helped-obama-win/print/ Inside the Secret World of the Data Crunchers Who Helped Obama Win]
 +
* [http://www.stanford.edu/~jrodden/chen_rodden_florida.pdf Tobler’s Law, Urbanization, and Electoral Bias: Why Compact, Contiguous Districts are Bad for the Democrats] by Jowei Chen
  
 
==References==
 
==References==

Latest revision as of 09:53, 27 August 2013


In August 13, 2012, Francois Choquette and James Johnson published a paper claiming that there are such features in the Republican primary election results that are statistically implausible to occur in an election that has not been manipulated.[1] In Finland, the issue was first raised by the Facebook group Open Democrary Finland on October 31, 2012.

Websites describing the situation

Research plan

The reseach question is this:

Based on statistical analysis of the election data, is there evidence of fraud in the US presidential election, 2012?

  1. Collect large enough a group of volunteers capable of a) data management, b) statistical analysis, c) wiki working, d) dissemination.
  2. Work with the primary election data until the real presidential election data comes out on Tuesday.
  3. Develop data management systems for voting data in Opasnet.
  4. Develop statistical analyses (based on [1]) in Opasnet.
  5. Agree on division of tasks for the presidential election.
  6. When the presidential election data becomes available, manage and analyse the data immediately based on the task devision.
  7. Publish results widely.

Data

Data of Presidential Election 2012, including Republican Party Primary Election.
State Primary election Presidential election Description
Alabama AL Precincts on county files [2]
Alaska AK
Arizona AZ Precincts on county pages [3] Precincts
Arkansas AR
California CA Counties
Colorado CO
Connecticut CT
Delaware DE
Florida FL
Georgia GA
Hawaii HI [4] Data
Idaho ID
Illinois IL
Indiana IN
Iowa IA
Kansas KS
Kentucky KY [5] [6] [7]
Louisiana LA [8] Counties separately [9] Counties
Maine ME
Maryland MD
Massachusetts MA
Michigan MI Counties
Minnesota MN
Mississippi MS
Missouri MO
Montana MT
Nebraska NE
Nevada NV [10]
New Hampshire NH Excel, precincts on county sheets Data
New Jersey NJ
New Mexico NM
New York NY [11]
North Carolina NC
North Dakota ND
Ohio OH Excel for precincts 6th March block level election data created by Mark Salling [12] County level
Oklahoma OK Zip 6th March
Oregon OR
Pennsylvania PA Chester county
Rhode Island RI
South Carolina SC
South Dakota SD
Tennessee TN
Texas TX
Utah UT
Vermont VT
Virginia VA
Washington WA
West Virginia WV [13]

Counties|| Precincts in county-specific files 8th May||

Wisconsin WI
Wyoming WY

From the Coquette and Johnson paper

  1. US Census Bureau: Census 2000 U.S. Gazetteer Files. County locations: [14]
  2. US Census Bureau: Population, Housing Units, Area, and Density 2010. Broken?
  3. Iowa Election Results, January 3, 2012: [15]
  4. New Hampshire Election Results, January 10, 2012: [16]
  5. Arizona Election Results, February 28, 2012: [17] [18]
  6. Ohio Election Results, March 6, 2012: [19]
  7. Oklahoma Election Results, March 6, 2012: [20]
  8. Alabama Election Results, March 13, 2012: [21] [22]
  9. Louisiana Election Results, March 24, 2012: [23] [24]
  10. Wisconsin Election Results, April 3, 2012: [25]
  11. West Virginia Election Results, May 8, 2012: [26]
  12. Kentucky Election Results, May 22, 2012: [27]
  13. [28] [29]


Unsuccessful searches of the claimed fraud

The claim that a major presidential candidate is in the finals because of an election fraud is a very severe one. One could assume that this would make headlines, if evidence is strong. However, nothing has been found from the major U.S. daily newspapers.

Calculations

With this code, you can reproduce parts of the original Choquette and Johnson paper.

+ Show code

--# : Code seems to work, but gives a huge yellow errorbox. --Heta 12:53, 27 August 2013 (EEST)

Error creating thumbnail: Unable to save thumbnail to destination
The data does indeed show like in the Choquette and Johnson paper. Compare to Fig 6 in [1]

See also

References

  1. 1.0 1.1 1.2 Francois Choquette, James Johnson: Republican Primary Election 2012 Results: Amazing Statistical Anomalies. The Money Party, 2012. [1]

Related files

<mfanonymousfilelist></mfanonymousfilelist>