Statistics, Politics, Law and Gerrymandering
This post summarises my MSc dissertation (University of Leeds, 2021) on detecting partisan bias in electoral maps using Markov Chain Monte Carlo (MCMC), applied to Massachusetts. It blends statistics with legal context and shows how computational sampling can inform fairness debates.
Why MCMC for redistricting?
We rarely have access to the full space of all valid districting plans, so judging whether a given plan is an outlier is difficult. MCMC lets us sample from the space of valid plans and compare the plan in use against an ensemble using metrics like efficiency gap and partisan symmetry.
Data set and constraints
- Built a Massachusetts dual graph (municipalities as nodes; adjacencies as edges).
- Validity constraints: equal population (thresholded), contiguity, and limited splits.
- Created and merged multiple sources (including 2020 presidential voting) into a single analytical data set.
Two proposal functions
Boundary Flip
Iteratively flips a boundary node from one district to a neighbour, preserving validity constraints. Easy to explain but tends to produce long, snaky districts; mixes slowly and can struggle with contiguity.
Recombination ("ReCom")
Samples a pair of adjacent districts, builds an induced subgraph, draws a random spanning tree, and cuts an edge to form two new districts that meet constraints. Implies contiguity and produces more compact plans. Each step is heavier, but ensembles diversify faster.
Metrics
- Efficiency gap (wasted votes),
- Partisan symmetry,
- Compactness proxies (e.g., cut edges, boundary length).
Results
- On a 35% adjustment level, the ensemble suggested the original map exhibits some Democratic bias.
- Across other adjustment levels, evidence was not consistently significant.
- ReCom produced more varied and compact plans with quicker ensemble diversification; Boundary Flip required far more iterations to explore the space.
Conclusion
Is Massachusetts gerrymandered? Based on the ensembles generated, I did not find concrete evidence that would meet a robust legal standard. Some bias appears at one adjustment level, but strong outlier evidence (e.g., more biased than 95% of sampled plans across conditions) wasn’t met given the sample sizes.
Further work
- Scale up sample sizes (e.g., 10k+ ReCom, 1B Boundary Flip) for tighter confidence.
- Finer-grained adjustment levels and sensitivity analysis.
- Port the pipeline to other states; the dual-graph methodology generalises.
You can download the full dissertation here.