rlacalc crunches the numbers for risk-limiting post-election audits. It can calculate sample sizes, as well as calculate risk levels based on observed ballots. It can handle many of the commonly used RLA tests, including ballot-level comparison via Kaplan-Markov and ballot polling via BRAVO.
Goals
It is important to emphasize that the output of an audit should be a report providing evidence related to election outcome, details about and explanations of any discrepancies found, and conclusions based on that evidence. See the paper Evidence-Based Elections Stark and Wagner and the report Risk-Limiting Post-Election Audits: Why and How.
rlacalc helps observers to explore the best way to do an audit beforehand, and to check the numbers in reports published after an audit, e.g. as described for a Public RLA Oversight Protocol.
rlacalc can be used to perform calculations from the command line or used as a library in Python. In addition, if the hug package is available, it can be accessed over the web.
Installation
rlacalc works with Python 2.7 and Python 3.x. There are no other mandatory dependencies beyond the standard library.
If hug is installed, rlacalc can be deployed via a web server.
Usage
$ rlacalc --help
...
$ rlacalc --test
...
$ rlacalc -m 1 -n
Sample size = 479 for margin 1%, risk 10%, gamma 1.03905, o1 0, o2 0, u1 0, u2 0
$ rlacalc -m 1 -n --o1 1
Sample size = 615 for margin 1%, risk 10%, gamma 1.03905, o1 1, o2 0, u1 0, u2 0
$ rlacalc -m 3 -r 5
KM_exp_rnd = 226 for margin 3%, risk 5%, gamma 1.03905, or1 0.001, or2 0.0001, ur1 0.001, ur2 0.0001, roundUp1 1, roundUp2 0
Background
For tools implemented in javascript, with plots, see
- Tools for Comparison Risk-Limiting Election Audits
- Tools for Ballot-Polling Risk-Limiting Election Audits
History
rlacalc was included as part of audit_cvrs in 2015 to help run some early pilot audits in Colorado as part of the The Colorado Risk-Limiting Audit Project (CORLA).
Metadata
Release files for rlacalc 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rlacalc-0.4.0.tar.gz | 12.8 kB | Without provenance | Details for rlacalc-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rlacalc-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for rlacalc-0.4.0-py3-none-any.whl |
Total release size: 25.0 kB
Release files / rlacalc-0.4.0.tar.gz
| Download URL | rlacalc-0.4.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b2ff81ce1f716e9684eeda83e45860376ef000098a73feaf9f280beaba0b376
|
|
BLAKE2b-256 checksum How to use checksums |
1c1b72d229e483965b729a7fc6b7a9bb02921b4a54a3223698be28f028251dc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.17.5-76051705-generic
|
Release files / rlacalc-0.4.0-py3-none-any.whl
| Download URL | rlacalc-0.4.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81e00439b97eccc7e9733a586e44bae91b7ce7b84b3ff5b6b7292541abfe4157
|
|
BLAKE2b-256 checksum How to use checksums |
839543672efce46a2456e7a344d6958ce3a3151d521788074d2639a53b8d5a7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.17.5-76051705-generic
|
Security for rlacalc 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.