Anti-Harassment Tools/SecurePoll Improvements/Test Results/7 6 566 1185838663

Comments

edit

SecurePoll and OpenSTV agree on final results.

Election setup

edit
  • Candidates: 7
  • Seats: 6
  • Votes: 566

Actual

edit

Output from SecurePoll:

array(3) {
  ["elected"]=>
  array(6) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(4)
    [3]=>
    int(5)
    [4]=>
    int(6)
    [5]=>
    int(7)
  }
  ["eliminated"]=>
  array(1) {
    [0]=>
    int(3)
  }
  ["rounds"]=>
  array(7) {
    [0]=>
    array(8) {
      ["round"]=>
      int(1)
      ["surplus"]=>
      int(0)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(102)
          ["total"]=>
          int(102)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(101)
          ["total"]=>
          int(101)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(72)
          ["total"]=>
          int(72)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(73)
          ["total"]=>
          int(73)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(72)
          ["total"]=>
          int(72)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(73)
          ["total"]=>
          int(73)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(73)
          ["total"]=>
          int(73)
        }
      }
      ["totalVotes"]=>
      int(566)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        int(1)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(0) {
      }
    }
    [1]=>
    array(8) {
      ["round"]=>
      int(2)
      ["elected"]=>
      array(2) {
        [0]=>
        int(1)
        [1]=>
        int(2)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      int(41)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        int(1)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(102)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(102)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(101)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(101)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(72)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(72)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(73)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(72)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(72)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(73)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(73)
        }
      }
      ["totalVotes"]=>
      int(566)
    }
    [2]=>
    array(8) {
      ["round"]=>
      int(3)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      float(13.452824694234)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        float(0.79411764705882)
        [2]=>
        float(0.8019801980198)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(102)
          ["earned"]=>
          float(-15.967967384974)
          ["total"]=>
          float(86.032032615026)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(101)
          ["earned"]=>
          float(-11.579207920792)
          ["total"]=>
          float(89.420792079208)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(72)
          ["earned"]=>
          float(4.4231217239371)
          ["total"]=>
          float(76.423121723937)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          float(5.9321490972626)
          ["total"]=>
          float(78.932149097263)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(72)
          ["earned"]=>
          float(5.5960978450786)
          ["total"]=>
          float(77.596097845079)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          float(4.8270238788584)
          ["total"]=>
          float(77.827023878858)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(73)
          ["earned"]=>
          float(4.563191613279)
          ["total"]=>
          float(77.563191613279)
        }
      }
      ["totalVotes"]=>
      float(563.79440885265)
    }
    [3]=>
    array(8) {
      ["round"]=>
      int(4)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      float(3.5277865434787)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        float(0.74766953025041)
        [2]=>
        float(0.72645739910314)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          float(86.032032615026)
          ["earned"]=>
          float(-3.2251175561715)
          ["total"]=>
          float(82.806915058855)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          float(89.420792079208)
          ["earned"]=>
          float(-6.6999205945842)
          ["total"]=>
          float(82.720871484624)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          float(76.423121723937)
          ["earned"]=>
          float(1.5894767057776)
          ["total"]=>
          float(78.012598429715)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          float(78.932149097263)
          ["earned"]=>
          float(1.9344479538007)
          ["total"]=>
          float(80.866597051063)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          float(77.596097845079)
          ["earned"]=>
          float(1.83231146844)
          ["total"]=>
          float(79.428409313519)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          float(77.827023878858)
          ["earned"]=>
          float(1.7114476215026)
          ["total"]=>
          float(79.538471500361)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          float(77.563191613279)
          ["earned"]=>
          float(1.5212667579291)
          ["total"]=>
          float(79.084458371208)
        }
      }
      ["totalVotes"]=>
      float(562.45832120934)
    }
    [4]=>
    array(8) {
      ["round"]=>
      int(5)
      ["elected"]=>
      array(1) {
        [2]=>
        int(4)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      float(1.3106049527112)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        float(0.73135476556806)
        [2]=>
        float(0.71134464943702)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          float(82.806915058855)
          ["earned"]=>
          float(-1.453226051202)
          ["total"]=>
          float(81.353689007653)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          float(82.720871484624)
          ["earned"]=>
          float(-1.1289950358799)
          ["total"]=>
          float(81.591876448744)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          float(78.012598429715)
          ["earned"]=>
          float(0.39589661184799)
          ["total"]=>
          float(78.408495041563)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          float(80.866597051063)
          ["earned"]=>
          float(0.49844244525074)
          ["total"]=>
          float(81.365039496314)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          float(79.428409313519)
          ["earned"]=>
          float(0.45535741152858)
          ["total"]=>
          float(79.883766725047)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          float(79.538471500361)
          ["earned"]=>
          float(0.42732412619649)
          ["total"]=>
          float(79.965795626558)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          float(79.084458371208)
          ["earned"]=>
          float(0.39756990388039)
          ["total"]=>
          float(79.482028275088)
        }
      }
      ["totalVotes"]=>
      float(562.05069062097)
    }
    [5]=>
    array(8) {
      ["round"]=>
      int(6)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(1) {
        [0]=>
        int(3)
      }
      ["surplus"]=>
      float(0.46862373961443)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        float(0.72817516616168)
        [2]=>
        float(0.70618447708571)
        [3]=>
        int(1)
        [4]=>
        float(0.9955135584205)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          float(81.353689007653)
          ["earned"]=>
          float(-0.173111795131)
          ["total"]=>
          float(81.180577212522)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          float(81.591876448744)
          ["earned"]=>
          float(-0.43820501589461)
          ["total"]=>
          float(81.153671432849)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          float(78.408495041563)
          ["earned"]=>
          float(0.17888387242287)
          ["total"]=>
          float(78.587378913986)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          float(81.365039496314)
          ["earned"]=>
          float(-0.23066440207102)
          ["total"]=>
          float(81.134375094243)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          float(79.883766725047)
          ["earned"]=>
          float(0.18933304855283)
          ["total"]=>
          float(80.0730997736)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          float(79.965795626558)
          ["earned"]=>
          float(0.18920136162895)
          ["total"]=>
          float(80.154996988187)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          float(79.482028275088)
          ["earned"]=>
          float(0.1761029912555)
          ["total"]=>
          float(79.658131266344)
        }
      }
      ["totalVotes"]=>
      float(561.94223068173)
    }
    [6]=>
    array(8) {
      ["round"]=>
      int(7)
      ["elected"]=>
      array(3) {
        [3]=>
        int(5)
        [4]=>
        int(6)
        [5]=>
        int(7)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      float(75.901962461747)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        float(0.72655542106687)
        [2]=>
        float(0.70484725624858)
        [3]=>
        int(0)
        [4]=>
        float(0.99386478466612)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(81)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          float(81.180577212522)
          ["earned"]=>
          float(8.0356083540056)
          ["total"]=>
          float(89.216185566528)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          float(81.153671432849)
          ["earned"]=>
          float(6.8746053209914)
          ["total"]=>
          float(88.028276753841)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          float(78.587378913986)
          ["earned"]=>
          float(-78.587378913986)
          ["total"]=>
          float(0)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          float(81.134375094243)
          ["earned"]=>
          float(19.389330238447)
          ["total"]=>
          float(100.52370533269)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          float(80.0730997736)
          ["earned"]=>
          float(14.889948016427)
          ["total"]=>
          float(94.963047790027)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          float(80.154996988187)
          ["earned"]=>
          float(13.110418664536)
          ["total"]=>
          float(93.265415652722)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          float(79.658131266344)
          ["earned"]=>
          float(16.247200099595)
          ["total"]=>
          float(95.905331365939)
        }
      }
      ["totalVotes"]=>
      float(561.90196246175)
    }
  }
}

Actual tally: SP

edit

Elected

edit

Election for 6 seats with 7 candidates. Total 566 votes.

  1. "1"
  2. "2"
  3. "4"
  4. "6"
  5. "5"
  6. "7"

Eliminated/Not elected

edit
  • "3"

Rounds table

edit

The following table describes the calculations that happened in order to achieve the result above. In each round of calculation, the candidate(s) who achieved more votes than the quota are declared elected. Their surplus votes above the quota are redistributed to the remaining candidates. If nobody achieves the quota, the lowest ranking candidate is eliminated and their votes are redistributed to the remaining candidates. To understand this better, please refer to this link.

Round Number Tally Result
1
  1. "1": 102
  2. "2": 101
  3. "4": 73
  4. "6": 73
  5. "7": 73
  6. "3": 72
  7. "5": 72
Quota: 80.857144
2
  1. "1": 102
  2. "2": 101
  3. "4": 73
  4. "6": 73
  5. "7": 73
  6. "3": 72
  7. "5": 72
Quota: 80.857144

Elected: "1", "2"

3
  1. "2": 101 - 11.679733 = 89.320267 (keep factor: 0.800566)
  2. "1": 102 - 16.083819 = 85.916181 (keep factor: 0.792717)
  3. "4": 73 + 5.975566 = 78.975566
  4. "6": 73 + 4.863735 = 77.863735
  5. "5": 72 + 5.636417 = 77.636417
  6. "7": 73 + 4.597320 = 77.597320
  7. "3": 72 + 4.457018 = 76.457018
Quota: 80.538073

Transferring votes

4
  1. "1": 85.916181 - 3.506372 = 82.409809 (keep factor: 0.743095)
  2. "2": 89.320267 - 6.955393 = 82.364874 (keep factor: 0.721852)
  3. "4": 78.975566 + 2.036616 = 81.012182
  4. "6": 77.863735 + 1.800148 = 79.663883
  5. "5": 77.636417 + 1.925731 = 79.562148
  6. "7": 77.597320 + 1.603014 = 79.200334
  7. "3": 76.457018 + 1.671812 = 78.128830
