<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - Kellie Ottoboni</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-kellie-ottoboni.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2019-04-02T17:01:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>Kellie Ottoboni Receives Award for Post-Election Auditing Notebook</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2019/kellie-ottoboni-receives-award-for-post-election/" rel="alternate"/><published>2019-04-02T17:01:00+00:00</published><updated>2019-04-02T17:01:00+00:00</updated><author><name>Kellie Ottoboni</name></author><id>tag:jasongrout.github.io,2019-04-02:/medium-archive/pelican/posts/2019/kellie-ottoboni-receives-award-for-post-election/</id><summary type="html">&lt;p&gt;On Thursday, March 14th at their annual conference in Washington DC, Kellie Ottoboni received the Innovation Award from the Election…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;On Thursday, March 14th at their annual conference in Washington DC, Kellie Ottoboni received the Innovation Award from the Election Verification Network (EVN) for her work with Professor Philip Stark developing the Stratified Union-Intersection Tests of Elections (SUITE) tool for use in the pilot of risk-limiting audits. &lt;a href="/posts/2019/jupyter-notebooks-for-post-election-audits/"&gt;The SUITE tool is a Jupyter notebook that encompasses all steps of a post-election risk-limiting audit:&lt;/a&gt; risk calculations, an estimate of the number of ballots to examine, and a procedure to sample and locate ballots. An &lt;a href="/posts/2019/jupyter-notebooks-for-post-election-audits/"&gt;earlier post&lt;/a&gt; on the blog describes the tool in greater detail and how it was used in Michigan’s 2018 pilot risk-limiting audits.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://electionverification.org/"&gt;Election Verification Network&lt;/a&gt; is a professional society of election officials, researchers, and advocates committed to accurate, accessible, transparent, reliable, and verifiable elections. The &lt;strong&gt;Innovation Award&lt;/strong&gt; is given annually for path-breaking product development that greatly facilitates robust election verification and auditing.&lt;/p&gt;
</content><category term="science"/></entry><entry><title>Jupyter notebooks for post-election audits</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2019/jupyter-notebooks-for-post-election-audits/" rel="alternate"/><published>2019-01-22T16:01:00+00:00</published><updated>2019-01-22T16:01:00+00:00</updated><author><name>Kellie Ottoboni</name></author><id>tag:jasongrout.github.io,2019-01-22:/medium-archive/pelican/posts/2019/jupyter-notebooks-for-post-election-audits/</id><summary type="html">&lt;p&gt;The following is a guest blog post authored by Kellie Ottoboni, describing her recent work where they used Jupyter to support statistical…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;em&gt;The following is a guest blog post authored by&lt;/em&gt; &lt;a href="https://medium.com/@knottoboni"&gt;&lt;em&gt;Kellie Ottoboni&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, describing her recent work where they used Jupyter to support statistical audits of election results.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In December 2018, I facilitated &lt;a href="https://www.michigan.gov/som/0,4669,7-192-26847-481829--,00.html"&gt;pilot post-election risk-limiting audits in three cities in Michigan&lt;/a&gt;. This was the first time that SUITE, a new method for “hybrid” risk-limiting audits that I helped develop, has been used in practice. I wrote a &lt;a href="https://mybinder.org/v2/gh/pbstark/CORLA18/master?filepath=code%2Fsuite_toolkit.ipynb"&gt;Jupyter notebook tool&lt;/a&gt; to do the SUITE risk calculations, to determine the necessary sample size, and to sample the ballots using a &lt;a href="https://github.com/statlab/cryptorandom"&gt;cryptographically secure pseudo-random number generator&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Twenty 10-sided dice were rolled to select the seed for the pseudo-random number generator." src="https://jasongrout.github.io/medium-archive/pelican/posts/2019/jupyter-notebooks-for-post-election-audits/images/001-1_FD23qGCK5K87ZUiqwmNusQ.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Twenty 10-sided dice were rolled to select the seed for the pseudo-random number generator.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="what-are-risk-limiting-audits"&gt;What are risk-limiting audits?&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;risk-limiting audit&lt;/em&gt; (RLA) is a statistical check that the reported outcome (the reported winner(s), as opposed to exact vote totals) of an election is correct. The procedure limits the chance that an incorrect outcome will go uncorrected, if the reported outcome is in fact wrong. RLAs involve sampling and examining paper ballots. 34 RLA pilots have been done in California, Colorado, Indiana, New Jersey, Ohio, Virginia, and Denmark. Colorado began requiring RLAs by law in 2017, and Rhode Island will begin requiring RLAs in 2019.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://arxiv.org/abs/1809.04235"&gt;SUITE&lt;/a&gt; is a general method for conducting RLAs of &lt;em&gt;stratified samples&lt;/em&gt;, where a population of ballots is divided into non-overlapping &lt;em&gt;strata&lt;/em&gt; and samples are drawn independently from each stratum. We began developing SUITE for Colorado, treating absentee votes and in-precinct votes as two strata. Aside from this special case, &lt;a href="https://arxiv.org/abs/1809.04235"&gt;SUITE&lt;/a&gt; may be useful for auditing states where counties work independently.&lt;/p&gt;
&lt;p&gt;Michigan used the specific two-stratum version of SUITE, which combines two types of RLAs: &lt;em&gt;ballot polling&lt;/em&gt;, which involves “polling” the ballots and recording the proportion of votes for each candidate, and &lt;em&gt;ballot-level comparison&lt;/em&gt;, which involves comparing paper ballots to their electronic record and counting the number of discrepancies. Ballot-level comparison audits require looking at fewer ballots than ballot polling, but can only be done when ballots can be matched to their electronic records. In two of the Michigan cities, absentee ballots could be matched to their electronic record. &lt;a href="https://arxiv.org/abs/1809.04235"&gt;SUITE&lt;/a&gt; allows you to use these two strategies side-by-side for a single RLA.&lt;/p&gt;
&lt;h2 id="the-jupyter-tool"&gt;The Jupyter tool&lt;/h2&gt;
&lt;p&gt;Previous RLA pilots have used &lt;a href="https://www.stat.berkeley.edu/~stark/Vote/ballotPollTools.htm"&gt;HTML pages&lt;/a&gt; with Javascript code, written by Philip Stark, to conduct the audits. With a short timeframe to create a similar SUITE tool, Philip and I decided that the best solution was to build out the Python library we had begun and use a Jupyter notebook for the interface.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The final results of the audit in Kalamazoo were shown in the Jupyter notebook." src="https://jasongrout.github.io/medium-archive/pelican/posts/2019/jupyter-notebooks-for-post-election-audits/images/002-1_QJaAodid6j5QL57iutniEg.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The final results of the audit in Kalamazoo were shown in the Jupyter notebook.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The &lt;a href="https://mybinder.org/v2/gh/pbstark/CORLA18/master?filepath=code%2Fsuite_toolkit.ipynb"&gt;SUITE notebook&lt;/a&gt; made the audits more transparent. In each city, I projected the notebook running locally on my laptop on a screen for about 30 local election officials. They could observe me entering the reported vote totals for each candidate and the 20-digit random seed to initialize the pseudo-random number generator, then see the sampled ballots appear on the screen in a nicely formatted table. These folks are used to working in Excel spreadsheets, so the interactivity of a Jupyter notebook is more familiar interface than simply running an executable file in the terminal. Each step of the audit was interactive and annotated with Markdown.&lt;/p&gt;
&lt;p&gt;Our hope is that the &lt;a href="https://mybinder.org/v2/gh/pbstark/CORLA18/master?filepath=code%2Fsuite_toolkit.ipynb"&gt;SUITE notebook&lt;/a&gt; can serve as a proof of concept for further development. Free &amp;amp; Fair turned the HTML RLA tools into &lt;a href="https://github.com/FreeAndFair/ColoradoRLA"&gt;industrial strength software&lt;/a&gt; and &lt;a href="https://www.democracy.works/"&gt;Democracy Works&lt;/a&gt; built upon it to create the program that Colorado uses for statewide RLAs.&lt;/p&gt;
&lt;h2 id="pitfalls"&gt;Pitfalls&lt;/h2&gt;
&lt;p&gt;One main difference between the &lt;a href="https://www.stat.berkeley.edu/~stark/Vote/auditTools.htm"&gt;HTML RLA tools&lt;/a&gt; and the &lt;a href="https://mybinder.org/v2/gh/pbstark/CORLA18/master?filepath=code%2Fsuite_toolkit.ipynb"&gt;SUITE notebook&lt;/a&gt; is that the webpages hide all the code. While we moved most of the code to modules and limited most code cells to one function, the notebook still contained a lot of code to scroll through. &lt;a href="https://github.com/QuantStack/voila"&gt;Voila&lt;/a&gt;, a tool for hiding code in notebooks with interactive widgets, is one possible solution to display only the crucial input and output pieces of the tool.&lt;/p&gt;
&lt;p&gt;Another issue we faced was the sequential nature of notebooks. RLAs are iterative: if the risk of the ballots from a first round of sampling is too high, then the audit proceeds to more rounds, until either the risk is sufficiently small or all ballots have been counted. A more proficient software developer than I might have come up with an elegant way to make this possible in a Jupyter notebook while tracking the data from each round of sampling. My hack was to assume that in Michigan we would need at most two rounds of sampling and to copy the code for the first round, with some modifications. (In fact, none of the three cities used more than one round.)&lt;/p&gt;
&lt;p&gt;The RLA tools written by &lt;a href="https://github.com/FreeAndFair/ColoradoRLA"&gt;Free &amp;amp; Fair&lt;/a&gt; and &lt;a href="https://www.democracy.works/"&gt;Democracy Works&lt;/a&gt; are written in Java and Clojure. Academics continue to improve the statistics, so it would be helpful to have an API accessible with Python. It would enable the open source community to contribute to the codebase rather than reinvent the wheel to build a tool every time new statistics are developed.&lt;/p&gt;
&lt;h2 id="michigan-pilots"&gt;Michigan pilots&lt;/h2&gt;
&lt;p&gt;Rochester Hills, Lansing, and Kalamazoo participated in the pilots of their November, 2018 election. I traveled to each city with a team of election auditing experts from MIT, the NYU Brennan Center for Justice, the Electoral Assistance Commission, and Democracy Works. We hope that this &lt;a href="https://mybinder.org/v2/gh/pbstark/CORLA18/master?filepath=code%2Fsuite_toolkit.ipynb"&gt;Jupyter notebook&lt;/a&gt; helped demystify the code and math, and illustrate that RLAs are feasible and efficient way to insure election integrity.&lt;/p&gt;
</content><category term="science"/></entry></feed>