Skip to main content

Statistical calculations for risk-limiting election tabulation audits (RLAs)

Project description

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

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rlacalc-0.4.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rlacalc-0.4.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file rlacalc-0.4.0.tar.gz.

File metadata

  • Download URL: rlacalc-0.4.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.17.5-76051705-generic

File hashes

Hashes for rlacalc-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1b2ff81ce1f716e9684eeda83e45860376ef000098a73feaf9f280beaba0b376
MD5 1974d61e598e9249d49039119dce9583
BLAKE2b-256 1c1b72d229e483965b729a7fc6b7a9bb02921b4a54a3223698be28f028251dc4

See more details on using hashes here.

File details

Details for the file rlacalc-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: rlacalc-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.17.5-76051705-generic

File hashes

Hashes for rlacalc-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81e00439b97eccc7e9733a586e44bae91b7ce7b84b3ff5b6b7292541abfe4157
MD5 8f00aa126edcd104245d6bc7818481e0
BLAKE2b-256 839543672efce46a2456e7a344d6958ce3a3151d521788074d2639a53b8d5a7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page