Anti-Harassment Tools/SecurePoll Improvements/Test Results/20 6 5000 1329880128

From mediawiki.org
Jump to navigation Jump to search

Comments[edit]

Case: All but one seats filled, two hopeful candidates who are not tied on votes.

SecurePoll and OpenSTV agree on final results, and they have the same number of rounds.

Election setup[edit]

  • Candidates: 20
  • Seats: 6
  • Votes: 5000

Actual[edit]

Output from SecurePoll (var_dump( $this->tallier->resultsLog );): https://phabricator.wikimedia.org/P16855

Actual Tally: SP[edit]

Elected[edit]

Election for 6 seats with 20 candidates. Total 5,000 votes.

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

Eliminated/Not elected[edit]

  • "8"
  • "9"
  • "10"
  • "7"
  • "12"
  • "13"
  • "14"
  • "15"
  • "6"
  • "17"
  • "18"
  • "19"
  • "20"
  • "11"

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. "5": 858
  2. "1": 857
  3. "2": 857
  4. "3": 857
  5. "4": 857
  6. "16": 400
  7. "11": 314
  8. "8": 0
  9. "9": 0
  10. "10": 0
  11. "7": 0
  12. "12": 0
  13. "13": 0
  14. "14": 0
  15. "15": 0
  16. "6": 0
  17. "17": 0
  18. "18": 0
  19. "19": 0
  20. "20": 0
Quota: 714.285715
2
  1. "5": 858
  2. "1": 857
  3. "2": 857
  4. "3": 857
  5. "4": 857
  6. "16": 400
  7. "11": 314
  8. "8": 0
  9. "9": 0
  10. "10": 0
  11. "7": 0
  12. "12": 0
  13. "13": 0
  14. "14": 0
  15. "15": 0
  16. "6": 0
  17. "17": 0
  18. "18": 0
  19. "19": 0
  20. "20": 0
Quota: 714.285715

Elected: "1", "2", "3", "4", "5"

3
  1. "1": 857 - 142.714285 = 714.285715 (keep factor: 0.833472)
  2. "2": 857 - 142.714285 = 714.285715 (keep factor: 0.833472)
  3. "3": 857 - 142.714285 = 714.285715 (keep factor: 0.833472)
  4. "4": 857 - 142.714285 = 714.285715 (keep factor: 0.833472)
  5. "5": 858 - 143.714285 = 714.285715 (keep factor: 0.832501)
  6. "16": 400
  7. "11": 314
  8. "8": 0
  9. "9": 0
  10. "10": 0
  11. "7": 0
  12. "12": 0
  13. "13": 0
  14. "14": 0
  15. "15": 0
  16. "6": 0
  17. "17": 0
  18. "18": 0
  19. "19": 0
  20. "20": 0
Quota: 612.204083

Transferring votes

4
  1. "5": 714.285715 - 102.081632 = 612.204083 (keep factor: 0.713525)
  2. "1": 714.285715 - 102.081632 = 612.204083 (keep factor: 0.714357)
  3. "2": 714.285715 - 102.081632 = 612.204083 (keep factor: 0.714357)
  4. "3": 714.285715 - 102.081632 = 612.204083 (keep factor: 0.714357)
  5. "4": 714.285715 - 102.081632 = 612.204083 (keep factor: 0.714357)
  6. "16": 400
  7. "11": 314
  8. "8": 0
  9. "9": 0
  10. "10": 0
  11. "7": 0
  12. "12": 0
  13. "13": 0
  14. "14": 0
  15. "15": 0
  16. "6": 0
  17. "17": 0
  18. "18": 0
  19. "19": 0
  20. "20": 0
Quota: 539.288632

Transferring votes

5
  1. "1": 612.204083 - 72.915451 = 539.288632 (keep factor: 0.629275)
  2. "2": 612.204083 - 72.915451 = 539.288632 (keep factor: 0.629275)
  3. "3": 612.204083 - 72.915451 = 539.288632 (keep factor: 0.629275)
  4. "4": 612.204083 - 72.915451 = 539.288632 (keep factor: 0.629275)
  5. "5": 612.204083 - 72.915451 = 539.288632 (keep factor: 0.628542)
  6. "16": 400
  7. "11": 314
  8. "8": 0
  9. "9": 0
  10. "10": 0
  11. "7": 0
  12. "12": 0
  13. "13": 0
  14. "14": 0
  15. "15": 0
  16. "6": 0
  17. "17": 0
  18. "18": 0
  19. "19": 0
  20. "20": 0
