On the complex nature of Gerrymandering

Gerrymandering, in short, is the redistricting of electoral districts in a manner that gives a party a political advantage due to predictable voting patterns. Consider the toy example:

New poll: Everybody Hates Gerrymandering
https://d3n8a8pro7vhmx.cloudfront.net/fairvote/pages/6634/meta_images/original/How_to_Steal_an_Election_-_Gerrymandering.svg.png?1505232361

Under a voting system that guarantees proportional representation, we would expect the Red party to win 2 districts and the Blue party to win 3 districts. A voting system that guarantees local representation would guarantee that each voter has a well-defined representative. Above we see it is possible to draw contiguous and equally populated districts in such a way like the third scenario that the Red Party is able to win a larger proportion of districts (60%) than the proportion of voters who actually voted Red (40%). It is also possible to draw the district lines in such a way that blue wins all 5 districts, therefore leaving 40% of the population who voted Red unrepresented.

All voting systems, not just single-winner district plurality voting, exhibit this fundamental problem: It is impossible to guarantee both proportional representation and local representation.

Gerrymandering is characterized by non-compact districts that stretch in odd shapes to waste as many votes of the opposing party as possible. Gerrymandering is rightfully seen as a corruption of the Democratic system. The term was coined in 1812 when the governor of Massachussetts, Elbridge Gerry, signed a bill allowing a partisan district shaped like the following:

https://redistricting.lls.edu/wp-content/uploads/GerrymanderContext-300×194.jpg

The newspapers ran with this news to produce the following image of a salamander, thus coining the term of this practice to be “Gerry-mander”.

https://redistricting.lls.edu/wp-content/uploads/GerryRotate1-283×300.jpg

Why is gerrymandering hard to prove in court?

It may be tempting to use a geographic approach to analyze the geometric shapes of district boundaries to make sure they meet the standards of compactness. There are several problems with this including that there is no universally accepted mathematical definition of compactness. This approach also ignores population density and geographic barriers like lakes and mountains that can form irregularly shaped boundaries.

Statistical approaches have been developed (Wang 2016) that do not require looking at the shapes and maps of these boundaries. These numerical approaches are not definitive answers under law as to whether gerrymandering has occurred. However, they can be provided as tools to convince a judge of intent and to analyze the effects of that intent.

Statistical Approaches to Show Gerrymandering

In his 2016 applications paper, Wang showcases three partisan gerrymandering cases using his three statistical tests.

Wang’s First Test of Intent: t-test

VoteShare(party) = (Number of votes for party)/(Number of total votes)

To show intent, Wang uses a t-test, a classic statistical test, to compare values from two groups for significant differences in magnitude. In the case of gerrymandering, we want to make a list of vote shares for each party considering only districts which they won. Each list should consist of at least one value, and every value will be between 0.5 and 1.0 due to the fact that we are only considering winning vote shares in an election with two parties. If more than two parties are present, we either distribute those votes fairly to the main two parties, or discard those votes from calculations.

Example: Say there are 10 districts and the red party won 4 of them with 80%, 75%, 70% and 65% vote shares. The blue party won its 6 districts with 51%, 52%, 53%, 55%, 56% and 57% vote shares. The mean winning vote share is 72.5% for the red party and 54% for the blue party. A Welch’s two sample t-test can be used to show that the difference between these two lists of vote shares is statistically significant, given assumptions that can be somewhat hard to prove. The results from this test can be used in favor of the argument that this election was a result of gerrymandering.

A statistically significant t-test indicates evidence towards gerrymandering because the losing party tends to have larger vote shares in districts won because the districts were drawn in a way to waste their votes by packing them into a small number districts. Also, the winning party under gerrymandering wastes opponents votes in a way by distributing them across districts where the winning party has a small but comfortable winning margin (cracking).

In conclusion, the t-test works counter-intuitively in theory because we expect the losing party to have a significantly larger average vote-share across its winning districts due to the packing and cracking principles that lead to a successful gerrymander. However, this test requires a standard deviation calculation which requires both parties to have won at least two districts.

Wang’s Second Test of Intent

