Saturday, December 31, 2016

It's Important and Easy to Understand

Comparing levels of fairness among different elections in different countries and electoral systems

When you vote you want fairness. So it’s important that the proportion of seats that your chosen party gets comes very close to matching the proportion of votes they got.  When your party's quantity of representation in the "house of power" is proportional to the quantity of votes they got, that's called "proportional representation."

The Gallagher Index measures how closely those two match in past elections -- both in our country and others.

This measurement or “score” enables us to accurately compare various levels of proportionality among various past elections from various electoral systems of various countries. As we look back over time, we can see consistent patterns and tendencies.

Once that comparing is done from past elections, then people can better choose, design, and improve their electoral system to fit their particular needs in future elections.

Non partisan:  Regardless of which party we are connected to, the Gallagher index provides us with a common way to assess things. It can’t be swayed by bias because it's purely mathematical and therefore purely objective. That’s why it’s worth learning about how the math works.
Test an unfamiliar electoral system more quickly:  If you encounter an electoral system that you’re not familiar with, and you question the exact extent to which it matches seats in proportion to votes (and you don’t have time to learn all the detailed nuances of that electoral system) you can put it through the test of the Gallagher Index to gain more confidence of its level of proportionality or dis-proportionality.

Understanding it in chewable chunks in a table form 

The summary of the Gallagher Index is expressed in an algebra formula, but when you actually use it, you need to list all the parties in a table format anyway…so we might as well just use a table format.

Shown here is the example of the 2015 Canadian federal election (thanks to Raellerby via Wikimedia), but you can use the same table for any election from any country and from any electoral system.

For each party, we take the "% of votes" and subtract the "% of seats" to get the "difference" in percentages for each party. 
(Notice how it’s sometimes possible for that subtraction to produce a negative number. That happens when a party gets more than its fair share of seats.)

About the last column: Finding a way to compare the disproportionality of entire elections

In order to compare how disproportionate this entire election is in comparison with other entire elections, we need to somehow create one single score for this entire election. We need to gather all of the "parties’ scores of disproportionality" into one score of "election disproportionality."

Before we can add up all of the parties’ scores, we need to convert them all into positive numbers.  We can do that by squaring them all (multiplying the number by itself).

Why does squaring them all convert them all into positive numbers? This works because you’ll get a positive number as a result -- regardless of whether you multiply a positive number by itself, or whether you multiply a negative number by itself. (Learn more about multiplying two negatives here.)

Summary of the last column:

First, all the parties’ scores are squared, and they all become positive numbers.

Second, you add up all of the squares from all of the parties into one score for the entire election. Then you can compare this "score" with other elections' scores. Whichever election has the “least squares” has the least disproportionate electoral outcome. (See below FAQ #1)

Learning from history with the Gallagher Index

The Gallagher Index "scores" for individual elections can also be applied to many elections over longer spans of time in history. As we look back over time, we can see consistent patterns and tendencies. To see Canada's average "score" between 1950 and 2016, compared to eleven other countries (with various electoral systems) see this example. Or look here. Or to see many past elections from many countries (with various electoral systems), click here and look for the subtitle "Values of  indices."



1. Did Gallagher invent the idea of "least squares?" 


No. Gallagher himself said that the idea of “Least Squares” (LSq) has a long history in the natural sciences and social sciences. His index ("LSq = ...") is simply another form of it applied to elections. The method of “least squares” is used to compare an observed value (“what actually happens”) to its data point (“the ideal” or “reference point”). ("Least Squares" is discussed in both a Simple English Wikipedia article, and a regular Wikipedia article.)

2. Why halve (cut in half) the sum of the squares?

The parties which "got more seats than their votes warranted" actually "took" those seats from other losing parties (in a sense). If we would count both those "seats taken" and those same "seats received," then we would be counting that same disproportionality two times. But we only want to count that disproportionality once, so we halve the sum of the squares (divide it by two).

3. Why is there a square root done at the very end?

Because it reverses the exponential effect of all the squaring that was done earlier in the Gallagher calculation. This is done to make the final answer number more similar to the numbers it was derived from -- namely the percentage differences in the "differences" column.

The "exponential effect" is shown here: 2x2=4, but 3x3=9. Comparing 4 to 9 is an exponentially larger difference than comparing 2 to 3. To undo that particular "exponential" effect of all the squaring we did earlier in the calculation, we simply do a square root at the end of the calculation (after the initial squaring has finished serving its purpose of converting all numbers into positive numbers).

4. The rules for federal elections in Canada require that certain provinces always get a certain quantity of seats - on a province by province basis. If so, then the Gallagher index for Canada ought to ALSO reflect that.  In other words, the Gallagher data should be collected on a province by province basis; and the Gallagher score should be calculated on a province by province basis. Only after that is done, can we then add up all of those provincial scores and then average them out to get the true national "composite Gallagher index" score. Agree?

Yes. And if we do that, then the above table calculation of 12 for Canada is incorrect. It should instead show a "composite Gallagher index" of 17.1. Byron Weber Becker developed this index.


5. What level of math do I need to understand the Gallagher Index? 

Grade 8: Practice with squares and square roots together is here, and here in equations

LEARN MORE at these links (listed from "easy" to "hard" ...sort of):

- What is the Gallagher Index?

-  The Gallagher Index: A measure of Disproportionality (a Google Doc)

- Composite Gallagher Index in detail - and much more - at Byron Weber Becker's Elections Modelling website (for Canada)
English Wikipedia entry for the Gallagher Index

Michael Gallagher's work on Electoral Systems at Trinity College Dublin (see this subtitle: "Calculate the indices for any election")  

- a more general link to Gallagher's work on "least squares index"

Other Useful links (not listed from "easy" to "hard"):

-  Fair Vote Canada

- Représentation équitable au Canada

-  Wikipédia en français - Indice de Gallagher 

- List of Recommendations from the Canadian Parliamentary Committee on Electoral Reform. Recommendation #1 mentions the Gallagher Index

 More on Byron Weber Becker - Overview of Simulations

Another way to measure fairness in electoral systems is to measure the proportion of the voting power of individuals, as opposed to the proportion of the power of parties. There are three ways to measure that voting power of individuals: 

1. Representation Metric: the percentage of voters represented by an MP for whom they voted 

2. Legislative Power Share (LPS) Score: the share of legislative voting power held by individual voters relative to their ‘fair share’ 

3. Legislative Power Disparity Index: The distribution of legislative power among voters

To learn more visit this blog post called, "Exploring Strengths in The Charter Challenge for Fair Voting and the Affidavit of Antony Hodgson."

Another way to learn more detail is to visit the Evidence page of the Canadian Charter Challenge for Fair Voting at this link. Then download the PDF of the Fair Voting BC affadavit.








  1. I am not a mathematician, that is certain, but I am trying to comprehend this Gallagher Index. My one question after first reading the explanation is, "What would have been the end result in regards to the final number of seats in the last Canadian election if this Index method had been in place"? I think it would be easier for someone like myself to grasp the ultimate consequences of implementing such a system if I knew the answer to that. Thank you.

    1. The Gallagher Index is not itself an election system, it is one way to measure the fairness of an election. If a "Proportional Representation" voting system had been in place in 2015, each party would have had seats in close proportion to its share of the vote. For example, the Liberals with 39.47% of the vote would have had closer to 133 seats instead of the 184 which they obtained. (Of course, it goes without saying that if a different voting system had been in place, then the vote percentages might have changed too.)

  2. To put things in perspective: Generally, countries with a long-term average Gallagher Index under 9.0 have what is described as Proportional Representation. Countries without PR usually have a Gallagher Index over 9.0. Therefore, a Gallagher Index is usually a good measure of whether a country gives voters representation (seats in a legislature) in reasonable proportion to how they voted. (There are a few exceptions. For example the Gallagher Index for the whole United States House of Representatives is misleadingly low as a result of the Primary election process that precedes the main election. However, Byron Weber Becker's improved "composite Gallagher Index" mentioned above would show a much higher Index value, demonstrating the inherent dis-proportionality of these U.S. elections within each State, caused by their First-Past-The-Post voting system.)

  3. Someone should do this for all elections. I got the data for some elections, but it's not easy to calculate this stuff in Tableau. I think I will have to do it in Excel.

    1. As you know, Michael Gallagher's Excel file, which includes the formula for calculating the Gallagher Index, is at
      This can be used in Excel or any clone of Excel such as the free open source LibreOffice since it doesn't require modules.
      If you calculate Byron Weber Becker's "composite Gallagher Index" for historical Canadian elections and other countries, that would be interesting to post online. I haven't found any such records online except Becker's values for the 2015 election. You might want to write him to ask if he's prepared or published such historical values.

    2. That's a complicated Excel file. Also, it has to be online and easy to use.

      This is for Canada I think:

      Basically I don't know what any of this is. I just followed a link on Wikipedia and liked the main idea, but I haven't read anything about it yet. I just don't understand math so I had to find a simple explanation for it.

      The reason I'm interested in it is because I made some election charts and made a voter vs. seats comparison chart that you can see here:!/vizhome/UnitedKingdomgeneralelections/Votesvs_seats-percentage

      So I have all that kind of data from Wikipedia. But could use some easy way to get that number. Still, for a single election it's easy or for one election at a time. Just paste in the numbers in such a spreadsheet and it will calculate the number. You can use either percentage numbers or vote numbers. Doesn't matter, it will calculate it automatically. I'm just testing it out here it's not complete:

  4. Well, it would be nice to have Becker's 'composite Gallagher Index' for the UK based on the four nations, even though these do not have a legal constraint on the number of seats in each such as the Canadian provinces have. The UK is divided into 650 constituencies, with 533 in England, 40 in Wales, 59 in Scotland, and 18 in Northern Ireland. With England having such a predominance (82% of the seats), likely the composite index would be very close to the regular index.

    For your purposes though, instead of your graphs of seats and votes since 1832 I would encourage you to calculate and graph the number of votes needed to elect one MP, for each party separately. This more dramatically shows the inherent unfairness of FPTP to voters.