[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Our counting procedure



On Thu, Mar 29, 2001 at 09:23:02PM +0200, Marcelo E. Magallon wrote:
> >> Raul Miller <moth@debian.org> writes:
>  > Here's how people voted:
>  Can any of you guys that recounted the results (you know you did)
>  confirm that the numbers are right? 

Hmm, actually, I get different results too.

Just taking:

Choice #3: Ben Collins
        is prefered to Choice #5: None Of The Above (162-20)

doesn't seem to be right:

[aj@blae ~]$ (grep '^..[^-]..' results.txt ; grep '^..-.[^-]' results.txt) | wc
    302    1219   11980

That is, 302 people gave a preference for either Ben or for None of the
Above, so all of those 302 voted either Ben above None of the Above,
or None of the Above above Ben, but 162+20 isn't 302.

>  I can get those numbers only if I
>  make an assumption which a) I think is wrong b) throws some people's
>  votes out of the window.  Don't worry, the result is *exactly* the
>  same, it's just that the numbers are a bit different.

I get:

[aj@blae ~]$ cat results.txt  | sed 's/ .*$//' | perl -ne '$i = 0; chomp; %x = map { $i++; ($_ != "" ? ($_, $i) : ()) } split //, $_; print join("", (map { $x{$_} } (sort keys(%x)))) . "\n";' > results.reordered

[aj@blae ~]$ for a in `seq 1 4`; do for b in `seq $((a+1)) 5`; do ab=`cat results.reordered | grep "^[^$b]*$a" | wc -l`; ba=`cat results.reordered | grep "^[^$a]*$b" | wc -l`; if [ "$ab" -gt "$ba" ]; then echo "C$a dominates C$b : $ab to $ba"; else echo "C$b dominates C$a : $ba to $ab"; fi; done; done | sed 's/C1/Branden/g;s/C2/Anand/g;s/C3/Ben/g;s/C4/Bdale/g;s/C5/no-one/g'  | column -t

Ben      dominates  Branden  :  174  to  126   (+11 no preference = 311) [0]
Ben      dominates  Anand    :  262  to  27    (+22 no preference = 311)
Ben      dominates  Bdale    :  171  to  135   (+ 5 no preference = 311)
Ben      dominates  no-one   :  266  to  36    (+ 9 no preference = 311)
Branden  dominates  Anand    :  244  to  37    (+30 no preference = 311)
Branden  dominates  Bdale    :  157  to  147   (+ 7 no preference = 311)
Branden  dominates  no-one   :  250  to  40    (+21 no preference = 311)
Bdale    dominates  Anand    :  260  to  24    (+27 no preference = 311)
Bdale    dominates  no-one   :  270  to  19    (+22 no preference = 311)
Anand    dominates  no-one   :  143  to  100   (+68 no preference = 311)

Cheers,
aj

[0] Working out the votes that didn't express a preference can be done with:

    [aj@blae ~]$ (A=0; B=0; for a in "" . .. ...; do A=$(($A+1)); B=$A; for b in "" . .. ...; do B=$((B+1)); x=`sed < results.txt 's/ .*$//' | grep "^${a}-${b}-" | wc -l`; echo C$A C$B $x; done; done) | sed 's/C1/Branden/g;s/C2/Anand/g;s/C3/Ben/g;s/C4/Bdale/g;s/C5/no-one/g'  | sort | column -t

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

``_Any_ increase in interface difficulty, in exchange for a benefit you
  do not understand, cannot perceive, or don't care about, is too much.''
                      -- John S. Novak, III (The Humblest Man on the Net)

Attachment: pgpR5KzWxeyBO.pgp
Description: PGP signature


Reply to: