Monthly Archives: June 2016

El sistema de reparto D’Hondt es justo

“El sistema de reparto D’Hondt es justo”

Un clásico de los análisis tras unas elecciones es criticar el sistema de reparto o “ley” D’Hondt (1), y sin embargo, ésta fue la conclusión, contraria a la crítica general, a la que llegaba un amigo después de que hace un par de semanas pasamos un rato haciendo los números y comparando cómo era la distribución de escaños mediante dicho sistema de reparto y un reparto proporcional. (2)

Para ello, cogimos el ejemplo de la circunscripción de la provincia de Sevilla en las elecciones generales de 2011 (3). Sevilla, entonces y a día de hoy, elige 12 diputados. En 2011 y con el sistema de reparto D’Hondt los resultados fueron los siguientes:

  • PSOE: 6 escaños.
  • PP: 5 escaños.
  • IU: 1 escaño.

Para repartir escaños según el sistema D’Hondt se dividen los votos de cada uno de los partidos, que haya superado el mínimo establecido (3% por circunscripción), entre los números enteros 1, 2, 3… y se van adjudicando escaños a los cocientes mayores. En el caso de Sevilla en 2011, el último escaño asignado fue el sexto al PSOE, para un cociente de 73.610 votos. Todo ello se puede ver en la tabla de debajo.

Para llegar a lo que sería un reparto proporcional habría que dividir el número total de votos válidos entre el número de escaños (12 en el caso de Sevilla) y se obtiene el ratio “Votos / escaño”. Después, habría que dividir el número de votos de cada partido entre dicho ratio “Votos / escaño”. Del resultado, se separa del cociente la parte entera de la parte decimal (resto). Los enteros se traducen en escaños directamente, mientras que los escaños pendientes se adjudicarían a los restos superiores. En este caso irían a PP y a UPyD.

Es ese escaño que se adjudica a UPyD, en vez de al PSOE (que sería el sexto que tiene según el sistema D’Hondt), el que hace que se diga que el sistema D’Hondt perjudica a los partidos pequeños, que favorece mayorías, que no es proporcional o que es “injusto”. Mientras que las tres primeras afirmaciones son factuales, la cuarta (“es injusto”) es un juicio de valor. Para valorar este juicio se puede hacer otro pequeño ejercicio, consistente en calcular los ratios de votos obtenidos entre escaños adjudicados por un sistema u otro.

Haciendo dicho cálculo se obtiene que el ratio para el PSOE con los 6 escaños obtenidos según el sistema D’Hondt (73.610) es superior al que hubiese obtenido UPyD de haber obtenido un escaño según un sistema proporcional (58.415). Por tanto, un observador imparcial podría llegar a la conclusión de que, de hecho, el sistema D’Hondt es justo.

DHondt vs proporcional

(1) En círculos donde la gente ha hecho o leído análisis más profundos, se apunta a la división en circunscripciones y los diputados asignados a cada una de ellas.

(2) En la página web de la Wikipedia que explica el sistema D’Hondt también se ofrece una comparación entre dicho sistema y el sistema de reparto proporcional o método del resto mayor.

(3) Este ejemplo permite valorar los sistemas de reparto sin el calor de la actualidad. Invito al lector a coger cualquier otra provincia, los resultados de las elecciones del 26J de 2016 y repetir el ejercicio. Los resultados de Sevilla se pueden ver en este enlace de la web del Ministerio del Interior.

Leave a comment

Filed under Miscellanea

Mi pronóstico de las elecciones generales de España del 26J 2016

De nuevo, con la ocasión de las elecciones generales en España el próximo domingo 26 de junio, quería aprovechar para hacer un pronóstico de las mismas como ejercicio de aprendizaje (1) y para ver si el acierto que tuve con las del 20 de diciembre (2) fue flor de un día.

La metodología es simple: me he construido una pequeña base de datos con los porcentajes de voto por partido y provincia a partir de los resultados de las últimas 2 elecciones generales (2015 y 2011) y de las últimas 2 elecciones autonómicas (2015, 2012-2011). Y, a partir de esos resultados, viendo las tendencias, he intentado pronosticar el porcentaje de voto de cada partido en cada provincia, lo que después, haciendo uso del sistema de reparto D’Hondt, proporciona los escaños.

Para hacer ese pronóstico me he basado principalmente en mi “gut feeling” y para pocas provincias he mirado a ver qué decían las encuestas (y en algunos de esos casos ha sido para reafirmarme en mis números contra los otros… veremos). Debo aclarar que el ejercicio no se trata de una encuesta (no he ido llamando a nadie), ni de una media de encuestas (3).