Quota: 487.206167

Eliminated: "8", "9", "10", "7", "12", "13", "14", "15", "6", "17", "18", "19", "20" Transferring votes

6
  1. "5": 539.288632 - 52.082465 = 487.206167 (keep factor: 0.567839)
  2. "1": 539.288632 - 52.082465 = 487.206167 (keep factor: 0.568502)
  3. "2": 539.288632 - 52.082465 = 487.206167 (keep factor: 0.568502)
  4. "3": 539.288632 - 52.082465 = 487.206167 (keep factor: 0.568502)
  5. "4": 539.288632 - 52.082465 = 487.206167 (keep factor: 0.568502)
  6. "16": 400
  7. "11": 314
Quota: 450.004406

Transferring votes

7
  1. "1": 487.206167 - 37.201761 = 450.004406 (keep factor: 0.525093)
  2. "2": 487.206167 - 37.201761 = 450.004406 (keep factor: 0.525093)
  3. "3": 487.206167 - 37.201761 = 450.004406 (keep factor: 0.525093)
  4. "4": 487.206167 - 37.201761 = 450.004406 (keep factor: 0.525093)
  5. "5": 487.206167 - 37.201761 = 450.004406 (keep factor: 0.524481)
  6. "16": 400
  7. "11": 314
Quota: 423.431719

Transferring votes

8
  1. "1": 450.004406 - 26.572687 = 423.431719 (keep factor: 0.494086)
  2. "2": 450.004406 - 26.572687 = 423.431719 (keep factor: 0.494086)
  3. "3": 450.004406 - 26.572687 = 423.431719 (keep factor: 0.494086)
  4. "4": 450.004406 - 26.572687 = 423.431719 (keep factor: 0.494086)
  5. "5": 450.004406 - 26.572687 = 423.431719 (keep factor: 0.493510)
  6. "16": 400
  7. "11": 314
Quota: 404.451229

Transferring votes

9
  1. "1": 423.431719 - 18.98049 = 404.451229 (keep factor: 0.471938)
  2. "2": 423.431719 - 18.98049 = 404.451229 (keep factor: 0.471938)
  3. "3": 423.431719 - 18.98049 = 404.451229 (keep factor: 0.471938)
  4. "4": 423.431719 - 18.98049 = 404.451229 (keep factor: 0.471938)
  5. "5": 423.431719 - 18.98049 = 404.451229 (keep factor: 0.471388)
  6. "16": 400
  7. "11": 314
Quota: 390.893736

Elected: "16" Transferring votes

(Results from 14:28, 31 August 2021)

