# From betting to “prediction market”

This is the second part of a series on sports betting

Sports betting has long fascinated economists and statisticians. Griffith (1949) showed early on that horse race bettors put too much money on horses that have little chance of winning, and too little on those that have the best chance of winning. This tendency to underbid on the most likely event has been obaserved in all sports betting, where the “most likely event” is calculated on the basis of recent statistics. And it can be explained in a fundamental way by the mechanics of mutual betting: the bettor opposes his beliefs to those of the crowd, because the various bets will determine the odds.

## Predictions, before surveys

Today, in the months leading up to each election, we find ourselves drowned under the polls, conducted every day (and commented on several times a day, as if estimation noise was worth exegesis). As Frédéric Dabi (Deputy Director General of Ifop) pointed out in a debate organised by Risques magazine in 2017, “surveys are an indication of the electoral balance of power, not a prediction”, but it is nevertheless often in the idea of having a prediction that they are used.

But if we go back in time, Rhode & Strumpf (2008) reminds us that other techniques were used, before the idea of surveys became necessary, in particular betting. In 1549, Matteo Dandolo (Ambassador of Veneto) noted that “it is therefore more than clear that the traders are very well informed of the state of the election, and that the employees of the cardinals in conclave (i conclavisti) participate with them in betting, which therefore leads to several tens of thousands of crowns changing hands” as Baumgartner (2003) tells us. Closer to home, betting markets during the elections were popular in the United States until the Second World War. Rhode & Strumpf (2008) suggests several reasons for the loss of interest in the second half of the 20th century: improvements in sampling techniques… and the legalization of horse betting. But online betting sites have revived interest in betting, whatever it may be. Because the sites we mentioned in a previous article are often not limited to sports betting, but also allow betting on a magnitude earthquake, an Oscar winner, or even the observation of the Higgs boson, as proposed by intrade.com, which was liquidated in 2015. As onlinebettingsites.com shows, we could bet on the French elections in 2017, or on the referendum on Brexit (even if for the latter, the predictive markets were not able to reflect the beliefs of the crowds, as an article in The Economist recalls).

Mathématiques du pari-mutuel

The “pari-mutual” theory is not unlike the mutualisation of risks, an important foundation of the insurance mechanism, dear to actuaries. Working in the horse betting markets, Edmund Eisenberg and David Gale obtained, in a short three-page article, Consensus of Subjective Probabilities, relatively general results, as long as the bet is static.

Supposons que I joueurs puissent parier sur J chevaux. Chaque joueur possède une somme totale bi, que l’on normalisera de telle sorte que bi désigne la part de la somme totale misée (et donc b1 +…+ bI =1). Le joueur i peut alors miser la somme bi,j sur le cheval j (avec ici bi,1+…+bi,J = bi). Lorsque les paris sont clôturés, on note pj le montant parié sur le cheval j, autrement dit b1,j+…+bI,j = pj). La contrainte de budget impose que la somme de ces montants soit égale a 1, ce qui donne aux pj une interprétation probabiliste. Nous reviendrons sur l’utilisation de ces « prix » par la suite. On peut aussi noter qj la cote de gain (payoff-odds) définie comme pj-1-1, de telle sorte que pj=(1+ qj) -1. Si on suppose qu’une portion 1-a est gardée par le bookmaker, alors pj= a(1+ qj) -1 et qj =( a -pj)/ pj. Les rendements espérés sur chacun des chevaux doivent être égaux, à l’équilibre, au rendement net attendu, où l’espérance est calculée sous la probabilité p, de manière à refléter les croyances de tous les parieur, soit ici

pjqj+ (1-pj)(-1)= a-1

The key result of the Eisenberg & Gale model is to show that there is a balance in this market. More precisely, the fraction bet on each horse must be equal to the probability of the horse market. To achieve this balance, it is often assumed that the equilibrium ratings are found by an auctioneer (this role will be played by the bookmaker). As Blough (2008) noted, the hypothesis that no wagering is made until the odds are balanced is a hypothesis that is indeed true in horse racing.