Generalmente, cuando una encuesta a nivel nacional nos dice “el PP va a conseguir un 29% y entre 118-125 escaños” nos da un resultado que se compone de la suma de muchas provincias, que no nos sirve para ver qué va a pasar en nuestra provincia en particular. El CIS, sin embargo, ofrece una encuesta con más de 17 mil encuestados, donde indica su estimación de reparto de escaños por provincias y de porcentajes de voto globales (4). Y esa visión, mucho más completa, es la misma que quiero replicar con mi pronóstico.

Como recordatorio: en España tenemos 52 circunscripciones (provincias más Ceuta y Melilla) que aportan desde 1 diputado (Ceuta y Melilla) a 36 (Madrid) (5). El total son 350 y la mayoría absoluta se consigue con 176 escaños.

Dicho esto, la tabla y la gráfica siguientes resumen todo el trabajo:

Como quedaría el arco parlamentario.

Cómo quedaría el arco parlamentario.

Pronóstico detallado.

Pronóstico detallado.

Esta vez quería dejar, acompañando el pronóstico en escaños de arriba, también la tabla origen con los porcentajes debajo (para los 4 grandes partidos). Esta tabla, en combinación con la de escaños, permite al lector ver cómo de cerca están uno u otro partido según el pronóstico, y qué porcentaje de voto más tendría que sacar un partido para obtener ese último escaño que se lleva otro. (6)

Porcentajes pronosticados por provincia.

Porcentajes pronosticados por provincia.

Una vez compartido el pronóstico, no voy a hacer ningún análisis del mismo, dado que puede estar muy o poco equivocado; mejor esperar a tener los resultados reales.

(1) Ya en 2011, tras las elecciones generales hice el ejercicio de repartir con distintos métodos (proporcional vs D’Hondt, circunscripciones provinciales vs única…) y el ejercicio me resultó útil.

(2) Ver aquí un análisis de lo acertado de mi pronóstico para el 20D de 2015 con los resultados finales.

(3) Ver por ejemplo los que hace Kiko Llaneras aquí.

(4) Ver más abajo las tablas del CIS. La fuente aquí.

(5) En estas elecciones León pierde un escaño en favor de Valencia.

(6) Esta tabla puede tener muchos errores parciales (pequeñas desviaciones del porcentaje del resultado) sin que ello necesariamente haga que el pronóstico de escaños sea incorrecto.

CIS 26J tabla escanos

CIS 26J tabla resumen

1 Comment

Filed under Miscellanea

Forecasting France Euro 2016

I have a work colleague who not only is a tremendous negotiator and aircraft seller but also has a great sense of humor and manages in his free time late in the night to set up a contest for office staff to try to guess winners, matches’ scores, top scorers, etc., of major international soccer competitions. The France Euro 2016 which starts this afternoon could not be missed. Nacho managed to set up the contest in time.

In this post I am going to explain how I went about forecasting the results of the UEFA Euro 2016.

“when in doubt, build a model”, Nate Silver.

The readers of this blog may already know how much I do like to build models to produce forecasts, guesstimates, etc. In relation to forecasting this UEFA Euro 2016 there is some background that has shaped my mind in relation to the subject in the recent years, let me give you some hints:

Having shared this background, you may understand that I tried to remove all the beauty of guessing and my football knowledge out of the forecasting process (1).

I rather made use of:

  • ESPN Soccer Power Index (SPI) ranking, introduced by the economist Nate Silver. I used its offensive and defensive scores plus weight for each of the scores based on a tip indicating that in competitive matches the defensive factor tends to be slightly more important (see “A Guide to ESPN’s SPI rankings”) (2).
  • The frequency of different scores in the group phases of the Euro 2012 and the World Cup 2010, the in the round of 16, quarter finals and semi-finals.

Frenquency

  • A few simple rules about how to allocate results given the difference between SPI ratings of the two nations playing each match. (3)
  • The total number of goals during group phases the latest Euro and World Cup. In order to cross check that the total numbers of goals that my forecast yielded was in check with previous competitions.

It may sound very complex. It is not. It requires a bit of reading (which most of it I did years ago), retrieving the latest ratings, giving it a bit of thought to set up the model and then, not even looking at the names of the teams, you go about allocating the scores based on raw figures. Let’s see how my forecast fares this time! (4)

Porra Euro 2016

Les grandes personnes aiment les chiffres” (5), the Little Prince.

(1) In fact I have not watched a single national team football match from any country since the World Cup in Brazil in 2014.

(2) See here the blog post I published yesterday in which I made a more thorough review of the ESPN SPI index.

