Monday, March 30, 2009

Pointless v St Kilda

The Swans' 2nd and 3rd quarter performances last Saturday should not go unremarked.

In the 3rd quarter they failed to register a point, which is a phenomenon that's occurred in only 1.2% of all quarters ever played and in just 0.3% of quarters played since and including the 1980 season. Indeed, so rare is it that only one occurrence has been recorded in each of the last two seasons.

Last year, Melbourne racked up the season's duck egg in the 1st quarter of their Round 19 clash against Geelong, leaving them trailing 0.0 to 8.5 at the first change and in so doing setting a new standard for rapidity in disillusioning Heritage Fund Investors. In 2007 the Western Bulldogs were the team who failed to trouble the goal umpire for an entire quarter - the 2nd quarter of their Round 22 game against the Kangaroos.

So, let's firstly salute the rarity that is failing to score for an entire quarter.

But the Swans did more than this. They preceded their scoreless quarter with a quarter in which they kicked just two behinds. Stringing together successive quarters that, combined, yield two points or fewer is a feat that's been achieved only 175 times in the entire history of the game, and 140 of those were recorded in the period from 1897 to 1918.

Across the last 30 seasons only 12 teams have managed such frugality in front of goal. Prior to the Swans, the most recent example was back in Round 14 of 2002 when West Coast went in at half-time against Geelong having scored 4.7 and headed to the sheds a bit over an hour later having scored just two behinds in the 3rd quarter and nothing at all in the 4th. That makes it almost 6-and-a-half seasons since anyone has done what the Swans did on Saturday.

Prior to the Eagles we need to reach back to Round 4 of 1999 when Essendon - playing West Coast as it happens - finished the 1st quarter and the half stuck at 2.2 and then managed just two behinds in the 3rd term. (They went on to record only two more scoring shots in the final term but rather spoiled things by making one of them a major.)

If you saw the Swans games then, you witnessed a little piece of history.

Saturday, March 21, 2009

Draw Doesn't Always Mean Equal

The curse of the unbalanced draw remains in the AFL this year and teams will once again finish in ladder positions that they don't deserve. As long-time MAFL readers will know, this is a topic I've returned to on a number of occasions but, in the past, I've not attempted to quantify its effects.

This week, however, a MAFL Investor sent me a copy of a paper that's been prepared by Liam Lenten of the School of Economics and Finance at La Trobe University for a Research Seminar Series to be held later this month and in which he provides a simple methodology for projecting how each team would have fared had they played the full 30-game schedule, facing every other team twice.

For once I'll spare you the details of the calculation and just provide an overview. Put simply, Lenten's method adjusts each team's actual win ratio (the proportion of games that it won across the entire season counting draws as one-half a win) based on the average win ratios of all the teams it met only once. If the teams it met only once were generally weaker teams - that is, teams with low win ratios - then its win ratio will be adjusted upwards to reflect the fact that, had these weaker teams been played a second time, the team whose ratio we're considering might reasonably have expected to win a proportion of them greater than their actual win ratio.

As ever, an example might help. So, here's the detail for last year.


Consider the row for Geelong. In the actual home and away season they won 21 from 22 games, which gives them a win ratio of 95.5%. The teams they played only once - Adelaide, Brisbane Lions, Carlton, Collingwood, Essendon, Hawthorn, St Kilda and the Western Bulldogs - had an average win ratio of 56.0%. Surprisingly, this is the highest average win ratio amongst teams played only once for any of the teams, which means that, in some sense, Geelong had the easiest draw of all the teams. (Although I do again point out that it benefited heavily from not facing itself at all during the season, a circumstance not enjoyed  by any other team.)

The relatively high average win ratio of the teams that Geelong met only once serves to depress their adjusted win ratio, moving it to 92.2%, still comfortably the best in the league.

Once the calculations have been completed for all teams we can use the adjusted win ratios to rank them. Comparing this ranking with that of the end of season ladder we find that the ladder's 4th-placed St Kilda swap with the 7th-placed Roos and that the Lions and Carlton are now tied rather than being split by percentages as they were on the actual end of season ladder. So, the only significant difference is that the Saints lose the double chance and the Roos gain it.

