Inference for Categorical Data in R
Andrew Bray
Assistant Professor of Statistics at Reed College
$H_{0}:$ the election was fair (Benford’s Law holds)
$H_{A}:$ the election was fraudulent (Benford’s Law does not hold)
iowa
# A tibble: 1,386 x 5
office candidate party county votes
<chr> <chr> <chr> <chr> <dbl>
1 President/Vice Pre… Evan McMullin / Nathan Johnson Nominated by Peti… Adair 10
2 President/Vice Pre… Under Votes NA Adair 32
3 President/Vice Pre… Gary Johnson / Bill Weld Libertarian Adair 127
4 President/Vice Pre… Over Votes NA Adair 5
5 President/Vice Pre… Gloria La Riva / Dennis J. Banks Socialism and Lib… Adair 0
6 President/Vice Pre… Darrell L. Castle / Scott N. Bra… Constitution Adair 10
7 President/Vice Pre… Hillary Clinton / Tim Kaine Democratic Adair 1133
8 President/Vice Pre… Jill Stein / Ajamu Baraka Green Adair 14
9 President/Vice Pre… Rocky Roque De La Fuente / Micha… Nominated by Peti… Adair 3
10 President/Vice Pre… Donald Trump / Mike Pence Republican Adair 2461
# … with 1,376 more rows
Inference for Categorical Data in R