(3) I set up rules like “if the difference of the combination of indices of the two nations is below this threshold, I take it as a draw, if it is between x and y as victory by 1 goal, if higher…”, etc.

(4) This way of forecasting allowed me to finish 4th out of 47 in 2010, 15th out of 87 in 2014. As it removes biases it allows to be better than the average, though it prevents you of guessing outliers, gut feelings, etc.

(5)”Adults love figures”.

Note: In the blog post from yesterday I mentioned that the latest complete ranking from the ESPN SPI index that I could retrieve dated from October 2015. That is the one I have used, therefore, Germany results as winner. Of the latest ranking, covering the Top 25 nations, only 13 countries of the 24 competing at the Euro 2016 are included. I could have set up an hybrid ranking taking the latest rankings and ratings for the top 13 from June and using the October figures for the lower 11 teams. I decided to go on with a single set of data. If I had done so, the maing changes would have come from the semifinals onwards. France would have appeared as winner instead of Germany. We’ll see if that was a good decision.

Leave a comment

Filed under Sports

France Euro 2016: “group of death”?

Tomorrow will start the UEFA Euro 2016. Fans all over Europe start getting excited by it. This year’s competition is played in France, with some matches taking place in Toulouse, one of them Spain – Czech Republic, which some friends and I will be able to watch live!

This post is intended to be a quick one to discuss, as I did for the 2014 World Cup in Brazil, which groups are the most difficult ones, the so-called “group of death“. Media all over Europe states that it is group E, with Belgium, Ireland, Italy and Sweden the one which is the toughest. To discover which is effectively such group I’ll focus on a couple of rankings: FIFA’s and ESPN’s Soccer Power Index, as I did in 2014.

Teams Euro 2016

FIFA world ranking.

In its website, FIFA explains the procedure which it uses to compute the ranking, which is based on the following formula:

M x I x T x C = P

M: winning, drawing or losing a match

I: importance of the match

T: strength of opposing team

C: confederation strength weights

P: points for a game

According to that formula, the latest ranking (June 2nd), filtered for European teams, has the following teams at its top:

FIFA ranking

With the information of both the ranking and the points I went to check which of the groups of the Euro 2016 were the strongest, both taking a look at the overall group and looking from the perspective of the “favourite” team (the one with the highest ranking), which was the one facing a toughest group (total points of the other 3 teams composing the group). See the results below:

Group of death - FIFA ranking

As you can see the most difficult groups in terms of total points are:

  • C (Germany, Northern Ireland, Poland, Ukraine) with 3,897.
  • F (Austria, Hungary, Island, Portugal) with 3,895.
  • E (Belgium, Ireland, Italy, Sweden) with 3,869.

Looking at the average ranking, the most difficult groups are:

  • F (Austria, Hungary, Island, Portugal) with 18.
  • C (Germany, Northern Ireland, Poland, Ukraine) with 18,75.
  • D (Croatia, Spain, Czech Republic, Turkey) with 20,25.

And excluding the points of the favorite team in each group, which is the favorite facing the toughest group?

  • Portugal in group F, facing 2,714.
  • Germany in group C, facing 2,587.
  • Spain in group D, facing 2,576.

Then, combining the 3 approaches, to me, it becomes clear that the toughest group is F, with Austria, Hungary, Island and Portugal, by the total amount of points (2nd), ranking of the teams (1st) and in relation to what Portugal will face (1st).

The second most difficult group would be C, with Germany, Northern Ireland, Poland and Ukraine, by the total amount of points (1st), ranking of the teams (2nd) and in relation to what Germany will face (2nd).

You can see that, using FIFA ranking, and despite of conventional “wisdom” (press), group E would be nothing but the 3rd or 4th most difficult group, i.e. an average group out of 6.

ESPN Soccer Power Index (SPI) ranking.

ESPN Soccer Power Index (SPI) ranking was introduced by the economist Nate Silver of worldly fame, who many readers will know from his forecasts on elections in the USA (check his blog FiveThirtyEight).

In a post from 2009, when the SPI was introduced, just before the 2010 World Cup, he explained how the index was computed (“A Guide to ESPN’s SPI rankings”). As he explained, the process had 4 main steps:

  • Calculate competitiveness coefficients for all games in database.
  • Derive match-based ratings for all international and club teams.
  • Derive player-based ratings for all games in which detailed data is available.
  • Combine team and player data into a composite rating based on current rosters; use to predict future results.

The main difference in relation to FIFA ranking algorithm is that it takes player-based ratings for those players who play in clubs in the Big Four leagues (England, Spain, Italy, Germany) and the UEFA Champions’ League. The player-based rating is merged into the national team coefficient. The player-based rating weighs heavily in national teams with many players playing in the main leagues (e.g. England or Spain national teams) and less heavily in other nations which roster is composed of many players not playing in clubs of the 4 main leagues (e.g. Russia).

