Voting Project Needs Python People
Ian Smith
iandjmsmith at aol.com
Fri Jul 25 03:32:25 CEST 2003
"Alan Dechert" <adechert at earthlink.net> wrote in message news:<w2BTa.116465$Io.9943199 at newsread2.prod.itd.earthlink.net>...
> "Andrew Dalke" <adalke at mindspring.com> wrote in message
> news:bfkch9$is4$1 at slb4.atl.mindspring.net...
> > Alan Dechert:
> > > catch it. If one percent of the electronic votes were altered (evenly
> > > distributed), you will find one mismatch for sure after checking only a
> > > dozen or two ballots.
> >
> > Actually, around 70 ballots.
> >
> > The odds of finding one ballot to be wrong is 1%, so there's a 99%
> > chance that it's unaltered. There's a 0.99*0.99 chance that two are
> > unaltered, and in general a 0.99**n chance that n are unaltered.
> >
> > To get even odds of noticing an error requires
> >
> > 0.99**n == 0.5
> > --> log(0.99)*n == log(0.5)
> >
> > >>> math.log(0.5) / math.log(0.99)
> 68.967563936528421
> > >>>
> >
> > about 70 verifications.
> >
> A likely story. I actually took combinatorics and a class in statistics in
> college. But that was a long time ago. Since then, many brain cells have
> died, tragically.
>
> BTW, do you know about cumulative binomial distribution? I think we need to
> include a tool like this to give us some "C.L" (confidence level) short of
> verifying that every single paper ballot matches its electronic counterpart.
>
> http://www.reliasoft.com/newsletter/2q2001/cumulative_binomial.htm
>
> What I really want is a calculator. Do you know of a free calculator for
> this? If not, could you make one? (for free, of course).
>
> Alan Dechert
There's a lot of assumed knowledge in this discussion. I know nothing
about electronic voting systems, I know almost nothing about Python as
a programming language but I do know how to calculate values
associated with the cumulative binomial distribution. A Javascript
(sorry!) calculator for the binomial distribution amongst others can
be found at http://members.aol.com/iandjmsmith/EXAMPLES.HTM.
Javascript can be converted to Java, C etc quite easily. I would
imagine with my lack of knowledge of Python you'll probably be better
off doing the conversion yourself.
The code is quick and accurate and can handle large sample sizes and
very small probabilities which you probably need. There's even a
calculator for the Hypergeometric distribution should you wish to do
sampling without replacement calculations.
Ian Smith
P.S. the calculation of 70 is fine. If you don't want to calculate
anything much more difficult then you probably don't need a calculator
anyway.
More information about the Python-list
mailing list