The Supreme Court heard a case on Oct. 3 about whether Wisconsin Republicans gave themselves a guaranteed GOP majority when they redrew the state’s legislative districts in 2011.

A new way to test for partisan gerrymandering is a key part of the plaintiffs’ argument — the efficiency gap. Here’s how it works.

In this imaginary state, there are 20 green voters and 30 purple voters. Even though there are more purple voters, a district plan can be drawn that stacks the odds for green lawmakers to control the state.