Wang’s second test of intent measures the reliability of vote shares for the winning party. Ideally, under a gerrymandering scenario, winning margins would be wide enough to secure victory but not wide enough to waste votes that could be used in other districts. To show intent of gerrymandering, it must first be determined whether the statewide votes are closely divided or dominated by a party. This again can be determined using a t-test.

For a closely divided state, Wang calculates for each party:

mean(vote share) – median(vote share)

Counter-intuitively, this test shows gerrymandering in favor of a party if the mean-median difference for the losing party was significantly greater than zero. This test, in principle quantifies the concept of packing the losing party’s votes which leads to higher mean vote shares in few districts, thus skewing the mean above the median.

For a state dominated by one party, Wang computes the standard deviation of vote shares for only districts won by the gerrymandering party and the standard deviation of the party’s vote share in districts won nationwide. The two values can be statistically compared by the Chi-Square test for comparing variances. Under the assumption that the party has not gerrymandered other districts in the nation, this test intends to show evidence for gerrymandering when the standard deviation of statewide winning vote shares for a party are significantly lower than the standard deviation of nationwide winning vote shares.

Wang’s Test of Effect

Wang’s final test measures the number of seats allegedly stolen as a result of gerrymandering. It requires election data from other states to simulate an election with the same number of districts as the state in question, but the districts are randomly sampled from around the nation. This provides a distribution of electoral districts that is expected in the absence of directed partisan intent. Lastly, we need to only consider samples where the popular vote shares are within some small threshold of the actual vote shares of the election in question. For all samples meeting this criteria, the number of districts won for each party is saved. In statistical terms, we can view the nationwide district sampling as a null distribution. Therefore, a p-value can be computed.

For example, in a 10 district election, say party A won 7 districts with 60% popular vote, party B won 3, and we suspect party A gerrymandered. If we run the simulation on 100 sample elections nationwide where the popular vote for party A was within 10% of 60%, we can compute an estimated p-value equal to the number of samples where party A won 7 or more district divided by 100. This p-value gives us the estimated probability that we observed party A winning 7 (or more) out of 10 districts in a non-gerrymandered election by random chance (in this case, random districts with no partisan advantage).

Conclusions of Wang’s Tests

Wang’s tests have the advantage that they require simple calculations that can be understood by everyone in the courtroom. They rely on simple statistical tests that can be computed on any computer. The validity of these tests is up to the observer, who has to determine whether the required assumptions for these tests are held. The t-test, for example, requires that the distribution of the vote shares comes from a normal distribution, which is never true when the data is bounded by 0.5 and 1.0. The simulation assumes that the random samples from the national districts are not influenced by the party of interest. The chi-square test of variances also assumes the distributions of the data is normal.

Efficiency Gap

The efficiency gap calculation quantifies the asymmetry of a bipartisan election by counting the scaled difference in wasted votes for both parties. A wasted vote for a given can occur in one of two scenarios. When a party loses a district, all votes for said party in the district are considered wasted. When a party wins a district, any vote more than the number of votes needed to win the majority vote is considered wasted.

Denote WA the total number of wasted votes for party A in a given election. The efficiency gap for an election between party A and B is calculated:

Efficiency Gap = $\abs{\frac{WA – WB }{V}}$

If we want to test whether a particular party gerrymandered the election (a one-sided alternative hypothesis), say party A, we can remove the absolute value to calculate:

$\frac{WA – WB }{V}$

Case Study: Washington State Congressional Elections

Washington state has been known to be predominately Democratic in recent presidential and congressional elections. But does the number of Democratic congressional seats won proportionally represent the number of statewide Democratic voters?

Visual made possible by PowerBI
Visual made possible by PowerBI

Initial analysis consisted of comparing the seats won out of the 10 WA districts by Democrats for each election to the percentage of vote shares that the Democrats had in the state of Washington for that election. Each election, the Democrats won a larger proportion of seats than their share of the popular vote. This led me to specify my hypothesis to determine whether the state of Washington was gerrymandered by Democrats. Third parties did not play major roles in this election and were removed from the analysis.

Since the hypothesis was to determine whether Democrat gerrymandering
had occurred, directional efficiency gaps were measured (no absolute value) by the formula $EG = \frac{WR – WD }{V}$ so that a larger positive number indicated more wasted Republican votes and more evidence towards Democrat gerrymandering.