If we assume that each bettor is risk neutral (and seeks to maximize his expectation of winning) and that his beliefs are materialized by a probability vectors pi=(pi1,…,piJ) – in the sense that player i thinks that horse j will win with a probability pij – then at equilibrium, if bi,j >0,

pij=pj max{pis/ps}

where argmax{pis/ps}= argmax{pis(qs+1)}

s the horse on which bettor i must bet everything if he bets on a single horse. Blough (2008) elaborates at length on the description of this balance, and extends it to the case where agents potentially have risk aversion (but the same) and potentially different beliefs. This balance is then described as a consensus of belief.

In an article entitled Interpreting the Predictions of Prediction Markets, Charles Manski proposed using this theory to interpret these prices, in conjunction with more traditional approaches in economics, such as Arrow-Debreu prices.

To illustrate this consensus, let us consider a world cup final that should lead either to the victory of A or the victory of B. Let us imagine a contract offering $1 if A wins, and let this contract be offered at price pA. Si on n’autorise pas d’arbitrage, on a une loi du prix unique, et on en déduit que pB = 1-pA. Imaginons un joueur qui pense que la probabilité que A gagne est supérieure à pA, soit, avec les notations précédentes, piA > pA. Dans ce cas, le joueur a intérêt à parier tout son agent sur la victoire de A, c’est-à-dire acheter ce contrat. La demande agrégée pour ce titre sera alors [b1P[p1A > pA]+…+ bI P[pIA > pA]] / pA et on aura un équilibre si la demande agrégée pour les deux titres vérifie [b1P[p1A > pA]+…+ bI P[pIA > pA]] / pA = [b1P[p1A < pA]+…+ bI P[pIA < pA]] / pB de telle sorte que pA = b1P[p1A > pA]+…+ biP[piA > pA]] +…+ bIP[pIA > pA] which allows the prize to be written as an average of the players’ beliefs. It should be noted here that the balance is static, allowing the bookmaker to just set a rating. Recently, Agrawal et al (2014) proposed an algorithm to balance this market in continuous time. It may also be noted that this notion of equilibrium appears in many algorithms, such as in the so-called Fisher market. ## The predictive power of prices But this idea of seeing in the prices an aggregation of players’ beliefs is not new! In 1655, in Van Rekeningh in Spelen van Gelucken, (published in Latin under the title’De Ratiociniis in Aleæ Ludo’), Christiaan Huyghens proposed to extract information on beliefs from prices. In 1671, Wilhelmina de Witt noted that, as the price of a contract paying an annuity until death could be seen as a weighted average of annuities (with a fixed maturity), by observing the prices of the different insurance contracts, probabilities interpreted as probabilities of survival could be extracted. These probabilities are “subjective” as Bruno de Finetti or Frank Ramsey called them. The latter did not see probabilities from a frequentist angle, but saw it as a measure of the degree of belief, which could be measured through bets, in Truth and Probability (1926). This is finally what the theory presented by Kenneth Arrow in 1953, and further developed by Gérard Debreu in 1959, introducing the “Arrow-Debreu prices”, says. Many websites use odds to infer players’ beliefs, which are misrepresented as the probability that a team will win a competition. We can also note the work carried out last summer by doctoral students at the University of Rennes who had compared the odds on online betting sites, and the forecasts obtained by several algorithms (ranging from a naive Bayesian classifier to boosting, SVM or neural networks). A special issue of The Economist, published in 2007, entitled The Future of Futurology, noted that “the most heeded futurists these days are not individuals, but prediction markets, where the informed guesswork of many is consolidated into hard probability”. This idea has now largely returned to the forefront, as predicted in the article by Chen & Pennock (2010) published in AI Magazine. Agrawal, Shipra, Delage, Erick, Peters, Mark, Wang, Zizhuo & Ye, Yinyu (2014). A Unified Framework for Dynamic Prediction Market Design. Operations Research. Baron, Ken & Lange, Jeffrey (2006). Parimutuel Applications In Finance: New Markets for New Risks. Springer. Baumgartner, Frederic (2003) Behind locked doors: a history of papal elections. Palgrave. Blough, Stephen R. (2008) Differences of opinion at the racetrack. In Efficiency of Racetrack Betting Markets, 323-341, World Scientific. Chen, Yiling & Pennock, David (2010). Designing Markets for Prediction. AI Magazine. Decker, Wolfgang & Thuillier, Jean-Paul (2004). Le sport dans l’antiquité. Picard. Eisenberg, Edmund & Gale, David (1959). Consensus of Subjective Probabilities: The Pari-Mutuel Method. Annals of Mathematical Statistics, 30:1, 165-168. Griffith, RM (1949) Odds adjustments by American horse-race bettors. The American Journal of Psychology, 62, 290-294. Manski, Charles (2005) Interpreting the Predictions of Prediction Markets. NBER 10359. Rhode, Paul, W. & Strumpf, Koleman (2008) Historical Political Futures Markets: An International Perspective. NBER 14377. [1] Baron & Lange (2006) discusses the comparison between so-called “risk-neutral” valuation in finance (based on the law of single price and arbitrage), and that relating to mutual betting. They thus speak of “self-hedging” because, in a bet, the bettors share the winnings in proportion to their initial bet. This is reminiscent of the way mutual insurance companies operate, where the money used to compensate victims must correspond to the total premiums charged. # Big Data and Artificial Intelligence New week, I will be in France for a few days. On Monday and Tuesday, I will be in Beaune, in Burgundy, at the first “Rencontres Mutualistes” (I will upload the slides of my talk soon). And on Wednesday, I will be in Paris, at ESCP Europe Business School. I will be giving a two hour lecture on “Big Data and Artificial Intelligence”, to use some buzzwords, as asked. More honestly, it will be on (new) data and (new) algorithms for predictive modeling. Slides are now online. # Data Science for Actuaries, Regression Models with R After an introduction to Advanced R, we will discuss for the last part of our crash course visualization and graphs (from the previous set of slides), and I just uploaded additional slides on regression models (including some pdf version) # Predictive Modeling Tomorrow, around noon, I will be giving a talk on predictive modeling for actuaries. In the introduction, I will get back shortly on the idea that a prediction is usually a best estimate, in the sense of getting an expected value. And because $\mathbb{E}(X)=\underset{c\in\mathbb{R}}{\text{argmin}}\{\mathbb{E}\left([X-c]^2\right)\}=\underset{c\in\mathbb{R}}{\text{argmin}}\{\mathbb{E}\left(||X-c||_{L_2}\right)\}$ it is natural to use least square ideas. In order to illustrate all those concepts, we will use a simple dataset, with the sex, the height and the weight of a person, as well as declared weight. Davis=read.table( "http://socserv.socsci.mcmaster.ca/jfox/Books/Applied-Regression-2E/datasets/Davis.txt") Since there is a typo in this dataset, we have to invert to figures Davis[12,c(2,3)]=Davis[12,c(3,2)] but it’s not a big deal. The variable of interest, here, is someone’s weight attach(Davis) Y=weight*2.204622 (here in pounds). We will use explanatory variables such as the sex of that person, or his/her height X=Davis$height / 30.48

(in inches). So, we will start with the (standard) linear model, just to make sure that we all talk about the same thing.

The goal will be to use (possible) explanatory variable to improve our prediction. We will start with the standard linear model, but we will see that nonlinear models can also easily be obtained,

Non linearities will be discussed. But those models are Gaussian (as mentioned above). And homoscedastic. So we will see how generalized linear models can be used to model the mean and the variance, at the same time. For instance, with a Poisson regression (below), the variance will increase with the expected value.

After this general introduction, we will spend some time on 0-1 variables. We will see how to use a logistic regression, and also discuss more generally which kind of models can be used for classification. ROC curves will be presented, and explained.

Then, we will also see an alternative to the logistic model, namely classification trees and CART techniques

We will also discuss random forrests, bagging and boosting techniques