Wednesday, September 16, 2015

Gambling and information equilibrium

Source: wikimedia commons.

I was asked by a commenter to come up with a good intuitive metaphor for information equilibrium -- something I've been trying to do for awhile now. What popped into my head was a simple dice game. Two six-sided dice are always in information equilibrium with each other as each roll reveals 2.6 bits. The utility maximization approach would require both dice to show the same roll (both roll a 2 or both roll a 4) and matching theory would be something like the numbers on them being close (one rolls a 4 and the other rolls a 3). See e.g. here.

The interesting thing about that metaphor is that the six sided dice don't have to have the same thing on them. One could be a backgammon doubling die or have 6 different colors on it. And that makes sense in economics -- you're not usually exchanging two things that have an exact mapping to each other (e.g. like bacon and money, analogous to colors and numbers on the two dice).

Source: wikimedia commons.

In thinking about that metaphor I realized there is an amazing real world example of an exact conversion of money into information. It's called casino gambling.

You plunk down some money on a number in roulette. The information in a spin of the wheel is log₂ 38 = 5.24 bits. Of course, the payout is based on 36 (neglecting the zero and double zero), so there is some non-ideal information transfer -- a difference of 0.08 bit per spin. So the information in the payout odds is approximately equal to the information revealed by the spin:

I(S) ≈ I(O)

Actually we have I(S) > I(O), but let's assume equality for now. The information equilibrium model then tells us that (in general equilibrium):

S ~ Oᵏ

where k is called the information transfer index. And the the price is

p ~ Oᵏ ⁻ ¹

So what does this mean? Well, we have to resort to empirical evidence to establish our parameters. For one thing, the quantity of payouts (supply) is equal to the quantity of spins (demand). So k = 1. That means the price is a constant:

p ~ O¹ ⁻ ¹ ~ O⁰ ~ constant

The relative odds are the same no matter how much money you put down -- you don't get better or worse odds for playing more than one game. There is no return or growth (actually there is a slow loss due to the non-ideal information transfer). At least in this case.

There are even some partial equilibrium results. For example, in order for the quantity of spins demanded to stay the same given an increase in the number of payouts per spin, the price (the exchange rate for spins to payouts) would have to fall. Basically, the casino would have to provide worse relative odds (lower price) in order to keep the same number spins with an increased number of payouts.

Imagine if the casino was offering two payouts for every spin at the old 36:1 odds? There's no way you'd have the same number of spins. But if the odds offered fell to 18:1, you'd get the same number of spins as before (two 18:1 payouts are equal to one 36:1 payout). Note that the relative odds of the spin (38:1) and the payout odds (18:1) are now 2:1 (the price p is now 1/2).

These are the basics of the information equilibrium model. The model lets you have some freedom in choosing k to fit the empirical data so you can end up with slightly more complicated relationships that the simple linear relationship at the roulette table.

But where the model really makes a difference is when we look at a huge number of roulette tables and a huge number of spins. That's because even if the odds are 38:1, you only win 1 out of every 38 times. You don't win every 38th time. The actual path of any particular player is going to show random fluctuations in total winnings. That is to say the relationships above hold on average with a large number of spins.

No specific player is required to exactly win 1/38th of the time and some may actually go broke even with 38:1 odds [1]. And some might get rich. There may be a person that exactly breaks even over time, but there doesn't have to be. There is no specific representative agent. The representative agent that breaks even is emergent.

These relationships also hold regardless of whether some players have "a system", or even if they don't know how to play the game. They hold for robots, Vulcans, babies, pirates and whatever other trochees are out there.

Basically, the information equilibrium picture is agnostic about the details of what actually happens. It cares about information content.

Footnotes:

[1] The fact that people have a finite supply of money means that people will tend to go broke and be unable to play, lowering the overall relative payout -- a factor that would contribute to non-ideal information transfer. Actually, everyone will eventually go broke in this example given a finite supply of money.