Quota: 80.334581

Elected: "4" Transferring votes

5
  1. "2": 82.364874 - 1.285491 = 81.079383 (keep factor: 0.704058)
  2. "4": 81.012182 - 0.10153 = 80.910652 (keep factor: 0.991636)
  3. "1": 82.409809 - 1.550801 = 80.859008 (keep factor: 0.724383)
  4. "6": 79.663883 + 0.627586 = 80.291469
  5. "5": 79.562148 + 0.647817 = 80.209965
  6. "7": 79.200334 + 0.592695 = 79.793029
  7. "3": 78.128830 + 0.587499 = 78.716329
Quota: 80.265692

Elected: "6" Transferring votes

6
  1. "6": 80.291469 + 0.273115 = 80.564584 (keep factor: 0.999679)
  2. "1": 80.859008 - 0.321371 = 80.537637 (keep factor: 0.719068)
  3. "2": 81.079383 - 0.554248 = 80.525135 (keep factor: 0.696993)
  4. "5": 80.209965 + 0.302629 = 80.512594
  5. "4": 80.910652 - 0.444104 = 80.466548 (keep factor: 0.983731)
  6. "7": 79.793029 + 0.288260 = 80.081289
  7. "3": 78.716329 + 0.288482 = 79.004811
Quota: 80.241801

Elected: "5" Transferring votes

7
  1. "2": 80.525135 - 0.098352 = 80.426783 (keep factor: 0.694540)
  2. "5": 80.512594 - 0.091942 = 80.420652 (keep factor: 0.996637)
  3. "1": 80.537637 - 0.119937 = 80.417700 (keep factor: 0.716426)
  4. "6": 80.564584 - 0.149868 = 80.414716 (keep factor: 0.995674)
  5. "4": 80.466548 - 0.058215 = 80.408333 (keep factor: 0.980984)
  6. "7": 80.081289 + 0.229197 = 80.310486
  7. "3": 79.004811 + 0.215830 = 79.220641
Quota: 80.231331

Elected: "7" Transferring votes

(Results from 03:30, 1 September 2021)

edit
  • Admin
  • Talk
  • Preferences
  • Watchlist
  • Contributions
  • Log out
  • Special page

Tools

edit
  • Special pages
  • Printable version



Expected

edit

Output from OpenSTV:

Loading ballots from file 7_6_566_1185838663.blt.
Ballot file contains 7 candidates and 566 ballots.
No candidates have withdrawn.
Ballot file contains 566 non-empty ballots.

Counting votes for ElectionTitle using Meek STV.
7 candidates running for 6 seats.

 R|1             |2             |3             |4             |5             
  |--------------+--------------+--------------+--------------+--------------
  |6             |7             |Exhausted     |Surplus       |Threshold     
=============================================================================
 1|    102.000000|    101.000000|     72.000000|     73.000000|     72.000000
  |     73.000000|     73.000000|      0.000000|     41.285714|     80.857143
  |--------------------------------------------------------------------------
  | Count of first choices. Candidates 1 and 2 have reached the threshold and
  | are elected.
=============================================================================
 2|     85.916273|     89.320255|     76.457006|     78.975549|     77.636402
  |     77.863722|     77.597306|      2.233487|     14.160380|     80.538074
  |--------------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.792718 and 2, 0.800566.
=============================================================================
 3|     82.409869|     82.364946|     78.128809|     81.012156|     79.562124
  |     79.663860|     79.200313|      3.657923|      4.783222|     80.334583
  |--------------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.743096 and 2, 0.721853. Candidate 4 has
  | reached the threshold and is elected.
=============================================================================
 4|     80.859000|     81.079419|     78.716280|     80.910733|     80.209923
  |     80.291424|     79.792984|      4.140237|      2.077852|     80.265681
  |--------------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.724383; 2, 0.704059; and 4, 0.991637.
  | Candidate 6 has reached the threshold and is elected.
=============================================================================
 5|     80.537646|     80.525122|     79.004749|     80.466566|     80.512529
  |     80.564631|     80.081220|      4.307537|      1.397589|     80.241781
  |--------------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.719068; 2, 0.696993; 4, 0.983732; and
  | 6, 0.999680. Candidate 5 has reached the threshold and is elected.
=============================================================================
 6|     80.417720|     80.426781|     79.220540|     80.408265|     80.420684
  |     80.414630|     80.310382|      4.380998|      1.010740|     80.231287
  |--------------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.716427; 2, 0.694541; 4, 0.980984; 5,
  | 0.996638; and 6, 0.995674. Candidate 7 has reached the threshold and is
  | elected.

Winners are 1, 2, 4, 5, 6, and 7.

Files

edit

Environment

edit