[Election-Methods] Linear Spectrum MMPD analysis: SNTV

Dan Bishop danbishop04 at gmail.com
Sun Dec 30 18:04:36 PST 2007

```First, a more efficient implementation of the method for simulation
purposes:

def sntv_winners(num_candidates, num_winners):
"""Simulate an SNTV election under a uniform linear political
spectrum."""
candidates = [random.uniform(0, 1) for dummy in xrange(num_candidates)]
candidates.sort()
midpoints = [(cand1 + cand2) / 2
for cand1, cand2 in zip(candidates[:-1], candidates[1:])]
midpoints.insert(0, 0)
midpoints.append(1)
votes = [midpoints[index + 1] - midpoints[index] for index in
xrange(num_candidates)]
random.shuffle(votes_and_cand) # to assure fair tie-breaking

**** 1 SEAT ****

Recalculating my results from the previous simulation with 1,000,000
simulations for each number of candidates, the expected MMPD is:

1 candidate: 0.33349249034576595 ± 0.00014603234005600466
2 candidates: 0.29166078589512429 ± 9.6537046377045353e-05
3 candidates: 0.29261793481679249 ± 9.6628979917049614e-05
4 candidates: 0.29641549235095588 ± 9.7371780745993342e-05
5 candidates: 0.30192042204973601 ± 0.00010048604664996664
6 candidates: 0.30696877840520648 ± 0.00010294420151868723
7 candidates: 0.31166099854123719 ± 0.00010547539349607366
8 candidates: 0.3153571445571785 ± 0.00010753346345494447
9 candidates: 0.31887338434023776 ± 0.00010989916628356363
10 candidates: 0.32169815665748763 ± 0.0001121410613726067
11 candidates: 0.32425956938976591 ± 0.00011429351302761526
12 candidates: 0.32632795386557567 ± 0.0001163568839263265
13 candidates: 0.32816536306050204 ± 0.00011831242998680777
14 candidates: 0.32968063274632869 ± 0.000120221439926984
15 candidates: 0.33108567983337517 ± 0.00012198361114869265
16 candidates: 0.33235043314519902 ± 0.00012366425826887287

**** 2 SEATS ****

2 candidates: 0.20826040058975728 ± 0.00014139576361897927
3 candidates: 0.16983038884210319 ± 9.2849296721040958e-05
4 candidates: 0.15975713913521014 ± 6.7224833817501839e-05
5 candidates: 0.15737886463566253 ± 5.9478293686679836e-05
6 candidates: 0.15886229289125092 ± 6.1589977158298147e-05
7 candidates: 0.16180571016044548 ± 6.6673838333387725e-05
8 candidates: 0.165432881211622 ± 7.2334593505924801e-05
9 candidates: 0.16910937259142136 ± 7.7578398921868705e-05
10 candidates: 0.17270915175836735 ± 8.2175300879355859e-05
11 candidates: 0.17620867134708373 ± 8.6442330935969109e-05
12 candidates: 0.17952810149800943 ± 9.0113077306914582e-05
13 candidates: 0.18266288280112938 ± 9.3642467661975438e-05
14 candidates: 0.18544955846101532 ± 9.6751552930584561e-05
15 candidates: 0.18815924242951862 ± 9.9579914895116348e-05
16 candidates: 0.19071320710306236 ± 0.00010222401027006037
17 candidates: 0.19283880742228884 ± 0.00010443877207256355

**** 3 SEATS ****

3 candidates: 0.15004500145093377 ± 0.00010914077511262061
4 candidates: 0.12391336683577095 ± 7.7997945709257804e-05
5 candidates: 0.1133131754718891 ± 5.6630109961971723e-05
6 candidates: 0.10880465807830356 ± 4.4778269048135012e-05
7 candidates: 0.10769507310684968 ± 4.0905562967910261e-05
8 candidates: 0.10824895374098938 ± 4.1671522963045523e-05
9 candidates: 0.10972197085838233 ± 4.471621302458015e-05
10 candidates: 0.11162260587718592 ± 4.8375015425657093e-05
11 candidates: 0.11373448564525449 ± 5.216960313921836e-05
12 candidates: 0.11593496281087223 ± 5.5847295330861135e-05
13 candidates: 0.11822113042261344 ± 5.9325236239551249e-05
14 candidates: 0.12037751895850114 ± 6.2403428875678534e-05
15 candidates: 0.12244037801423577 ± 6.5301769990916341e-05
16 candidates: 0.12443689815489156 ± 6.7992870075331006e-05
17 candidates: 0.12634258518376221 ± 7.0354713490695776e-05
18 candidates: 0.12813950107194119 ± 7.265612330194399e-05

**** 4 SEATS ****

4 candidates: 0.11671981728233709 ± 8.4735335510479839e-05
5 candidates: 0.098606776588135034 ± 6.427027545866157e-05
6 candidates: 0.089474022452827734 ± 4.8936762808949097e-05
7 candidates: 0.084620024086730902 ± 3.8463376399290013e-05
8 candidates: 0.08236775920103484 ± 3.2351884389972743e-05
9 candidates: 0.081660823415057898 ± 2.9954276878217339e-05
10 candidates: 0.081866767410742489 ± 3.0124037654631273e-05
11 candidates: 0.082658036376398542 ± 3.1757660952590315e-05
12 candidates: 0.083783384485769677 ± 3.4091639831788161e-05
13 candidates: 0.085088180439370165 ± 3.6575514479152133e-05
14 candidates: 0.086505626822014708 ± 3.9083200300393064e-05
15 candidates: 0.087969476920114101 ± 4.1563043114843864e-05
16 candidates: 0.0894994468434782 ± 4.4012040120858741e-05
17 candidates: 0.091010706431567723 ± 4.6411723111248194e-05
18 candidates: 0.092408037885427993 ± 4.8432790728728947e-05
19 candidates: 0.093807841512206933 ± 5.0397227706379975e-05

**** 5 SEATS ****

5 candidates: 0.095207067351433278 ± 6.7247628660015892e-05
6 candidates: 0.08210576026400368 ± 5.3189407682848962e-05
7 candidates: 0.074603715957659619 ± 4.2120802633590386e-05
8 candidates: 0.07006597281274965 ± 3.3756367621312915e-05
9 candidates: 0.067535488689647399 ± 2.8081063788576205e-05
10 candidates: 0.066262794050300347 ± 2.4721509008436484e-05
11 candidates: 0.065775309629623288 ± 2.3181405853035909e-05
12 candidates: 0.065848913234147211 ± 2.3196916421314685e-05
13 candidates: 0.066314626613199687 ± 2.4186876121354995e-05
14 candidates: 0.067003382183720012 ± 2.559388609779771e-05
15 candidates: 0.067822830637251558 ± 2.7226838362548938e-05
16 candidates: 0.068778984375438348 ± 2.9056788851516113e-05
17 candidates: 0.069765416257847837 ± 3.0849031417006931e-05
18 candidates: 0.070768776700412123 ± 3.2542168843335771e-05
19 candidates: 0.071829429641520448 ± 3.4221475245509677e-05
20 candidates: 0.07285782646933929 ± 3.580168813180946e-05

**** 6 SEATS ****

6 candidates: 0.080344863435482833 ± 5.4901046004167755e-05
7 candidates: 0.070517638415464795 ± 4.4859048565443474e-05
8 candidates: 0.064256309078401561 ± 3.6396955898334115e-05
9 candidates: 0.060257160661371802 ± 2.9946027628576023e-05
10 candidates: 0.057721998192901504 ± 2.5058563583311492e-05
11 candidates: 0.056190830662065483 ± 2.1539815488272296e-05
12 candidates: 0.055369982089741449 ± 1.9464084288846246e-05
13 candidates: 0.055051826713806727 ± 1.8552226092931633e-05
14 candidates: 0.055068535595139662 ± 1.8483413525721192e-05
15 candidates: 0.055341046022735166 ± 1.9081479353957406e-05
16 candidates: 0.055774795019559155 ± 1.9958070989220905e-05
17 candidates: 0.056350958633970778 ± 2.120895102557642e-05
18 candidates: 0.056981130122382567 ± 2.2415812954280426e-05
19 candidates: 0.057684029070117784 ± 2.3708962278582257e-05
20 candidates: 0.058403938928181812 ± 2.4964502166584384e-05
21 candidates: 0.059174254250662778 ± 2.628284903712256e-05

**** 7 SEATS ****

7 candidates: 0.069475868270458263 ± 4.5821360438921454e-05
8 candidates: 0.06179958062825322 ± 3.8073035412691049e-05
9 candidates: 0.056621359788981203 ± 3.1723273004449804e-05
10 candidates: 0.0530604531318042 ± 2.6628968183067321e-05
11 candidates: 0.050660928681778038 ± 2.2507273169476365e-05
12 candidates: 0.049113979608464635 ± 1.9462319277218902e-05
13 candidates: 0.048124435767619704 ± 1.7287785049033873e-05
14 candidates: 0.047572970619210314 ± 1.5915554481276844e-05
15 candidates: 0.047325769088185234 ± 1.5266245616501922e-05
16 candidates: 0.047326539512934987 ± 1.5226414515071832e-05
17 candidates: 0.047492515079431294 ± 1.5559062508422881e-05
18 candidates: 0.047799550226974206 ± 1.6226470284338839e-05
19 candidates: 0.04817895010632596 ± 1.6998205837304895e-05
20 candidates: 0.048634864215251518 ± 1.7936450221529751e-05
21 candidates: 0.049140543865051893 ± 1.8891833435160149e-05
22 candidates: 0.049687195098628179 ± 1.9877073549007731e-05

**** 8 SEATS ****

8 candidates: 0.061130225825508408 ± 3.8734370587772165e-05
9 candidates: 0.05502359854479371 ± 3.2823061643615289e-05
10 candidates: 0.050693761558386577 ± 2.7999431646607886e-05
11 candidates: 0.047552809105826752 ± 2.385080348891705e-05
12 candidates: 0.045342378992073495 ± 2.0429468146282262e-05
13 candidates: 0.043798872079415102 ± 1.7670128746622218e-05
14 candidates: 0.042753852767528897 ± 1.5646052859399325e-05
15 candidates: 0.042088599820199767 ± 1.4198818863556884e-05
16 candidates: 0.041686912439983952 ± 1.3262168099718342e-05
17 candidates: 0.041516725825546497 ± 1.2832399700081799e-05
18 candidates: 0.041493201152199746 ± 1.2787808838676019e-05
19 candidates: 0.041593704103542906 ± 1.2992928765876302e-05
20 candidates: 0.041810923935908288 ± 1.3483826627550057e-05
21 candidates: 0.042079820084856667 ± 1.405005575297602e-05
22 candidates: 0.042411933869283061 ± 1.4703308211301387e-05
23 candidates: 0.042789827526164531 ± 1.5419729638604346e-05

Now, all I need is a simple mathematical function to which to fit this
data...

```