sábado, 3 de octubre de 2009

Olympics host election method

In the past October 2nd we witnessed the choice of Rio de Janeiro as the host of the forthcoming 2016 Olympic game, after defeating Chicago, Tokyo and Madrid. The loser cities were eliminated in that order in a poll system that deserves to be analysed.
In this system, the election is made in up to 3 stages until a city gets more than half of the votes (which is usually the last 1 on 1 round).

Among 94 valid votes in the first round, Chicago was the first to be out with only 18 votes. Madrid had the majority of the votes with 28, followed by Rio with 26 and Tokio with 22.
In the second round, the members of the COI representing the country of the losing city are entitled to vote, so there were two more voters.

The valid votes were 95 and the result was Rio 46 (+20), Madrid 29(+1) and Tokyo 20 (-2), the latter being eliminated. As we dont' know what happened with the invalid votes we cannot be sure of what exactly happened in this round, but it seems that all Chicago votes moved to Rio.

In the last round, with 98 valid votes Rio's candidature overwhelmed Madrid's by 66 to 32, again showing that almost all the votes of the losing city (Tokyo this time) moved to Rio.
The "political" reasons for this are already been argued in mass media across the world (at least in the candidate's countries), but we would like to have a further look on the election method.

For what we saw in this election Madrid was 'least preferred' among the 4 cities by roughly more than two thirds of the voters, and 'most preferred' among almost the other third. We can know that for the evolution of votes. In the first round, each voter chose its most prefered city. If that city passes that stage, it's supposed that he will keep that vote (not always true as seen in the real election, but mostly true). If the city is eliminated, he will vote in the next round for his second alternative. If that second alternative advances to the final, he will keep the vote, but if the city fails, the voter would chose its third option for the final.

When we have a situation like this, with a city (let's call it a cult city) with so many voters entirely against (4th preferred), but enough voters with total support, the election is condemned to have a final between the cult city and the survivor of the other two rounds. It could be argued that this is ok, as that city is the preferred among the three, but this resulted from an election where the voters of the cult city, not knowing the preference of the other voters, didn't express their opinion about the other three, because they were supporting their city.

Argentineans can remember a similar situation that arouse in the presidential elections of 2003, in which 4 candidates fought in the first round with almost equal votes (19%-24% each), but in the ballotage for defining between the two most voted candidates, the candidate who had obtained the majority of votes in the first round, had to give up and didn't even contended because polls were revealing that he wouldn't get no more votes than in the first round, giving his adversary more than 70% of votes.

Coming back to the Olympics election, an inmediate system that comes to our minds could be a negative or censorship method, in which voters choose which city wants to discard in each round. In the case of the last election, if this method was applied, Madrid would have been pulled out in the first round, and their unconditional voters would have helped to decide among the other three, with possibly a different outcome.

In the last election, it doesn't seem that the winner would have changed with the method, but at least, the final decision would be a much closer one. Let's play a little (not being rigorous with the figures) :

First round:
Madrid 66. We cannot know which were the preferences of the 33 voters for Madrid, and it was said that Madrid supported Rio as second chance, but let's asume 1/3 for each city.
Chicago 11, Tokyo 11 and Rio 11. Madrid is eliminated

Second round:
Now the game turns a more strategic one, and some voters could chose to eliminate not their least preferred, but also their second, as they fear that in an eventual final, this would be a stronger candidate. But let's keep that game theory out now, and assuming that voters don't have much information about the other voters, they will just vote for their least preferred.
In the election we saw that Chicago voters decided for Rio before Tokyo, so, all the 18 original Chicago votes would go to eliminate Tokyo. We don't know the preferences of Tokyo and Rio, so we will split their votes. (in parenthesis is the city that the voters chose in the first round of the real election)
Tokio gets: 11 (Madrid) + 18 (Chicago) + 13 (Rio) = 42
Chicago: 11 (Madrid) + 13 (Rio) + 11 (Tokio)= 35
Rio: 11 (Madrid) + 11 (Tokio) = 22
Tokyo is eliminated. (of course, taking into account the strategic view, normally Chicago would have tried to vote Rio, and Rio would have tried to get rid of Chicago)

Final Round:
We can now put things positive.
We have 22 votes for Chicago (those that already chose to kick out Rio) and 35 for Rio (those who voted to kick out Chicago). The remaining 42 votes are originated with voters that chose in the actual election Madrid, Chicago and Rio. We don't know about Madrid's people, so we assume again equal split.

Result:
Positive for chicago= 22 + 5 +18=45
Positive for Rio=35+5+13=53

Again, Rio wins, but it's a much closer election, and the preferences of more voters are represented.

This should be more deeply analysed, and of course it could be possible to find a different example of preferences of the voters in which the current method gives better results. This is because in each round, voters are asked to express only a piece of their preference order. The election could be sophisticated by asking each voter to initially express his full ordering and having a method to choose the city that """"""""" (multiple quotes) maximizes 'social' utility """"""

viernes, 14 de agosto de 2009

Grandes hombres de la historia y el VaR

Retomando el nombre del blog, vamos a darle un toque de librexpresión al siguiente post...

Hay una frase que me gusta mucho repetir que es "Vistanme despacio que tengo prisa". En mi cabeza me suena como dicha por Napoleón, Winston Churchill, y hasta Julio César... Realmente es probable que ninguno de ellos la haya dicho, pero yo creo que es casi una máxima...

Qué significa esta frase (al menos a mi entender)?, Que algo mal hecho por hacerse apurado puede generar retrasos mayores al ahorro generado por la velocidad... Siendo literales con la frase, si me visten rápido, puede que combine mal la ropa, y tenga que perder tiempo en volver a ponerme alguna prenda, por lo que mejor tomarse el tiempo de revisar bien qué corno de ropa se está eligiendo...

Creo que esto se aplica a mil cosas en la vida diaria, y también me ha pasado, y mucho en la vida profesional (no todo el mundo parece estar de acuerdo con la máxima, y eso suele generar roces...)

Volvamos un poco al título del Post... "Var"??? Qué tiene que ver esto con el VaR? Qué es el VaR???? Bueno, ese es un tema un poco (muuuuuuy?) freaky, que tiene que ver con mi trabajo...
VaR (y en general otras medidas "aR" -at risk-) significa conocer la máxima 'pérdida' (podría trasladarse a daño, desmejora, en general algo negativo) que voy a tener, con un cierto margen de probabilidad. De forma dual, podríamos decir que es la mínima ganancia, mejora, o en general cualquier cosa positiva -medible) con ese margen de probabilidad...

Supongamos que mañana se juega una lotería de dos dígitos, un número entre 00 y 99, y se me presentan dos apuestas...
La primera, me van a dar tantos cientos de $ como el número que salga (recibiré entre 0 y 9.900$). El promedio (o valor esperado) de esta apuesta es 4.950$.
La segunda apuesta consiste en 9.900$ si el número es mayor o igual que 50, y nada si el número es menor. Nuevamente el valor esperado de la apuesta es 4.950$

Por lo tanto, si me cobraran más de 4.950$ por entrar en la apuesta no jugaría, y si cobraran menos sí lo haría. Esto se cumple sólo si lo que miro es el valor 'medio', pero realmente las personas no eligen sólo mirando eso. Un cálculo que no hice (ni voy a hacer) es el 'desvío standard', que es una medida de la variabilidad que tiene un suceso aleatorio. La primer apuesta reporta una menor variabilidad, por lo que es razonable que sea preferida a la otra (aunque depende de cada uno).

Cómo aplica lo del VaR aquí? Supongamos que ese nivel de probabilidad fijado es 95%. El VaR al 95% sería entonces que tan mal estoy si se da un escenario que es peor que el 95% de los escenarios.
En la primera apuesta, ese escenario es que salga un 04 (desde 05 en adelante, es decir 95 escenarios me reportan más ganancia). En ese caso me darían 400$, y mi VaR sería el valor de la apuesta (supongamos que eran los 4.950$ menos los 400$= 4.450$

En cambio, en la 2da apuesta, aunque es un poco más feo para ver, podríamos decir que el escenario en cuestión es el mismo (aunque podríamos decir que es cualquiera de los comprendidos entre 00 y 49), que me reportan 0$, por lo que el VaR en este caso es 4.950$

Este tema del VaR que así contado parece tan tonto y sin mucho sentido, casi que justifica mi trabajo, asi que mucho cuidado eh!

Para cerrar la idea, puestas ambas ideas en común, la frase "Vistanme despacio que llevo prisa" está aplicando la teoría del VaR en toda su magnitud. No le preocupa tanto tardar 5 o 6 minutos, pero sí le preocupa no tardar más de 10 (que la reina espera!).

Por lo tanto, pueden andar diciendo por el mundo, sin temor a quedar como un ridículo, que Napoleón, Winston Churchill o Julio César, eran grandes conocedores de la teoría del VaR (y de las colas pesadas).

Sólo resta decirles que se tomen un tiempo para pensarlo, y creo que entonces comprenderan la importancia de esta frase, y lo útil que puede ser recordarla.

Atte.
Juanes

domingo, 9 de agosto de 2009

Subasta

Casi dos años después, el rincón vuelve a proponer una ñoñada para comentar...

Estaba recién boludeando en fbook y apareció un sospechoso aviso "PS3 80GB por 25 eur". Automáticamente se encendió la alerta... Qué habrá detrás de este irrisorio precio???
Obviamente hice click, y me topé con el resultado de una subasta vencida hace 7 meses, efectivamente a 25eur... Ah, ok, ahora 'entiendo', que suerte tienen algunos! Peeeero, al mismo tiempo, en otra parte de la página me anunciaba una subasta en curso por apenas unos centavos más que cerraba en 45 mins (de hecho mientras escribo esto sigue en curso)... Nuevamente la alerta se activa y empiezo a indagar un poco más (es decir, googlear swoopo, el sitio web de las subastas.

Efectivamente no era el único que sospechaba que algo raro... Primero me enteré de un detalle que había pasado por alto en la propia página, que es que por cada 'bid' o puja hay que pagar (50c!). Y no son pocos los que piensan/dicen/aseguran que detrás de esto hay 'bots' o apostadores automáticos que lo que hacen sencillamente es quedarse 'tranquilos' mientras no haya personas apostando, para mantener precios irrisoriamente bajos, y cuando alguien suba, vencer a esa puja (cada puja incrementa 20 segs el tiempo de cierre de la subasta).

Entonces dos cosas, el sistema ya tiene algo de perverso, y encima se vuelve fraudulento con el tema de los bots...

Ahora, este no es un blog de denuncia, es un blog freaky! Lo que quiero que veamos entonces es el análisis económico de esta modalidad de apuesta, suponiendo que no hay bots, de hecho pensar que podría pasar en una subasta en Sotheby's por un cuadro de Picasso (el precio de puja sería un poco más alto de todas formas) [Nota: ahora que lo pienso, en Sotheby's también puede haber 'bots', o sea personas que se encargan de que el precio de venta no sea bajo, pero yo calculo/estimo que estará medianamente auditado el tema, y tendrán que hacer facturas y esas cosas...]

No es menor conocer la relación entre el precio de puja y el precio 'final' estimado del producto. De hecho también el análisis es distinto para un sitio de apuestas en el que un montón de tirados como yo buscan sacarse regalada una PS3, y una subasta por un cuadro famoso...

Pensemos en el caso de la PS3. Un PVP (precio venta al publico) puede estar rondando los 150/200. Las subastas que vi rondan los 20 eur, y cada puja incrementa el valor en 0,2 cents. Por lo que si el valor del producto inició en 0, estamos hablando de 1000 pujas! A 0,5 cents la puja, ya tienen 500 euros de ingreso, con lo que pagan 3 PS3... Obviamente yo creo que el 90/95 de los bids fueron de bots (también tenían esta otra función!).
El hecho de que uno no pueda hacer una puja por un importe arbitrario es otro factor determinante. Así uno alejaría potenciales 'molestos' de carne y hueso que en valores bajos pujarían, pero que no están dispuestos a pagar un imprte que yo sí.
Otro tema es que una vez que uno entró en la puja, va a querer llevarse el producto para no sentir que pagó por nada!

A alguien se le ocurre un modelito micro para esto?
supongamos que hay dos personas que van a pujar por un bien X cuyo precio de mercado (precio al que podrían acceder ambos sin pujar) es Px. Supongamos aparte que las dos personas no se conocen ni pueden hablar, porque sino facilmente harían colusión comprando un bien al mercado y dejando que uno de los dos gane la subasta al valor minimo, y luego se repartirían el bien y el dinero...

En primer lugar, si ambos jugadores estarían dispuestos a pagar X por el bien, entrarían en la subasta? Si un jugador está dispuesto a pagar Px+k por el bien, podría entrar en la subasta hasta pagar k, y si no lo consigue, salirse y comprarlo en el mercado.
Entonces si uno está dispuesto a pagar Px+k y el otro Px+k', quien tenga el k más pequeño, saldrá al mercado y pagará Px+k, mientras que el otro pagará k+preciosubasta.

Siguiendo esta línea podría complejizarse un poco definiendo Pb precio del bid (puja), y el incremento en el precio que se da con cada puja (Ip).

Pero antes de esto, es valido el enfoque? Qué alguien esté dispuesto a pagar hasta X+k, no quiere decir que le sea indiferente pagar X sin jugar a pagar X+k habiendo jugado. Suponiendo que el individuo no obtiene utilidad de jugar en la apuesta (sabemos que en muuuchos casos esto sería falso :) ), digamos que inicialmente la subasta se presenta ante el individuo como un experimento estocástico, del cual suponemos tiene poca información.

Bueno, no sé muchas ideas sueltas pero nada en concreto... Algún ecoñoño que tenga ganas de aportar algo???