Other details of the ESPN’s approach are similar to those used by FIFA: e.g. giving weights to results depending on the opponent, measuring the competitiveness of the match, the different confederations, etc.

ESPN provides a daily update of its ranking, however it includes only the top 25 world-wide teams, out of which 15 are European and only 13 represented in the UEFA Euro 2016, that is about half of those 24 competing.

ESPN - daily rating June 08

In order to review which one would be the group of death using the ESPN SPI I took the latest available complete ranking I could find, dating from October 2015, which is half a year away, but reflected the situation at about the end of the qualifying phase for the Euro 2016. See the ranking below:

ESPN SPI Oct 2015

As I did with the FIFA ranking above, with the information of both the ranking and the ESPN SPI ratings I went to check which ones of the groups of the Euro 2016 were the strongest, both taking a look at the overall group and looking from the perspective of the “favourite” team (the one with the highest ranking), which was the one facing a toughest group (total ratings of the other 3 teams composing the group). See the results below:

Group of death - ESPN SPI ranking

As you can see the most difficult groups in terms of total ratings are:

  • D (Croatia, Spain, Czech Republic, Turkey) with 309.
  • B (Slovakia, Wales, England, Russia) with 307.
  • C and E with 303.

Looking at the average ranking, the most difficult groups are:

  • B (Slovakia, Wales, England, Russia) with 24.
  • D (Croatia, Spain, Czech Republic, Turkey) with 24.5.
  • E (Belgium, Ireland, Italy, Sweden) with 28.

And excluding the points of the favorite team in each group, which is the favorite facing the toughest group?

  • England in group B, facing 224.
  • Spain in group D, facing 223.
  • Belgium in group E, facing 219.

Then, combining the 3 approaches, to me, it becomes clear that the toughest group is B, with Slovakia, Wales, England and Russia, by the total amount of points (2nd), ranking of the teams (1st) and in relation to what England will face (1st).

The second most difficult group would be D, with Croatia, Spain, Czech Republic and Turkey, by the total amount of points (1st), ranking of the teams (2nd) and in relation to what Spain will face (2nd).

You can see that, using ESPN SPI ranking (from October), and despite of conventional “wisdom” (press), group E would be nothing but the 3rd most difficult group.

Some readers may be tempted to think that I arrived at this result because I used a ranking from half a year ago, that if we were to take the latest ratings (if fully available) group E would emerge as the toughest one… not so. See the preliminary table using the information available for those 12 teams:

Group of death - ESPN SPI ranking - June 2016

There you can see that with the latest ratings the most competitive group would be either D or C, very much like with FIFA rating (from June as well).

It is interesting to note how by using FIFA or ESPN SPI the weight given to the group F (Portugal) is completely different.

Finally, in both ratings the big absence in the tournament is the Netherlands, arguably about the 10-14th team in the world, the 6th in Europe. A pity for the competition.

1 Comment

Filed under Sports

Around the world in 80 days

VerneSome months ago, I purchased several books in French language in order to practice it. Among them I included a couple of Jules Verne, one of them being “Le Tour du monde en 80 jours” (“Around the world in 80 days“), published in 1873.

I was more or less acquainted with the story due to having watched back when I was a child in the 80s the animated TV series “Around the World with Willy Fog“, a Spanish and Japanese production in which the characters were played by animals (a lion, a dog, a cat, a mouse, a fox…). I loved that series. On the contrary, I don’t recall having ever watched the movies from 1956 or 2004, therefore when reading the book vivid images from the animated characters came continuously to my mind.

The plot of the story is rather simple: Willeas Fog, a character about whom not much is known, bets with his colleagues of the Reform Club in London that he is able to travel around the world in 80 days, and so he does embark himself in such endeavor with his assistant, Passepartout (“Rigodon” in the TV series).

A the same time,  there is an ongoing investigation of a robbery of the Bank of England which makes a police investigator, Fix (Dix in the TV series), to follow Fog all along the trip (as he is considered a suspect), waiting for an authorization coming from England to arrest him before he evades justice. The reader is conflicted by the suspicion laid upon Fog, as all the acts of the character in the story describe an orderly, honest, compassionate person; even if not much is known about him, his profession, origins or his past.

Several stories occur to the trio along the way that takes them to Paris, Egypt, India, Hong Kong, Japan and United States and these help to get to know a bit those different countries and its traditions. As the book draws to a close, the tension is increased…

… and there I leave my review in order to not spoil the book for future readers.