20 comments:

  1. I have understood one thing! But it only leads to the next barrier.

    Here is what I think I understood. "S" denotes one spin. I(S) denotes a real-valued quantity, which is the amount of information in a spin. As a computer programmer, I can understand instantly that the amount of information (measured in bits) in a spin is log_2(38), i.e., I could store the results of N spins in 5.248N bits using an arithmetic code, and can't do any better than that no matter what compression algorithm I use. Conversely, if I need to store 10.496 bits, there's no better way to do it than the results of two spins. So I am finally confident that I have unambiguously understood one thing that Jason has said. :-)

    Now what is "O". It denotes "payout odds", and there is "information" in the odds, and the information is close to the information of a spin. Already I am getting confused. The odds are just a well-known constant, like (expressed as a probability) 1/36. How many bits of information are there in the odds themselves? Here's where I go off the rails and would answer something stupid like, it depends on how precisely you need to represent them, like, if you want to store the odds (expressed as a probability) to the nearest 2^-10, you'll need 10 bits. But I see this is the wrong way to look at it --- you're not asking how many bits does it take to encode the actual odds if one assumes a priori that all possible odds (from 0 to 1) are equally likely. But what are you saying?

    My confusion does not stop there. Imagine an unfair coin. The coin comes up heads 1/38 of the time, tails 37/38. How much information is there in a coin flip? I fail to see how a coin flip produces more than one bit of information. I mean, there are only two possible outcomes, I can store any sequence of outcomes at one bit per outcome. (I can compress down quite a bit because most outcomes are tails, so maybe there's a lot less than one bit of information in a flip). Yet the odds of the game (where you can only bet heads) could still be 36:1. How many bits of information are there in the odds now? If I(ODDS) is still 5.170 bits of information, then I(ODDS) is much greater than I(UNFAIR_COIN). But why would a small change in the rules that doesn't seem to affect the game very much have such a big effect in the analysis?

    I'm sure I'm totally off track. I'd appreciate being set straight. I can see there's not much in it for you, except a little practice figuring out how to get your ideas through the head of a computer programmer who's making an honest (if pathetic) attempt to figure it out.

    -Ken

    ReplyDelete
    Replies
    1. FWIW, I'm going back through http://informationtransfereconomics.blogspot.com/2015/04/information-theory-and-economics-primer.html trying to think about it from the point of view of gambling games, where S -> O. I am imagining spinning a wheel over and over, and each spin represents a fluctuation (dS) that affects the odds slightly (dO), e.g., imagine that the odds are not set monopolistically by the casino but by a market of different people taking different sides of the bet. I'm imagining that after many spins, the odds are a pretty good reflection of the actual probability. At that point, the extra information in one more spin seems like about zero, but I already know that each spin contains 5.248 bits of information, so I realize I've just gone off the rails *again*. (Sigh).

      Delete
    2. Hi Ken,

      A couple of clarifications (and I think I have to go back and make a couple of edits)

      First: "S" denotes S spins. I(S) denotes a real-valued quantity, which is the amount of information in S spins.

      In any case I believe my post is not exactly correct, so it would make sense for you to be confused by it :)

      I can answer one thing: the information revealed by an unfair coin with 1/38 chance of heads would be:

      - (1/38) log₂ 1/38 - (37/38) log₂ 37/38 = 0.18 bit

      That is to say you could compress the head/tails series of the unfair coin quite a bit since it would be something like HHHHHHHHHHTHHHHHH = AH1T6H using hexidecimal.

      The actual formula for calculating the information in one spin is:

      - Σ (1/38) log₂ 1/38 = Σ (1/38) log₂ 38 = (38/38) log₂ 38 = log₂ 38

      Where the sum goes over each possibility.

      Regarding your second comment, you're right the payout odds are sort of set by the market. The game was invented to have a slight advantage to the casino, but there are two styles of roulette wheel with 0 only and 0 and 00. The latter is better for the casino -- but adding e.g. a 000 or other things would probably reduce demand for the roulette tables. There is information equilibrium keeping the payout odds approximately equal to the number of numbers on the roulette wheel.

      Delete
    3. Jason, thanks (again) for the response. I'll keep trying to digest this. To recap my understanding so far: "S" is an (integer) number of spins, and "I(S)" is the information in that number of spins. I'm working through your A-B curves, where (in a supply/demand interpretation) A is quantity demanded, B is quantity supplied; there, I'm a bit confused how A could ever differ from B, meaning they seem equal by definition rather than by equilibrium condition, but I'll keep working on it.

      Thanks,
      -Ken

      Delete
    4. Hi Ken,

      Only when k = 1 can A be directly interpreted as quantity demanded. If k ≠ 1, then we have the relationship

      p B = k A

      which means we should scale A by (k/p). However, this is a trivial scaling so WOLOG we can say that A is the quantity demanded.

      But yes, in information equilibrium, the quantity demanded (k/p) A is always equal to the quantity supplied B. When you have non-ideal information transfer, then we can interpret (k/p) A as quantity demanded that isn't necessarily fulfilled (because of market failure, not scarcity of supply).

      Delete
  2. Jason, do you think it's possible to adapt the information transfer concept to political science? With numbers of votes perhaps serving the role of the detector? I'd assume it'd nearly always be a case of:

    Iu < Iq

    And only very rarely equality, thus information equilibrium results wouldn't apply. Why would I think that? I don't really have a good reason. It's just my guess.

    ReplyDelete
    Replies
    1. My first take would be that it would predict elections to be 50-50 (maximum entropy) ... a pretty good first guess for US national elections:

      2012: 51 to 47
      2008: 53 to 46
      2004: 51 to 48
      2000: 48 to 48
      1996: 49 to 41 (54 to 46 two-way)
      1992: 43 to 38 (53 to 47 two-way)

      Elections that are landslides would be non-ideal information transfer ...

      Delete
  3. This should be fun a fun test case. In a highly competitive casino market like Vegas or Reno, the roulette tables are competing not just against other roulette tables but also against other forms of gambling especially slot machines. My current theory is that where there are clear substitutes information theory breaks down...but, average floor data is available by stakes and table vs slots etc from the state of Nevada. Care to try and explain the data?

    ReplyDelete
    Replies
    1. One of the reasons slots take up a lot of room at casinos is that they don't require labor (dealer, croupier, etc) and can have more plays per unit time. But I think slots are more regulated so traditional table games actually have a better house advantage. As Tyler Cowen says, solve for the equilibrium ...

      Delete
    2. Actually, in Nevada the casino edge on slots can legally be as high as 25 %, which is typically not binding, instead the strip has slots usually around 12%. The price of machines can range anywhere from $10 to $25k and some are only available for rent. On top of this the casino slot floor operator can choose to switch the machine between several different returns in the same theme, the player may be hard pressed to notice. Combined with the fact that most slots typically have a very short shelf life, I think the behavioral dynamics become very chaotic...good luck finding a walrasian equilibrium...

      Delete
    3. Nevada:

      All Slot Machines
      The Strip - 92.50%
      Downtown - 93.20%
      Boulder Strip - 94.39%
      N. Las Vegas - 93.68%

      http://www.americancasinoguide.com/slot-machine-payback-statistics.html

      But I stand corrected, only some traditional table games have better house advantages ...

      Delete
    4. uggh not sure why i said 12.5 i definitely meant to subtract the 2.5 % from 10 not add it mentally...but yeah these numbers agree with my sources:

      http://gaming.unlv.edu/reports/nv_slot_hold.pdf

      Delete
    5. video poker of course is sometimes winning for the player...

      i maintain it is a very interesting test of emergent representative models. There is a decent fit (for behavioral data) AR(1) to AR(2) for the more competitive markets (eg the strip) which works well with a classic supply side model, behavioral model or entropy model and it would be a hard test to figure out which is the best approach to explain the variation of holds. And a good model should be able to explain the income effects across denominations as well...

      Delete
    6. im fairly confident that it should be optimal to dither the casino floor whenever they stock up with many new games...

      Delete
  4. I agree that gambling is a good metaphor for what you are doing but I think that gambling on sport is a better metaphor than gambling on dice as it involves people trying to predict the behaviour of other people which is closer to what goes on in the economy.

    However, the information transfer in sport doesn’t feel like it’s about supply versus demand. Rather it is more about trying to anticipate the future. We now know with 100% certainty that Serena Williams did not win the calendar grand slam in tennis. However, before the US Open, and right up until she lost, the best we could do was to estimate the probability of her achieving her ambition. Intuitively, the information transfer loss represents the fact that we can’t be certain about the future. The best we can do is make an intelligent guess using probability.

    The same thing is true in the economy. Most businesses have to guess how many products they will be able to sell next month. Equally, most customers have to guess the future price and availability of any product they are considering buying. Supply only equals demand looking backwards after the uncertainty has been removed. Looking forward, we are all just making intelligent guesses.

    PS Tom mentioned politics. Political markets such as elections also have betting markets so they are similar to sports events e.g. Hilary Clinton is currently at 2.6 (decimal odds) on Betfair to win the presidency next year so the market thinks she has around a 38% chance.

    ReplyDelete
    Replies
    1. That's an interesting comment; it's made me think about many things, but I'll focus for now on the metaphor you're employing.

      First, my point was not to show the best metaphor for an economy, but rather how money and information theory are connected. The odds in fixed games are easier to calculate, so it's easier to show how information theory (tied up in probabilities) can determine a price.

      But given that, sports betting may be a great metaphor for the economy -- if you take betting on all sports combined. Each game could be likened to a transaction in a specific "industry" (type of game: football, hockey, golf). But guessing the macroeconomic outcome is like guessing the outcomes of many games in many different sports.

      You could imagine that the details required to be a good odds-maker for sports betting in every sport are rarely found in a single person. That is to say, on any given day you could imagine half of the games listed in your home town paper are wins for the home team and half are losses.

      Actually in my home town of Seattle there has been usually only one good team in national sports at a time. The Sonics were good at one time (before they were shipped off to Oklahoma), the Mariners at another time and the Seahawks more recently.

      As you look across more and more games in more and more sports, you will get a central limit theorem result; all of those theories about why the Seahawks will win/lose their next game because so-and-so is injured/not injured but that golfer has been on a hot streak will average out to the maximum entropy result.

      An outbreak of e.g. "hometown pride" where everyone bets on their home teams is a coordination that will cause more people to lose (and the sports books to win) ... a recession. In a recession, all those people who shorted stocks will win like the bookies ...

      Delete
  5. Yes, I agree that the odds in fixed games are easier to calculate, so maybe you are right to focus on games where the probabilities are easy to determine. Interestingly, though, real gamblers focus on games where the probabilities are more difficult to determine as these are the games which involve the most skill and the least luck.

    As you suggest, odds making in sports markets is difficult. However, some online gambling sites are now exchanges rather than traditional bookmakers.

    In a traditional bookmaker, an experienced odds compiler, who is an expert in a specific type of event, sets the odds and the public can bet at those odds.

    On a betting exchange, the exchange provides a market and the public puts up bets on both sides of the market. For example, you may bet on your home team and I may bet against your home team. The exchange matches our bets anonymously. Hence, it is the market which sets the odds rather than an odds maker. This is directly analogous to the stock market. The exchange then makes its money by taking a commission which is a percentage of all winning bets (sort of like an income tax). That creates a dynamic market which can involve trading during matches. You might bet on your home team to win, wait for them to score first (at which point the team’s odds will contract), and then bet against the same team. This can guarantee you a profit irrespective of the final result. This type of live trading gives rise to some interesting market phenomena.

    First, you can see the ‘random micro but sticky macro’ phenomenon which you have mentioned previously in other contexts. For example, you can view tennis at different levels from micro to macro:

    Point – game – set – match – tournament – season – all time.

    Even if Serena Williams is the best all-time female player she may only have a small advantage in each point. Also, she may lose any given point for any number of random reasons e.g. a lucky shot by her opponent, a bad bounce, a gust of wind, a bad line call. However, as you move towards a more macro level Serena’s advantage becomes more and more pronounced. By the time you get to the all-time level, Serena has 21 grand slam championships while the next best women amongst current players are Venus Williams at 7 and Maria Sharapova at 5 – a huge advantage.

    (continued below)

    ReplyDelete
  6. Second, you see a similar phenomenon between players in the betting markets themselves where a small skill advantage in one market leads to very wide disparities in outcomes over time. When the Betfair exchange was initially set up in the UK, Betfair thought of players in the market as lots of people randomly betting against each other (like your type of model). Over time, most people would win as often as they lost. As Betfair takes a percentage of each winning bet, this would mean that, as players traded their money back and forth many times, most of the money would end up in Betfair’s hands.

    However, what they found was that a few players ended up with most of the money and they, rather than Betfair, were the ones making most profit from the exchange. As a result, Betfair was forced to introduce a series of taxes on lifetime winnings called the Premium Charge (up to 60% of winnings above a lifetime limit of around £250,000) to discourage the big winners.

    Hence, this very simple betting exchange environment quickly generated its equivalent of the top 0.1% in the real economy as the outcome of thousands of markets in which the winners may have had only a small advantage over the losers in individual markets. As with the general economy, some of these winners profited from genuine skill advantages while others took advantage of loopholes. For example, in tennis some people started to bet from the courtside rather than from TV pictures. This meant they could profit hugely from the 5-10 second delay in TV pictures compared with live action.

    I think that this is a fascinating area. I am always surprised that economists do not appear to study sports markets. I don’t think that any participant in these markets would try to model the results using a representative agent. Some of the observed phenomena arise from what start out as relatively minor deviations from randomness.

    ReplyDelete
    Replies
    1. 8:30AM comment above was the second of two comments I posted around the same time. The first one seems to have disappeared.

      Delete

Comments are welcome. Please see the Moderation and comment policy.

Also, try to avoid the use of dollar signs as they interfere with my setup of mathjax. I left it set up that way because I think this is funny for an economics blog. You can use € or £ instead.

Note: Only a member of this blog may post a comment.