From 462fdec217977ab788dc08723dd14fa4719ad622 Mon Sep 17 00:00:00 2001
From: tom-votes This module provides support for auditing of a single plurality contest
+ over multiple jurisdictions using a Bayesian ballot-level
+ comparison audit. This module provides routines for computing the winning probabilities
+ for various choices, given audit sample data. Thus, this program
+ provides a risk-measuring functionality. More precisely, the code builds a Bayesian model of the unsampled
+ ballots, given the sampled ballots. This model is probabilistic,
+ since there is uncertainty about what the unsampled ballots are.
+ However, the model is generative: we generate many possible
+ sets of likely unsampled ballots, and report the probability that
+ various choices win the contest. (See References below for
+ more details.) The main output of the program is a report on the probability
+ that each choice wins, in these simulations. The contest may be single-jurisdiction or multi-jurisdiction.
+ More precisely, we assume that there are a number of "collections"
+ of ballots that may be sampled. Each relevant jurisdiction may
+ have one or more such collections. For example, a jurisdiction
+ may be a county, with one collection for ballots submitted by
+ mail, and one collection for ballots cast in-person. This module may be used for ballot-polling audits (where there
+ no reported choices for ballots) or "hybrid" audits (where some
+ collections have reported choices for ballots, and some have not). Descriptions of Bayesian auditing methods can be found in: The code for this tool is available on github at
+ www.github.com/ron-rivest/2018-bctool.
+ This web form provides exactly the same functionality as the stand-alone
+ Python tool
+ www.github.com/ron-rivest/2018-bctool/BCTool.py.
+ The Python tool
+ requires an environment set up with Python 3 and Numpy.
+ This web form was implemented using
+
+ CherryPy
+ .
+ (See www.github.com/ron-rivest/2018-bptool
+ for similar code for a Bayesian ballot-level polling audit. The code here was based
+ in part on that code.) Bayesian Ballot Comparison Tool
+ References and Code
+
+
+
+ Implementation Note
+
This module provides support for auditing of a single plurality contest - over multiple jurisdictions using a Bayesian ballot-level - comparison audit.
- -This module provides routines for computing the winning probabilities - for various choices, given audit sample data. Thus, this program - provides a risk-measuring functionality.
- -More precisely, the code builds a Bayesian model of the unsampled - ballots, given the sampled ballots. This model is probabilistic, - since there is uncertainty about what the unsampled ballots are. - However, the model is generative: we generate many possible - sets of likely unsampled ballots, and report the probability that - various choices win the contest. (See References below for - more details.)
- -The main output of the program is a report on the probability - that each choice wins, in these simulations.
- -The contest may be single-jurisdiction or multi-jurisdiction. - More precisely, we assume that there are a number of "collections" - of ballots that may be sampled. Each relevant jurisdiction may - have one or more such collections. For example, a jurisdiction - may be a county, with one collection for ballots submitted by - mail, and one collection for ballots cast in-person.
- -This module may be used for ballot-polling audits (where there - no reported choices for ballots) or "hybrid" audits (where some - collections have reported choices for ballots, and some have not).
- -Descriptions of Bayesian auditing methods can be found in:
-The code for this tool is available on github at - www.github.com/ron-rivest/2018-bctool. - This web form provides exactly the same functionality as the stand-alone - Python tool - www.github.com/ron-rivest/2018-bctool/BCTool.py. - The Python tool - requires an environment set up with Python 3 and Numpy. - This web form was implemented using - - CherryPy - . -
(See www.github.com/ron-rivest/2018-bptool - for similar code for a Bayesian ballot-level polling audit. The code here was based - in part on that code.)
- - - - - ''' + return index_string @cherrypy.expose def ComparisonAudit( @@ -531,9 +173,12 @@ def get_html_results(self, actual_choices, win_probs, n_winners): -server_conf = os.path.join(os.path.dirname(__file__), 'server_conf.conf') +server_conf = os.path.join(CODE_DIR, 'server_conf.conf') if __name__ == '__main__': + # cherrypy.tree.mount(BCToolPage(), config=server_conf) + # cherrypy.engine.start() + # cherrypy.engine.block() # cherrypy.config.update({'tools.sessions.on': True, # 'tools.sessions.storage_type': "File", From 2044b074c312c926b5080a2c81d9e6a343ecdbbd Mon Sep 17 00:00:00 2001 From: tom-votesThis module provides support for auditing of a single plurality contest over multiple jurisdictions using a Bayesian ballot-level @@ -64,9 +71,9 @@
The code for this tool is available on github at +
The code for this tool is available on github at www.github.com/ron-rivest/2018-bctool. - This web form provides exactly the same functionality as the stand-alone + This web form provides exactly the same functionality as the stand-alone Python tool - www.github.com/ron-rivest/2018-bctool/BCTool.py. + www.github.com/ron-rivest/2018-bctool/BCTool.py. The Python tool requires an environment set up with Python 3 and Numpy. - This web form was implemented using + This web form was implemented using CherryPy .
(See www.github.com/ron-rivest/2018-bptool for similar code for a Bayesian ballot-level polling audit. The code here was based - in part on that code.)
+ in part on that code.) @@ -109,22 +116,22 @@Collection | -Votes | +Votes | Comment |
---|---|---|---|
Bronx | -11000 | +11000 | |
Queens | -120000 | +120000 | |
Mail-In | -56000 | +56000 |
In the box below, upload a CSV file with the data about the reported votes @@ -152,50 +159,50 @@
Collection | -Reported | -Votes | +Reported | +Votes | Comment |
---|---|---|---|---|---|
Bronx | -Yes | -8500 | +Yes | +8500 | |
Bronx | -No | -2500 | +No | +2500 | |
Queens | -Yes | -100000 | +Yes | +100000 | |
Queens | -No | -20000 | +No | +20000 | |
Mail-In | -Yes | -5990 | +Yes | +5990 | |
Mail-In | -No | -50000 | +No | +50000 | |
Mail-In | -Overvote | -10 | +Overvote | +10 |
Collection | -Reported | -Actual | -Votes | +Reported | +Actual | +Votes | Comment |
---|---|---|---|---|---|---|---|
Bronx | -Yes | -Yes | -62 | +Yes | +Yes | +62 | |
Bronx | -No | -No | -21 | +No | +No | +21 | |
Bronx | -No | -Overvote | -1 | +No | +Overvote | +1 | |
Queens | -Yes | -Yes | -504 | +Yes | +Yes | +504 | |
Queens | -No | -No | -99 | +No | +No | +99 | |
Mail-In | -Yes | -Yes | -17 | +Yes | +Yes | +17 | |
Mail-In | -No | -No | -73 | +No | +No | +73 | |
Mail-In | -No | -Lizard People | -2 | +No | +Lizard People | +2 | |
Mail-In | -No | -Lizard People | -1 | +No | +Lizard People | +1 |
Bayesian audits work by simulating the data which hasn't been sampled to estimate the chance that each candidate would win a full hand recount. - You may specify in the box below the number of + You may specify in the box below the number of trials used to compute these estimates. This is an optional parameter, defaulting to 10000. Making it smaller will decrease accuracy and improve running time; making it larger will - improve accuracy and increase running time. + improve accuracy and increase running time.
- + Number of trials: