How poker machines vacuum up your money

Poker machines are unique in the gambling world. They are the only form of gambling that has been designed and crafted for the purpose of making money, and where there is absolutely no chance of influencing the outcome.

Tom Cummings, Poker machine maths, 27 May 2011

The article, linked above, on poker machines is an excellent insight into the mathematics of poker machine gaming and how, despite a guaranteed return-to-player percentage which is high, a punter that plays long enough ends up with nothing. The vital point that Tom Cummings makes is this:

It’s common knowledge that poker machines have a return-to-player percentage of anywhere between 85 per cent and 90 per cent, depending on where you live and what kind of establishment you’re playing in. For the sake of the story, let’s assume that Gladys’ poker machine was set to 90 per cent. That means that over a long period of time, the machine will return 90 per cent of money gambled to players, and keep 10 per cent as profit.

But wait, I hear you cry. Gladys didn’t lose 10 per cent; she lost it all! Well, no… not according to poker machine mathematics. The rule is that the poker machine has to return 90 per cent of money gambled… not money inserted. And there’s a huge difference.

The way it works, mathematically, is, I think, very interesting. Take the example used in the article of a 2-cent gaming machine, at $1 per play, with guaranteed return of 90%. When you load that dollar in the slot, sometimes you win, and sometimes you lose, but the long-term average dictates that at each “turn” the dollar is losing 10% of its value. $1 turns into 90c, turns into 81c, turns into 72.9c, … , turns into 2c at which point the game ends.

More generally, at “turn” n, an amount A1 initially fed into a slot machine with return R is worth:


or solving for n:

n=\frac{\displaystyle ln(A_{n}) - ln(A_{1})}{\displaystyle ln(R)} + 1

What does this mean? It means that it takes, on average

n = [ ln(0.02) – ln(1.00) / ln(0.90) ] + 1 = 38

iterations to turn $1.00 into 2 cents on a 90% return poker machine. More importantly, the total amount gambled isn’t $1.00, it’s actually (because you’re re-investing your winnings and following your losses until the game ends): $1.00 + 90c + 81c + 72.9c + … + 2c. Or more generally,

A_{1}\sum_{1}^{n} R^{i-1}

which you’ll remember converges to:

A_{1} \frac{\displaystyle 1-R^{n-1}}{\displaystyle 1-R}

So a single dollar coin will generate, on average (on a 2-cent, 90% return machine):

[ 1-0.9(38-1)] / [ 1-0.90 ] = $9.80 in total bets.

At $1.00 per game, at 10 games per minute, that’s about 1 minute of play for every dollar put in, or 5 hours to burn through Gladys’ $300.

Those who defend poker machines often point to the high rate of return as one of the reasons that pokies are just “good, clean fun” for most people. The reality is that every poker machine can meet this “rate of return” requirement while still leaving the gambler broke. That’s poker machine mathematics.


Further reading:

ABC Hungry Beast, The Beast File: Pokies


Will the 43rd parliament of Australia survive the next two years?

Good question. I mean, what are the odds?

Australia’s 43rd parliament is a precarious one. Last year’s federal election resulted in a hung parliament in the House of Representatives, with a minority Labor government clinging to power with the help of the Greens and a few Independents. Now I don’t want to sound morbid but, Heaven forbid, should any one of the Honorable Members die, the resulting by-election could conceivably bring down the government. So finely balanced are the numbers.

So, I wonder, what IS the probability that this will happen before the next election, due in 2013?

Statisticians that devote themselves to thinking about exactly this sort of question are called Actuaries, and when calculating risk of mortality they reference a thing called a Life Table. Life tables list the probabilities that a person aged x will survive to x+1 years. For example, looking at the most recent Life Tables for Australia, the probability that a female aged 40 will die before turning 41 is 0.00078 (i.e. 0.078%). Or looking at it in a more positive light, the chance a 40 year old female will live to see her 41st birthday is 1-0.00078, or a healthy 99.922%.

So turning our attention back to the 150-member House of Representatives, what is the probability that one or more of them might shuffle off this mortal coil in the next two years, resulting in a by-election and/or a change of government?

To be rigorous I should aggregate individual probabilities of survival based on each member’s age and gender. But I can’t be arsed, so I’ll talk about it in terms of generalities.

If I recall correctly, the average age of a politician is 51 years. Despite this being a modern society in the year 2011, our parliament is still a massive sausage-fest. Men in government significantly outnumber women. So I’ll just be lazy and use the qx column in the Australian Life Tables linked above for males aged 51 and 52.

From the Life Table, the probability that a male aged 51 years will survive to his 53rd birthday is (1-0.00332)*(1-0.00359)=0.993. Therefore the chance that every member of the 150 seat parliament survives for the next two years can be approximated at 0.993^150=0.349 (i.e. 34.9%). The likelihood that one or more parliamentarian dies within the next two years is the complement all surviving, calculated as 1-0.349=0.651 (65.1%).

65%. That’s a pretty high risk that the parliament won’t see out its full term.


“iiNet fares best in TIO complaints…”

Or do they?

The above headline and corresponding story appeared in ARN on 4 May 2011. The article was reporting on the Telecommunications Industry Ombudsman’s (TIO) January to March 2011 statistics published here.

Now before I go any further, let me say I have grave concerns with the source data itself, let alone the way it’s being reported in the press. When talking about TIO complaint statistics, it is worthwhile to familiarise yourself with this recent research report from the University of Technology, Sydney (UTS).

Findings of the UTS research include (from the executive summary):

  • Over 80% (of carriage service providers surveyed) assert that the TIO accepts complaints which are out of jurisdiction, frivolous or vexatious.

Recommendations include:

  • Amend TIO policy and procedure to cease the multiple counting of complaints in statistics and recommence reporting disposition of complaints.
  • Amend TIO policy and procedure to refer to Level 1 Complaints as Contacts rather than Complaints.

So fair to say the TIO isn’t exactly highly regarded by the ISP industry. Indeed, Exetel have commenced legal action against the TIO for acting outside its charter. Or, in Exetel CEO John Linton’s own words, “Exetel is now going to take a court action to have the TIO closed as being a ‘criminal’ organisation based on a level of incompetence, lack of knowledge and unconstitutional actions that even Australians, who are mostly as apathetic as the governments they tolerate, shouldn’t have imposed on them.”

Well OK then…

Now if you still want to accept that all “complaints”, as reported by the TIO, are real, legitimate complaints then the fairest way to present the numbers is as a proportion of overall customer base. That’s going to be a bit tricky, because not all ISPs publish accurate customer numbers in the public domain. So I’ve had to estimate relative market share using Roy Morgan survey data and a methodology used in a previous blog post. When I refer to market share I mean ALL business, government AND home subscribers with ANY kind of internet access including dialup, DSL, cable, fibre, satellite and wireless (fixed & mobile). The Roy Morgan surveys were conducted between January 2010 and December 2010

Then, to be consistent, I only looked at TIO complaints made against a provider’s internet services . That is, I excluded complaints made against landline and mobile phone services. I considered all internet services TIO complaints made between October 2010 and March 2011

Then I derived a normalised score by dividing the relative market share by the proportion of complaints. The benchmark is a score of 1000 and a higher score is better. A score over 1000 means that an ISP recorded relatively fewer complaints as a proportion of its customer base than its peers. Less than 1000 means that an ISP was over-represented in TIO complaints relative to its size.

The TIO complaints leaderboard comes out as follows (click to up-size):

Table 1: TIO internet services complaints leaderboard, 2010/2011

iiNet did indeed do very well. With roughly an 11% market share, but only 6% of complaints, it gets a score of 1843. That’s well above the expected benchmark of 1000. But it didn’t fare best. The ISP that recorded the lowest number of TIO complaints as a proportion of number of customers was Internode, with a massive normalised score of 3448.


The NBN, CVC and burst capacity

Late last year, NBN Co (the body responsible for rolling out Australia’s National Broadband Network) released more detail on its wholesale products and pricing. You can download their Product and Pricing Overview here. The pricing component that I wanted to analyse in this post is NBN Co’s additional charge for “Connectivity Virtual Circuit” (CVC) capacity.

CVC is bandwidth that ISPs will need to purchase from NBN Co, charged at the rate of $20 (ex-GST) per Mbps per month. Note that this CVC is on top of the backhaul and international transit required to pipe all those interwebs into your home. And just like backhaul and international transit, if an ISP doesn’t buy enough CVC from NBN Co to cover peak utilisation, its customers will experience a congested service.

The problem with the CVC tax, priced as it is by NBN Co, is that it punishes small players. By my calculations, an ISP of (say) 1000 subscribers will need to spend proportionally a lot more on CVC than an ISP of 1,000,000 subscribers if they want to provide a service that delivers the speeds it promises.

Here comes the statistics.

Consider NBN Co’s theoretical 12 megabit service with 10GB of monthly quota example that they use in the document I linked to above. 10GB per month, at 12Mbps gives you 6,827 seconds (a bit under 2 hours) at full speed before you’re throttled off. There’s 2,592,000 seconds in a 30-day month, so if I choose a random moment in time there is a 6827/2592000 = 0.263% chance that I’ll find you downloading at full speed.

That’s on average. The probability would naturally be higher during peak times. But let’s assume in this example that our theoretical ISP has a perfectly balanced network profile (no peak or off-peak periods). It doesn’t affect the point I’ll labour to make.

A mid-sized ISP with (let’s say) 100,000 subscribers can expect, on average, to have 100,000*0.263% = only 263 of those customers downloading at full speed simultaneously at any particular second. However, the Binomial distribution tells us that there’s a relatively small, but still statistically significant (at the alpha=0.05 level) probability that there could be 290 or more customers downloading at the same time.

So a quality ISP of 100,000 subscribers will plan to buy enough CVC bandwidth to service 263 customers at any one time. But a statistician would advise the ISP to buy enough CVC bandwidth to service 290 subscribers, an additional (290-263)/263 = 10% , or find itself with a congested service about one day in every 20.

This additional “burst headroom”, as a percentage, increases as the size of the ISP decreases. From above, an ISP of 10,000 can expect to have 26 customers downloading simultaneously at any random moment in time. But there’s a statistically significant chance this could be 35+. This requires them to buy an additional (35-26)/26=33% in CVC over and above what was expected to cover peak bursts.

The table below summarises, for ISPs of various sizes, how much additional CVC would need to be purchased over and above the expected amount, to provide an uncontended service 95%+ of the time.

Graphically it looks a bit like this…

As you can see, things only really start to settle down for ISPs larger than 100,000 subscribers. Any smaller than that and your relative cost of CVC per subscriber per month is disproportionally large.


Further reading:

Rebalancing NBNCo Pricing Model

NBN Pricing – Background & Examples, Part 1