Navigation menu[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 20_6_5000_1329880128.blt.
Ballot file contains 20 candidates and 5000 ballots.
No candidates have withdrawn.
Ballot file contains 5000 non-empty ballots.

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

 R|1          |2          |3          |4          |5          |6          
  |-----------+-----------+-----------+-----------+-----------+-----------
  |7          |8          |9          |10         |11         |12         
  |-----------+-----------+-----------+-----------+-----------+-----------
  |13         |14         |15         |16         |17         |18         
  |-----------+-----------+-----------+-----------+-----------+-----------
  |19         |20         |Exhausted  |Surplus    |Threshold  
==========================================================================
 1| 857.000000| 857.000000| 857.000000| 857.000000| 858.000000|   0.000000
  |   0.000000|   0.000000|   0.000000|   0.000000| 314.000000|   0.000000
  |   0.000000|   0.000000|   0.000000| 400.000000|   0.000000|   0.000000
  |   0.000000|   0.000000|   0.000000| 714.571425| 714.285715
  |-----------------------------------------------------------------------
  | Count of first choices. Candidates 1, 2, 3, 4, and 5 have reached the
  | threshold and are elected.
==========================================================================
 2| 714.286361| 714.286361| 714.286361| 714.286361| 714.285858|   0.000000
  |   0.000000|   0.000000|   0.000000|   0.000000| 314.000000|   0.000000
  |   0.000000|   0.000000|   0.000000| 400.000000|   0.000000|   0.000000
  |   0.000000|   0.000000| 714.568698| 510.408942| 612.204472
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.833473; 2, 0.833473; 3, 0.833473; 4,
  | 0.833473; and 5, 0.832501.
==========================================================================
 3| 612.204806| 612.204806| 612.204806| 612.204806| 612.205308|   0.000000
  |   0.000000|   0.000000|   0.000000|   0.000000| 314.000000|   0.000000
  |   0.000000|   0.000000|   0.000000| 400.000000|   0.000000|   0.000000
  |   0.000000|   0.000000|1224.975468| 364.578437| 539.289219
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.714358; 2, 0.714358; 3, 0.714358; 4,
  | 0.714358; and 5, 0.713526.
==========================================================================
 4| 539.289532| 539.289532| 539.289532| 539.289532| 539.289894|   0.000000
  |   0.000000|   0.000000|   0.000000|   0.000000| 314.000000|   0.000000
  |   0.000000|   0.000000|   0.000000| 400.000000|   0.000000|   0.000000
  |   0.000000|   0.000000|1589.551978| 260.413717| 487.206861
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.629276; 2, 0.629276; 3, 0.629276; 4,
  | 0.629276; and 5, 0.628543.
==========================================================================
 5| 539.289532| 539.289532| 539.289532| 539.289532| 539.289894|           
  |           |           |           |           | 314.000000|           
  |           |           |           | 400.000000|           |           
  |           |           |1589.551978| 260.413717| 487.206861
  |-----------------------------------------------------------------------
  | Count after eliminating 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19,
  | and 20 and transferring votes. All losing candidates are eliminated.
==========================================================================
 6| 487.207071| 487.207071| 487.207071| 487.207071| 487.207578|           
  |           |           |           |           | 314.000000|           
  |           |           |           | 400.000000|           |           
  |           |           |1849.964138| 186.010242| 450.005124
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.568503; 2, 0.568503; 3, 0.568503; 4,
  | 0.568503; and 5, 0.567841.
==========================================================================
 7| 450.005558| 450.005558| 450.005558| 450.005558| 450.005556|           
  |           |           |           |           | 314.000000|           
  |           |           |           | 400.000000|           |           
  |           |           |2035.972212| 132.865078| 423.432542
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.525094; 2, 0.525094; 3, 0.525094; 4,
  | 0.525094; and 5, 0.524482.
==========================================================================
 8| 423.432559| 423.432559| 423.432559| 423.432559| 423.433296|           
  |           |           |           |           | 314.000000|           
  |           |           |           | 400.000000|           |           
  |           |           |2168.836468|  94.903862| 404.451934
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.494087; 2, 0.494087; 3, 0.494087; 4,
  | 0.494087; and 5, 0.493512.
==========================================================================
 9| 404.452580| 404.452580| 404.452580| 404.452580| 404.452620|           
  |           |           |           |           | 314.000000|           
  |           |           |           | 400.000000|           |           
  |           |           |2263.737060|  76.894704| 390.894706
  |-----------------------------------------------------------------------
  | Count after transferring surplus votes. Keep factors of candidates who
  | have exceeded the threshold: 1, 0.471940; 2, 0.471940; 3, 0.471940; 4,
  | 0.471940; and 5, 0.471390. Candidate 16 has reached the threshold and
  | is elected.

Winners are 1, 2, 3, 4, 5, and 16.

Files[edit]

array (
  5 => 
  array (
    'count' => 858,
    'rank' => 
    array (
      1 => 5,
    ),
  ),
  16 => 
  array (
    'count' => 400,
    'rank' => 
    array (
      1 => 16,
    ),
  ),
  4 => 
  array (
    'count' => 857,
    'rank' => 
    array (
      1 => 4,
    ),
  ),
  11 => 
  array (
    'count' => 314,
    'rank' => 
    array (
      1 => 11,
    ),
  ),
  3 => 
  array (
    'count' => 857,
    'rank' => 
    array (
      1 => 3,
    ),
  ),
  1 => 
  array (
    'count' => 857,
    'rank' => 
    array (
      1 => 1,
    ),
  ),
  2 => 
  array (
    'count' => 857,
    'rank' => 
    array (
      1 => 2,
    ),
  ),
)

Environment[edit]