While the word “audit” all by itself doesn’t sound very fun, for the Colorado Secretary of State it’s absolutely celebratory. Following the 2017 off-year election, the state is performing a first-in-the-nation risk-limiting audit of the statewide results.

“We’re here to celebrate the fact that we’ve finally reached this milestone in our nation,” Secretary of State Wayne Williams said.

The idea is to find strong statistical evidence that the election outcome was the correct one. The effort comes during a year when new revelations became public about Russian-backed attempts to break into state election systems and President Trump claimed without evidence that millions of people illegally cast ballots in 2016.

The kickoff day for the audit last week started with Williams holding up a Colorado Rockies hat in one hand, and a Denver Broncos hat in the other. The Rockies hat was full of the names of people in the room, members of the public, elections officials from other states, and a few computer scientists. The Broncos hat was full of plastic ten-sided dice.

No, this was not a pre-audit game of parcheesi, or the early stages of a Dungeons and Dragons campaign. It’s the key to generating a 20-digit number, called a “seed,” that the risk-limiting audit software needs. When a name was drawn from the Rockies cap, applause and cheers erupted from the room. Then the lucky contestant chose a die from the Broncos hat and rolled a number. This happened 20 times, until the seed was complete.

Why? The elaborate dance was the only way to obtain a truly random number.

Once fed into the software, the seed is used to target specific boxes of ballots in each Colorado county at random. The closer the race, the more ballots need to be pulled. Actual human beings will then compare those ballots to the election night record of how the machine counted them. It’s an audit of the election process, an attempt to make sure the machines are interpreting ballots correctly.

When Philip Stark’s name was pulled from the hat, a particularly loud round of cheers went up. That could have something to do with Stark’s formula, the one that needs that 20-digit number. In essence, Stark was the reason everyone was there that day.

The method of auditing elections produced by the University of California, Berkeley professor is different from others used in the past. Conventionally, audits start with the premise that the results are correct. Not this one.

With this risk-limiting audit, “you start by assuming that the answer is wrong, you start by assuming that the reported winner didn’t really win,” he explained. From there, local officials work backward. “Then you start saying ‘I’m going to collect evidence,’ and if the evidence becomes convincing that the winner really did win, I get to stop auditing.”

Unelected until proven elected, so to speak. Stark said this method could cut down on the number of ballots that need to be audited to ensure that an election’s result is sound.

The software company Free & Fair built on the idea, taking Stark’s formula and scaling it up so that states like Colorado can use the method statewide. Previously, it’s been used in other states at the local level.

The software is open source, so other states can take it and modify it for their own use. Officials from Rhode Island came to observe the process in Colorado, along with members of the federal Election Assistance Commission. This whole process has been almost ten years in the making for Colorado and Williams, the secretary of state whose office is responsible for voting and elections, was basking in the moment.

“This is in many ways a new day for ensuring the integrity of elections,” he said.

Colorado’s audit must be completed, and the election certified, the day after Thanksgiving. One more step toward making sure elections aren’t just a roll of the dice.