rlacalc: Online Calculator for Risk-Limiting Audit Sample Sizes

These forms for comparison and ballot-polling risk-limiting audits will each calculate and return a single number, via the rlacalc JSON API, providing the requested sample size.

Ballot-level comparison risk-limiting audits

Fill in this form and hit enter in a field, or hit the Calculate button, to calculate the sample size for a ballot-level comparison risk-limiting audit.

Risk-limiting audit parameters Margin of victory: the closest margin between a winner and a loser as a fraction of the total number of ballots for the given contest
Risk limit (alpha) as a fraction
1-vote overstatements (margin is actually smaller)
2-vote overstatements (margin is actually smaller)
1-vote understatements (margin is actually larger)
2-vote understatements (margin is actually larger)
Gamma, e.g. 1.1 or 1.2 if you expect many 2-vote overstaments

This form lets you specify rates of discrepancies of each type, rather than the absolute numbers.

Risk-limiting audit parameters: comparison audits Margin of victory: the closest margin between a winner and a loser as a fraction of the total number of ballots for the given contest
Risk limit (alpha) as a fraction
Rate of 1-vote overstatements (margin is actually smaller) as a fraction
Rate of 2-vote overstatements (margin is actually smaller)
Rate of 1-vote understatements (margin is actually larger)
Rate of 2-vote understatements (margin is actually larger)
Should expected number of 1-vote differences be rounded up? 0 or 1
Should expected number of 2-vote differences be rounded up?
Gamma, e.g. 1.1 or 1.2 if you expect many 2-vote overstaments

The sample sizes for comparison audits depend only on these parameters.

For more information on the calculations and parameters for comparison audits, see Tools for Comparison Risk-Limiting Election Audits

Ballot-level polling risk-limiting audits

This form is for ballot-polling audits

Note that the sample sizes for ballot-polling audits depend on the actual sample that is drawn, and can vary by an order of magnitude or more. The numbers provided here are the mean values. If the sample turns up more ballots favoring the declared winner than would be predicted from the given margin, it will require less than the mean number of samples, and vice versa. About 25% of the time, it will take only 41% of the number reported here, while about 25% of the time it will require 25% more samples, and 10% of the time it will require more than twice the sample size. In one out of a hundred audits it will take over 4 times as many samples.

Risk-limiting audit parameters: ballot-polling audits Margin of victory: the closest margin between a winner and a loser as a fraction of the total number of ballots for the given contest
Risk limit (alpha) as a fraction

For more information on the calculations and parameters for ballot-polling audits, see Tools for Ballot-Polling Risk-Limiting Election Audits

Background

The calculations are performed by the open source python code in rlacalc.py, which is part of audit_cvrs, which helps auditors manage a ballot-level risk-limiting post-election audit.

For more on election auditing, see