Re: Bush/Kerry optimal wagers

From: John Conover <john@email.johncon.com>
Subject: Re: Bush/Kerry optimal wagers
Date: 28 Oct 2004 10:10:44 -0000




There is a simple C program at the bottom; it wades through all
possible combinations-all 2048 of them-of either Bush or Kerry taking
each of the 11 States in question; so the output can be worked on with
the Unix sort(1) program to calculate the statistics of certain things
happening.

There are 28 possibilities where Bush and Kerry would tie, and who
would be president would be decided by Congress-the last time that
happened was 1824. The probability of that happening is about 28 /
2048 = 1.3671875%.

Calculating the chances of the Presidency being decided by the courts,
again, (Bush can not have a commanding lead in the state-remember the
last president that won by about 60% was Lyndon Johnson in the
60's-which lets FL, OH, WI, IA, NM, and CO, off the hook):

State Electoral Votes   Bush's Chance of Winning State
MN    10                0.65
MI    17                0.50
HI     4                0.65
NH     4                0.17
NJ    15                0.50

meaning the electoral spread would have to be within 17 votes to make
it reasonable to challenge a state's count. There are 812
possibilities, so the probability of at least one count challenge is
812 / 2048 = 39.6484375%, with the highest probability in MI and NJ,
then MN, follwed by NH and HI.

        John

--

John Conover, john@email.johncon.com, http://www.johncon.com/

/*

Set up a binary count of 2^11 = 2048 possibilites of the 11 states in
question, where a zero in the count means the state goes to Bush, and
a 1 means it goes to Kerry.

*/

#include <stdio.h>

struct state
{
    char name[2];
    int e_votes;
};

struct state electoral[11] =
{
    {"FL",27},
    {"OH",20},
    {"WI",10},
    {"IA",7},
    {"MN",10},
    {"MI",17},
    {"HI",4},
    {"NM",5},
    {"CO",9},
    {"NH",4},
    {"NJ",15}
};

void main (void)
{
    int i,
        bush,
        kerry,
        i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10,
        x[11] = {1,1,1,1,1,1,1,1,1,1,1};

    for (i0 = 0; i0 < 2; i0 ++)
    {
        x[0] = (x[0] == 1) ? 0 : 1;

        for (i1 = 0; i1 < 2; i1 ++)
        {
            x[1] = (x[1] == 1) ? 0 : 1;

            for (i2 = 0; i2 < 2; i2 ++)
            {
                x[2] = (x[2] == 1) ? 0 : 1;

                for (i3 = 0; i3 < 2; i3 ++)
                {
                    x[3] = (x[3] == 1) ? 0 : 1;

                    for (i4 = 0; i4 < 2; i4 ++)
                    {
                        x[4] = (x[4] == 1) ? 0 : 1;

                        for (i5 = 0; i5 < 2; i5 ++)
                        {
                            x[5] = (x[5] == 1) ? 0 : 1;

                            for (i6 = 0; i6 < 2; i6 ++)
                            {
                                x[6] = (x[6] == 1) ? 0 : 1;

                                for (i7 = 0; i7 < 2; i7 ++)
                                {
                                    x[7] = (x[7] == 1) ? 0 : 1;

                                    for (i8 = 0; i8 < 2; i8 ++)
                                    {
                                        x[8] = (x[8] == 1) ? 0 : 1;

                                        for (i9 = 0; i9 < 2; i9 ++)
                                        {
                                            x[9] = (x[9] == 1) ? 0 : 1;

                                            for (i10 = 0; i10 < 2; i10 ++)
                                            {
                                                x[10] = (x[10] == 1) ? 0 : 1;
                                                bush = 213;
                                                kerry = 171;

                                                for (i = 0; i < 11; i ++)
                                                {

                                                    if (x[i] == 0)
                                                    {
                                                        bush = bush + electoral[i].e_votes;
                                                    }

                                                    else
                                                    {
                                                        kerry = kerry + electoral[i].e_votes;
                                                    }

                                                }

                                                (void) printf ("%d, %d,", bush, kerry);

                                                for (i = 0; i < 11; i ++)
                                                {

                                                    if (x[i] == 0)
                                                    {
                                                        (void) printf (" %s", electoral[i].name);
                                                    }

                                                }

                                                (void) printf (",");

                                                for (i = 0; i < 11; i ++)
                                                {

                                                    if (x[i] == 1)
                                                    {
                                                        (void) printf (" %s", electoral[i].name);
                                                    }

                                                }

                                                (void) printf ("\n");
                                            }

                                        }

                                    }

                                }

                            }

                        }

                    }

                }

            }

        }

    }

}


Copyright © 2004 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Thu Oct 28 03:14:08 PDT 2004 $Id: 041028031100.21687.html,v 1.1 2004/10/28 10:18:06 conover Exp $
Valid HTML 4.0!