I marked a couple of passages which I liked (in French)…

L’imprévu n’existe pas”, Willeas Fog.

Les passeports ne servent jamais qu’à gêner les honnêtes et à favoriser la fuite des coquines”, agent Fix.

“Quant à voir la ville, il n’y pensait même pas, étant de cette race d’Anglais qui font visiter par leur domestique les pays qu’ils traversent”.

“- […] Vous avez garde l’heure de Londres, qui retarde de deux heures environ sur Suez. Il faut avoir soin de remettre votre montre au midi de chaque pays (Fix).

– Moi ! toucher à ma montre ! jamais ! (Passepartout)

-Eh bien, elle ne sera plus d’accord avec le soleil.

Tant pis pour le soleil, monsieur ! C’est lui qui aura tort !

“Il ne voyageait pas, il décrivait un circonférence”.

“- […] Mais vous êtes un homme de cœur ! (sir Francis Cromarty).

– Quelquefois, quand j’ai le temps” (Fog).

I recommend the book as I very much enjoyed the about 10 hours that took me to read it. And I could not finish this review without sharing a video of one of the chapters of that TV series of my childhood (in Spanish):

 

1 Comment

Filed under Books

Museu do Futebol (São Paulo)

Referring to the different waves and streaks that football teams experience, the Argentinean Jorge Valdano made popular the sentence “A team is just a mood (1).

The Football Museum (Museu do Futebol) at the Sao Paulo‘s municipal Pacaembu stadium is an invitation to go through those moods, re-live some of those past moments anchored in the collective memory, by way of recorded sounds, cheering chants, radio excerpts of goals narrations, videos and interviews about the most important goals of Brazil history.

el-maracanazoYet, in my opinion, the most impacting mood, very well caught in the museum, is the transition from euphoria to depression, from music to complete silence, the tragedy of the losing the last match of 1950 World Cup between Brazil and Uruguay. A match that Brazil just needed to draw, started winning, yet lost it. The Maracanazo. In just 90 seconds, in a dark room you get submerged into the happiness of the day that would see Brazil win the first of many World Cups at the newly built Maracanã and then how the mood at the stadium changed with the first goal of Uruguay, then the second and at the end the final whistle from the referee.

Nevertheless, no matter how impacting the Maracanazo was for Brazil and football history, and how well captured it is at the museum, it would be unfair not to mention that in the museum there are many other very positive and happy moods of Brazilian football captured very well, too. If I went to think of Brazil, I would first think of happiness, football, music, dance; and those are experiences that accompany you along the museum.

The museum itself is centered around Brazil’s national football team, the only one which has won 5 World Cups to date, the country which practically at any point in time has one of the best 2 or 3 players of the World, the country of Pelé, Garrincha , Roberto Carlos, Ronaldo, Zico, Romario, Tostao, Rivaldo, Rai, Djalma Santos, Didi, Pepe, Gerson, Carlos Alberto, Rivellino, Socrates, Cafu, Bebeto, Rivaldo, Ronaldinho, Neymar… you name them.

DSC_0323The visit starts with a room where some players are picked as the most important to Brazil’s history; some images and biography of each one of them is offered.

The following room is dedicated to the goals, the main ingredient of the game. The 30 most celebrated goals in Brazil’s history are recorded and narrated by the authors or journalists (in Portuguese, English or Spanish). Several interactive screens are available for visitors to go through the different goals. There are also some desks where to listen to radio narrations recorded at the time of some of those goals.

See some of them in the video below (2).

The following rooms are dedicated to recordings of the chants of all the main teams competing at the Brasileirao; to Charles Miller, the man who introduced football in Brazil; and to a collection of pictures the years in which football was introduced in Brazil, showing life in Brazil at the time.

DSC_0326The largest space is dedicated to the World Cups, all of them, not only the ones won by Brazil. Some context of the society, cultural movements and events going on at the time are shown, together with images of the Brazilian team competing at the championship, the winners, some charismatic players and vivid images of the competition. That is another room where to wander with time enough to be captivated by the evolution of football, the players and events of the times.

There is another space dedicated to the couple Pele and Garrincha: with them playing together in the field, Brazil never lost a match (out of some 40 joint appearances). Some personal objects, pictures and videos of their best tricks are shown.

The last rooms are dedicated to football rules, some statistics, women in football and the chance to try a penalty kick against a featured Julio Cesar, where your shot’s speed is measured (and then compared to a Roberto Carlos’ shot).

DSC_0336

(1) “Un equipo es un estado de ánimo”.

(2) The video is unrelated to the museum but contains some of the goals among those 30.

1 Comment

Filed under Sports, Travelling