Here is the plot of Efficiency Gap for each election when single party districts were removed.

From the initial analysis, it was evident that the 2014, 2016 and 2020 elections deviated from the other two elections with regards to their Efficiency Gap and skewness scores. However, for the sake of validating the upcoming simulated bow-tie chart, all 5 of the elections were further analyzed with a simulation analysis and more formal tests. The simulation analysis made use of the 2012 US congressional election (with Washington state districts filtered out) from all US districts and ran as follows for each WA Election (called 20XX Election below):

  1. Sample 10 non-Washington districts from 2012 US congressional election data to simulate a comparable election to the 10 WA state districts
  2. If the Democratic sample-wide vote share is off from the 20XX WA Election results by at
    least 15%, discard and re-sample as in step 1.
  3. Calculate the Efficiency Gap, Skewness, sample-wide Democratic vote share (saved from
    step 2), and number of Democratic seats won in sample election and save to vectors
  4. Repeat steps 1-3 until 10000 samples are recorded
  5. Plot histograms of collected Efficiency Gap and Skewness, compare with observed WA
    20XX Election by calculating the proportion of samples with greater than or equal Efficiency Gap and a lesser than or equal skewness. This is the estimated p-value.
  6. Plot a bow-tie chart by using scatter plot of Democrat seats won vs. Sample-wide vote
    share. Draw Loess-Regression curve through data points and proportional representation
    line. Mark clearly where WA 20XX plots on the scatter plot and determine visually whether
    it falls inside or outside bow-tie.

Under the strong assumption that each of the 10 samples gathered from the US 2012 congressional election represents a non-gerrymandered election, we can treat the histograms of step 5 as samples from the null distribution for these statistics and the calculated proportions as estimated p-values. However, this is a big assumption and there is difficult to verify. So in practice, we are essentially comparing the state of gerrymandering across a random sample of US districts that may or may not be gerrymandered to see if WA is relatively a particularly bad case of Democratic gerrymandering.

p-values were computed from these simulations by computing the proportion of simulated elections with a greater than or equal efficiency gap. None of the simulation trials for each election year yielded significant (<0.05) p-values. This provides no evidence that Democratic gerrymandering occurred in any individual election. A similar procedure was done with calculating skewness (median mean difference) instead with the same conclusion.

The simulation results have interpretable estimated p-values if we make the strong assumption that each individual sample consisting of 10 random US districts (not in Washington state) shows no sign of gerrymandering in favor of the Democratic Party. Under this assumption, elections 2014,2016 and 2020 had nearly significant p-values at a significance level of 0.10 that showed moderate evidence of gerrymandering in favor of the Democratic Party. Basically, under the assumption that the simulated samples represent a null distribution of no gerrymandering, only 10% of the samples obtained a more extreme efficiency gap for three of our elections. In fact, all of the elections scored relatively low estimated p-values (0.13, 0.1, 0.096, 0.26, 0.11) whereas if there were absolutely no sign of gerrymandering we would expect these values to be sampled uniformly between 0 and 1. A Kolomogorov-Smirnov test comparing these values to the Uniform(0,1) distribution returns a p-value of 0.008 which is very strong evidence that these p-values are not from a uniform distribution. This indicates quite strong evidence against the hypothesis that there is no sign of gerrymandering in favor of Democrats in Washington when looking at the last five elections as a whole.

Case Study Conclusion

Using the efficiency gap and Wang’s test of skewness, it is hard to show signs of gerrymandering for any individual Washington election. However, Democrats win a proportion of the seats that is greater in value than their percentage of the popular vote each of the five years. Under the assumption of no gerrymandering, we would expect the Democrats to win a percentage of the seats that fluctuates randomly (above and below) their percentage of the vote share. In my opinion, this gives strong evidence that Democrats have Washington gerrymandered to give them a slight advantage in Congress than would be expected by their share of the popular vote. It would be hard to show this in court for any single election. As for the simulation analysis of all five elections as a whole, one would have to convince a judge to understand and trust the intricacies of the efficiency gap calculation, simulation procedure, and Kolmogorov-Smirnov test to possibly get a verdict in favor of Democratic gerrymandering.