If we look instead at the 2007 season, we find that the Lenten method produces much greater change. 

 
In this case, eight teams' positions change - nine if we count Fremantle's tie with the Lions under the Lenten method. Within the top eight, Port Adelaide and West Coast swap 2nd and 3rd, and Collingwood and Adelaide swap 6th and 8th. In the bottom half of the ladder, Essendon and the Bulldogs swap 12th and 13th, and, perhaps most important of all, the Tigers lose the Spoon and the priority draft pick to the Blues.

In Lenten's paper he looks at the previous 12 seasons and finds that, on average, five to six teams change positions each season. Furthermore, he finds that the temporal biases in the draw have led to particular teams being regularly favoured and others being regularly handicapped. The teams that have, on average, suffered at the hands of the draw have been (in order of most affected to least) Adelaide, West Coast, Richmond, Fremantle, Western Bulldogs, Port Adelaide, Brisbane Lions, Kangaroos, Carlton. The size of these injustices range from an average 1.11% adjustment required to turn Adelaide's actual win ratio into an adjusted win ratio, to just 0.03% for Carlton.

On the other hand, teams that have benefited, on average, from the draw have been (in order of most benefited to least) Hawthorn, St Kilda, Essendon, Geelong, Collingwood, Sydney and Melbourne. Here the average benefits range from 0.94% for Hawthorn to 0.18% for Melbourne.

I don't think that the Lenten work is the last word on the topic of "unbalance", but it does provide a simple and reasonably equitable way of quantitatively dealing with its effects. It does not, however, account for any inter-seasonal variability in team strengths nor, more importantly, for the existence any home ground advantage.

Still, if it adds one more finger to the scales on the side of promoting two full home and away rounds, it can't be a bad thing can it?

Tuesday, March 17, 2009

Seeking Significance

Distinguishing between a statistical aberration and a meaningful deviation from what's expected is a skill that's decidedly difficult to acquire. If my train to work is late 15 days out of 20 is that a sign that the train is now permanently more likely to be late than to be early?

The TAB offers a 50:50 proposition bet on every AFL game that the match will end with an even or an odd number of points being scored. I can find no reason to favour one of those outcomes over another, so even money odds seems like a reasonable proposition.

How strange it is then that 6 of the last 8 seasons have finished with a preponderance of games producing an even total. Surely this must be compelling evidence of some fundamental change in the sport that's tilting the balance in favour of even-totalled results. Actually, that's probably not the case.

One way to assess the significance of such a run is to realise that we'd have been equally as stunned if the preponderance had been of odd-totalled games and then to ask ourselves the following question: if even-totalled and odd-totalled games were equally likely, over 112 seasons how likely is it that we could find a span of 8 seasons within which there was a preponderance of once type of total over the other in 6 of those seasons?

The answer - which I found by simulating 100,000 sets of 112 seasons - is 99.8%. In other words, it's overwhelmingly likely that a series of 112 seasons should contain somewhere within it at least one such sequence of 6 from 8.

Below is a chart showing the percentage of games finishing with an even total for each if the 112 seasons of the competition. The time period we've just been exploring is that shown in the rightmost red box.


If we go back a little further we can find a period from 1979 to 2000 in which 16 of the 22 seasons finished with a preponderance of seasons with more odd-totalled than even-totalled games. This is the period marked with the middle red box. Surely 16 from 22 is quite rare.

Well, no it isn't. It's rarer than 6 from 8 but, proceeding in a manner similar to how we proceeded earlier we find that there's about a 62% probability of such a run occurring at least once in the span of 112 seasons. So, it's still comfortably more likely than not that we should find such a sequence even if the true probability of an even-totalled game is exactly 50%.

Okay, we've dismissed the significance of 6 from 8 and 16 from 22, but what about the period from 1916 to 1974 (the leftmost red box) during which 37 of the 59 seasons had predominantly odd-totalled games? Granted, it's a little more impressive than either of the shorter sequences, but there's still a 31% chance of finding such a sequence in a 112 season series.

Overall then, despite the appearance of these clusters, it's impossible to reject the hypothesis that the probability of an even-totalled game is and always has been 50%.

Further evidence for this is the fact that the all-time proportion of even-totalled games is 49.6%, a mere 55 games short of parity. Also, the proportion of seasons in which the deviation from 50% is statistically significant at the 1% level is 0.9%, and the proportion of seasons in which the deviation from 50% is statistically significant at the 5% level is 4.5%.

Finding meaningful and apparently significant patterns in what we observe is a skill that's served us well as a species. It's a good thing to recognise the pattern in the fact that 40 of the 42 people who've eaten that 6-day-old yak carcass are no longer part of the tribe.

The challenge is to be aware that this skill can sometimes lead us to marvel at - in some cases even take credit for - patterns that are just statistical variations. If you look out for them you'll see them crop up regularly in the news.

Monday, March 16, 2009

Percentage of Points Scored in a Game

We statisticians spend a lot of our lives dealing with the bell-shaped statistical distribution known as the Normal or Gaussian distribution. It describes a variety of phenomena in areas as diverse as physics, biology, psychology and economics and is quite frankly the 'go-to' distribution for many statistical purposes.

So, it's nice to finally find a footy phenomenon that looks Normally distributed.

The statistic is the percentage of points scored by each team is a game and the distribution of this statistic is shown for the periods 1897 to 2008 and 1980 to 2008 in the diagram below.


Both distributions follow a Normal distribution quite well except in two regards:
(1) They fall off to zero in the "tails" faster than they should. In other words, there are fewer games with extreme results such as Team A scoring 95% of the points and Team B only 5% than would be the case if the distribution were strictly normal.
(2) There's a "spike" around 50% (ie for very close and drawn games) suggesting that, when games are close, the respective teams play in such a way as to preserve the narrowness of the margin - protecting a lead rather than trying to score more points when narrowly in front and going all out for points when narrowly behind. 

Knowledge of this fact is unlikely to make you wealthy but it does tell us that we should expect approximately:
* About 1 game in 3 to finish with one team scoring about 55% or more of the points in the game
* About 1 game in 4 to finish with one team scoring about 58% or more of the points in the game
* About 1 game in 10 to finish with one team scoring about 65% or more of the points in the game
* About 1 game in 20 to finish with one team scoring about 70% or more of the points in the game
* About 1 game in 100 to finish with one team scoring about 78% or more of the points in the game
* About 1 game in 1,000 to finish with one team scoring about 90% or more of the points in the game

The most recent occurrence of a team scoring about 90% of the points in a game was back in Round 15 of 1989 when Essendon 25.10 (160) defeated West Coast 1.12 (18).

We're overdue for another game with this sort of lopsided result.

Saturday, March 14, 2009

Is There a Favourite-Longshot Bias in AFL Wagering?

The other night I was chatting with a few MAFL Investors and the topic of the Favourite-Longshot bias - and whether or not it exists in TAB AFL betting - came up. Such a bias is said to exist if punters tend to do better wagering on favourites than they do wagering on longshots.

The bias has been found in a number of wagering markets, among them Major League Baseball, horse racing in the US and the UK, and even greyhound racing. In its most extreme form, so mispriced do favourites tend to be that punters can actually make money over the long haul by wagering on them. I suspect that what prevents most punters from exploiting this situation - if they're aware of it - is the glacial rate at which profits accrue unless large amounts are wagered. Wagering $1,000 on a contest with the prospect of losing it all in the event of an upset or, instead, of winning just $100 if the contest finishes as expected seems, for most punters, like a lousy way to spend a Sunday afternoon.

Anyway, I thought I'd analyse the data that I've collected over the previous 3 seasons to see if I can find any evidence of the bias. The analysis is summarised in the table below.


Clearly such a bias does exist based on my data and on my analysis, in which I've treated teams priced at $1.90 or less as favourites and those priced at $5.01 or more as longshots. Regrettably, the bias is not so pronounced that level-stake wagering on favourites becomes profitable, but it is sufficient to make such wagering far less unprofitable than wagering on longshots.

