last updated 08/26/2026
The Colorado RLA software uses a “Conservative approximation of the Kaplan-Markov P-value” from the “Gentle Introduction” and “Super Simple” papers for its risk measuring function and to estimate the number of samples needed for each contest in order to achieve the risk limit.
Corla chooses a targeted contest in each county to audit, and estimates the number of samples needed (aka estNmvrs) when doing uniform sampling (does not use Rivest’s consistent sampling). It uniformly samples estNmvrs cards (aka sheets) across all the cards in the county.
Independently, it chooses two statewide contests to audit, calculates estNmvrs, and uniformly samples across all the cards in the state.
(Provisional Assumption 1) Because the sampling is uniform for both county and state, provisionally we think that we can combine both county and state samples together.
We also think that we can estimate the risk level based on these samples for all contests, not just the targeted ones, aka opportunistic auditing.
We group the combined samples by county, based on which county the card was cast in. When a contest lies within a single county, the RLA is straightforwad, using the fully diluted margin:
dilutedMargin = (margin in votes) / (total ballot cards in the county)
(Provisional Assumption 2) When a contest lies within multiple counties, provisionally we think the following algorithm can be used: For each county that the contest is in, calculate the county sample rate as
countySampleRate = (number of samples in the county) / (total ballot cards in the county)
Then we find the minimum countySampleRate over all counties. Conceptually, for each county we randomly choose and discard extra samples, until all counties have the same sample rate. Now sum the number of remaining samples over all counties, and sum the total cards over all counties. This is the audit stratum for that contest. (Note that the countySample rates are independent of the contest, but the set of counties used depends on each contest). The contest diluted margin is
dilutedMargin = (margin in votes over all counties with the contest) /
(total ballot cards in all counties with the contest)
Given the contest dilutedMargin and the number of samples in the contest’s stratum, calculate the estimated risk from the betting martingale as:
gamma = 1.03905
bet = 2/gamma // aka the "maximum bet"
upper = 1 for plurality assorter
noerror = 1.0 / (2.0 - margin/upper)
payoff = 1.0 + bet * (noerror - 0.5)
risk = 1 / payoff ^ nsamples
or from the Kaplan-Markov formula:
payoff = 1.0 - margin/(2*gamma)
risk = 1 / payoff ^ nsamples
Notes:
We want to compare how the current uniform sampling risk measurement compares with using consistent sampling and Card-style data (CSD) as described in the “More style, less work” paper.
We dont have CVRs available so we have to simulate them from the county vote subtotals, taken from tabulateCounty.csv. Unfortunately, these subtotals do not include undervotes or number of cards for each contest. So we estimate those as best we can, and hope that in the future we can work with the real CVRs, or at least county vote subtotals that include undervotes. We dont have CVRs available so we have to simulate them from the county vote subtotals, taken from tabulateCounty.csv. Unfortunately, these subtotals do not include undervotes or number of ballots for each contest. So we estimate those as best we can, and hope that in the future we can work with the real CVRs, or at least county vote subtotals that include undervotes.
The accuracy of the simulation depends on knowing what contests appear together on what cards. If we had CSD for each card in the county manifests, we could do a very accurate simulation even without the actual CVRs. To proceed, we examined the 5000 sampled MVRs, and created a list of CardStyles (i.e. the list of contests on the card) found there.
There were still quite a few small contests that did not appear on any of the MVRs, so we just assumed that in each county, there was a single card style for all these ophan contests. (This is surely wrong and needs to be revisited). For each county, we adjusted the number of counts of each CardStyle until the total vote counts were equal to the known county subtotals, and the number of cards matched the values given by the auditcenter.
Given these simulated CVRs, we ran the standard Rlauxe consistent sampling algorithm. The diluted margins in this case are substantially better than in the uniform sampling “no-CSD” case:
dilutedMargin = (margin in votes) / (total cards that contain the contest)
Furthermore, the consistent sampling is over the entire set of cards in all counties, and we dont have to worry about contests that span multiple counties.
The downside is that there is less “opportunistic sampling” in consistent sampling than for uniform samping. In consistent sampling, each contest has a canonical sequence of cards that must be used, in order to eliminate possible sampling bias. So opportunistic contests (ones not expicityle included in the audit) can only use samples until the canonical sequence is broken because a card in its sequene is not included in the sample. This differs from uniform sampling where all mvrs in the strata count in the risk measurement, even when they dont include the contest (per private conversation with Phillip Stark). each contest has a canonical sequence of ballots that must be used, in order to eliminate possible sampling bias.
So opportunistic contests (ones not expicitly targeted) can only use samples until the canonical sequence is broken because a card in its sequence is not included in the sample. This differs from uniform sampling where all mvrs in the strata count in the risk measurement, even when they don’t include the contest (per private conversation with Phillip Stark).
Screenshot of the Viewer Tool used for running “what if” scenarios:

The following are plots of the distribution of all contests’ measured risk. The uniform sampling is the actual 2024 audit. The consistent sampling is our simulation, for different scenarios of which contests are selected to audit.
Here, the contests selected for auditing are only the targeted contests:
The contests selected for auditing are the targeted contests plus all statewide contests and contests with names starting with “State” or “Representative”, needing less than 150 samples:
The contests selected for auditing are the targeted contests plus all contests needing less than 100 samples:
The next three plots have the targeted contests plus all contests with margins greater than 2%, 1% and 1/2%:
Risk 3%
Relaxed Risk Same as above but with relaxed risk limits as the margins get smaller:
if (contest estimated mvrs >= 250) max risk = 20 %
else if (contest estimated mvrs >= 150) max risk = 10 %
else if (contest estimated mvrs >= 50) max risk = 5 %
else max risk = auditRiskLimit = 3%
The last scenarios emphasize getting as many contests as possible under the limit. Yet these contests are probably the least interesting because they arent close. The advantage of consistent sampling is that one explicity chooses which contests to audit, then you see exactly what sample size is required. You can run “what if” scenarios until you are satisfied with the result and the cost.
If you have estimates of expected error rates, Rlauxe can model the expected variance of the samples needed. One can then choose a quantile of the distribution for the sample size, which gives the probability that you will need more than one round. So you can explicitly choose the tradeoff between extra samples vs the number of rounds needed.
The number of samples needed can be shown by county. Each county might make its own choices of which contests to audit, and immediately see the variance of the number of samples the county would need to audit. It can iterate on these choices until satisfied with the cost and benefits.
Here is an example from the “targeted plus important contests” scenario, the column labeled nmvrsConsistent is the number of samples needed for each county (these reflect whether the county has close contests, not the size of the county):

In order to do consistent sampling we would like to have full access to CVRs (and they must record the undervotes). However, consistent sampling doesn’t actually need the CVR unless that card gets selected for the audit. What we do need is an accurate list of the contests that are on each card, aka the Card Style. I imagine that each county has a relatively small number of Card Styles, and if these were included on the manifest, we could do consistent sampling from that.
A publicly verifiable audit needs the CVRs to be publically commited to before the audit starts, to ensure that the election authority cant cheat on the audit. But if releasing the actual votes is impossible for now, then card styles in the manifest would be a good first step.