In fact, wagering on favourites - and narrow underdogs too - would be profitable but for the bookie's margin that's built into team prices, which we can see has averaged 7.65% across the last three seasons. Adjusting for that, assuming that the 7.65% margin is applied to favourites and underdogs in equal measure, wagering on teams priced under $2.50 would produce a profit of around 1-1.5%.

In the table above I've had to make some fairly arbitrary decisions about the price ranges to use, which inevitably smooths out some of the bumps that exist in the returns for certain, narrower price ranges. For example, level-stake wagering on teams priced in the range $3.41 to $3.75 would have been profitable over the last three years. Had you the prescience to follow this strategy you'd have made 32 bets and netted a profit of 9 units, which is just over 28%.

A more active though less profitable strategy would have been to level-stake wager on all teams priced in the $2.41 to $3.20 price range, which would have led you to make 148 wagers and pocket a 3.2 unit or 2.2% profit.

Alternatively, had you hired a less well-credentialled clairvoyant and as a consequence instead level-stake wagered on all the teams priced in the $1.81 to $2.30 range - a strategy that suffers in part from requiring you to bet on both teams in some games and so guarantee a loss  - you'd have made 222 bets and lost 29.6 units, which is a little over a 13% loss.

Regardless, if there is a Favourite-Longshot bias, what does it mean for MAFL?

In practical terms all it means is that a strategy of wagering on every longshot would be painfully unprofitable, as last year's Heritage Fund Investors can attest. That’s not to say that there's never value in underdog wagering, just that there isn’t consistent value in doing so. What MAFL aims to do is detect and exploit any value – whether it resides in favourites or in longshots.

What MAFL also seeks to do is match the size of its bet to the magnitude of its assessed advantage. That, though, is a topic for another day.

Sunday, March 8, 2009

Less Than A Goal In It

Last year, 20 games in the home and away season were decided by less than a goal and two teams, Richmond and Sydney were each involved in 5 of them.

Relatively speaking, the Tigers and the Swans fared quite well in these close finishes, each winning three, drawing one and losing just one of the five contests.

Fremantle, on the other hand, had a particularly bad run in close games last years, losing all four of those it played in, which contributed to an altogether forgetable year for the Dockers.

The table below shows each team's record in close games across the previous five seasons.


Surprisingly, perhaps, the Saints head the table with a 71% success rate in close finishes across the period 2004-2008. They've done no worse than 50% in close finishes in any of the previous five seasons, during which they've made three finals appearances.

Next best is West Coast on 69%, a figure that would have been higher but for an 0 and 1 performance last year, which was also the only season in the previous five during which they missed the finals. 

Richmond have the next best record, despite missing the finals in all five seasons. They're also the team that has participated in the greatest number of close finishes, racking up 16 in all, one ahead of Sydney, and two ahead of Port.

The foot of the table is occupied by Adelaide, whose 3 and 9 record includes no season with a better than 50% performance. Nonetheless they've made the finals in four of the five years.

Above Adelaide are the Hawks with a 3 and 6 record, though they are 3 and 1 for seasons 2006-2008, which also happen to be the three seasons in which they've made the finals.

So, from what we've seen already, there seems to be some relationship between winning the close games and participating in September's festivities. The last two rows of the table shed some light on this issue and show us that Finalists have a 58% record in close finishes whereas Non-Finalists have only a 41% record.

At first, that 58% figure seems a little low. After all, we know that the teams we're considering are Finalists, so they should as a group win well over 50% of their matches. Indeed, over the five year period they won about 65% of their matches. It seems then that Finalists fare relatively badly in close games compared to their overall record.

However, some of those close finishes must be between teams that both finished in the finals, and the percentage for these games is by necessity 50% (since there's a winner and a loser in each game, or two teams with draws).  In fact, of the 69 close finishes in which Finalists appeared, 29 of them were Finalist v Finalist matchups.

When we look instead at those close finishes that pitted a Finalist against a Non-Finalist we find that there were 40 such clashes and that the Finalist prevailed in about 70% of them.

So that all seems as it should be.