Seamus Hogan

Irrational Expectations in Cricket Redux - The Dismal Science

Jun 13, 2014

This post is in part a follow-up post to this one from 2012 about irrational expectations in cricket, but is more a response to some recent twitter activity in the U.K. BskyB have been using WASP in their coverage of the recent ODI and 20-20 series between England and Sri Lanka, and this has provoked some angry twitter comments. Defenders like David Lloyd 
Folk who understand cricket don't understand WASP. Folk who don't understand cricket understand WASP .. "Who's winning?"
— David 'Bumble' Lloyd (@BumbleCricket) May 28, 2014
or Adam Lewis in this post, point out that a metric like WASP can be very useful for newcomers to watching cricket to give a sense of who is winning at any particular time and how comprehensively. The idea behind Adam’s post is that WASP tells cricket newcomers what experienced watchers already know in their gut. But just how good is the gut of experienced watchers? Well that is hard to measure, but I think it is reasonable to assume that highly paid captains of international teams probably have at least as good an intuition from the game from being actively involved. So let’s look at a very simple decision that captains have to make: whether to bat first or second on winning the toss.

I am currently working on a project with a student from India, Pranav Bhargava, to estimate rankings of teams. In the process we came across the following interesting result: A model that estimates the probability that the team batting second would win an ODI as a function of the quality of the two teams playing, fits the data better than one that estimates the probabiliyt that the team who wins the toss wins the game. Looking at the raw data, we find that the team batting second won 53% of the 1294 games played between May 2002 and May 2014, but the team winning the toss won only 51%. This is a small difference but it is masked the fact that the best team over this period, Australia, batted first more often. When controlling for team ability, the difference is more marked.

This makes no sense at all. While the team batting second wins slightly more often than the team batting first, indicating a second-innings advantage on average, the advantage will not apply in every game, depending on the pitch and the abilities of the teams playing. The captain who wins the toss has the option of choosing to always bat second, or to choose to bat first if these game-specific factors suggest that would be better. Accordingly, the team winning the toss should win more often than the team batting second.

O.K. so let’s give the captains the benefit of the doubt. It seems unlikely with such a large sample, but maybe the random toss has, by chance, been won by the weaker team more often than the stronger team. So we investigated this further. We measired separate team ability measures for each of the top 11 countries (the top 8 + Bangladesh, Zimbabwe, and Ireland) for when they won the toss and lost the toss, and found that for some matchups, losing the toss would be preferable to winning it! In particular, three teams—Australia, Pakistan, and Zimbabwe—make the wrong decision according to the data more than 50% of the time, and so would prefer to lose the toss if playing against a clone of themselves. The remaining teams make the right decision more than 50% of the time, but most are sufficiently imperfect that if playing against Australia or Zimbabwe, would be better off losing the toss and relying on the opposition to make the wrong decision! Only Ireland out of the top 11 teams has a decision record that makes it desirable for them to win the toss against any opposition.

So far, these results replicates results in Bhaskar (2007), but with a slightly different method, suggesting that the results are robust. One criticism of both sets of results, however, is that in using the full sample of games to estimate what should be the correct decision, we are using information from matches that would not have been played at the time captains made their decisions. So we divided the data into two eras of 647 matches each. We used the first era to estimate when it would be better to bat first rather than second, and then used this to compare outcomes to predictions in the second era. We find that teams win more than predicted when captains make the right decision and less than predicted when they make the wrong decision. Put another way, the variable on “correct decision”, is strongly and positively significant in a regression modelling the probability of success. And this uses only information on how well teams have played batting first and second in the first 6 years of the data to predict outcomes in the second 6 years. Real-world captains have more up-to-date information about how teams are playing as well as information about ground conditions on the day. 

At this point, I can’t see any comeback. The information available to our model is strictly less than that available to captains, yet our model can outperform international ODI captains quite significantly.

So what is going on? I think there are likely two sources of imperfect understanding by captains at play here. The first is that captains forget that this is a zero-sum game. If you are a team that is better at chasing than setting a score, but are playing against a team that is much better at setting than chasing, the optimal decision is to bat first, holding conditions equal. But teams possibly play to their own strengths rather than also considering their opponents weaknesses. Another possibility, that I suggested in the earlier post, is a misunderstanding of the regression fallacy: on average, the easier the batting conditions, the higher is the first-innings score. And, on average, the higher the first-innings score, the higher is the probability that the team batting first wins the game, since, on average, higher first innings scores indicate a better than average batting performance. But these two facts don’t in themselves imply that the team batting first has a higher chance of winning when batting conditions are easy.

There are other stories one can tell for the source of the errors made by captains, and we are investigating whether we see in the data what the source is. But the bottom line is that careful data analysis with limited information outperforms professional gut opinion with full information, and by a considerable degree! 


FAQ on the WASP - The Dismal Science

May 28, 2014

This post is written primarily for those cricket fans coming to Offsetting as a result of the WASP being used on BSkyB in Britain to cover the current series between England and Sri Lanka. As with the coverage in New Zealand, it has generated some reac...

Budget 2014 - The Dismal Science

May 16, 2014

Budget 2014 is coming out today. Members of the NZ econ blogsphere will be tweeting their reactions (at #NZ14). In preparation, I thought I would link back to a previous post of mine calling for better press coverage of budgets, here, and, since an election-year budget is always an election issue, a post from the 2011 election about what to ignore in the economic policy section of parties' election manifestos, here. The latter contained a couple of points specific to the 2011 election, but 4 timeless points, that are worth restating. These were

  1. Decide whether what matters to you is what serves your selfish interest or what would serve the social good. If you are genuinely concerned about the social good, you should ask what sacrifices you are being asked to make, not how others are going to pay.
  2. Pay no attention to a policy that promises to create jobs or reduce unemployment, unless it specifically mentions labour market policy.  
  3. Ignore promise of goodies to be financed by stronger economic growth.  
  4. Ignore any policy that labels social spending “investment”.
(I expand on each of these further in the original post.)

Matt has covered off alternative-budget, election-manifesto announcements from ACTLabour, and the Greens. It would say that ACT fails on Point 3, and Labour on Point 2. I fully expect to see all the parties failing on one or more of these by the time of the election, and I will be looking out for examples in today's budget and the resulting discussion.

Meatball surgery and disaster recovery - The Dismal Science

Apr 11, 2014

I love the description of “meatball surgery” in M*A*S*H (the original book, not the saccharine sit-com that came two degrees of separation later). To quote Hawkeye Pierce:
We are not concerned with the ultimate reconstruction of the patient. We are concerned only with getting the kid out of here alive enough for someone else to reconstruct him. Up to a point we are concerned with fingers, hands, arms and legs, but sometimes we deliberately sacrifice a leg in order to save a life, if the other wounds are more important. In fact, now and then we may lose a leg because, if we spent an extra hour trying to save it, another guy in the pre-op ward could die from being operated on too late. Our general attitude around here is that we want to play par surgery. Par is a live patient.
This seems to be a general principle: Processes that have evolved as useful heuristics to satisfice in normal times based on the precautionary principle—the cost of a small delay is small relative to the cost of a mistake whose effect will last for a long time—may need to be replaced by discretion when situations are critical and the costs of delay are become large.

The meatball principle can be applied to administrative processes following a natural disaster like an earthquake. For example, careful consent processes and restrictions on the types of housing development that can occur might make sense in normal times: Once built, an inappropriate dwelling by some value judgement will stand for a long time; it might be worth erring on the side of caution in terms of what types of buildings are approved and in taking time to make a consent decision. After a natural disaster, however, the costs of delay can be huge. There are multiple equilibria in which a city could come back stronger than before or permanently move to a more depressed state, based on self-fulfilling prophesies of investor optimism or pessimism. In that environment, delays in providing sufficient housing to make the city affordable for rebuild workers and others, and delays in providing certainty about what land is subject to compulsory purchase, are not appropriate application of the precautionary principle; they are potentially decisions akin to letting the next patient die while trying to save the first patient’s leg.

Similarly, in normal times, there is some sense to universities having very careful procedures for approving new courses and programmes, even if that means 12 month delays in getting the new programmes started. But a university on the cusp of either a virtuous cycle of increased student enrolments and investment in new programmes and facilities or a vicious cycle of reduced numbers and further retrenchment needs to think in terms of meatball surgery rather than the precautionary principle.

I hope the city and university leaders in Christchurch have read M*A*S*H. We really need a meatball rebuild. 


McCullum’s 300 and WASP - The Dismal Science

Feb 19, 2014

UC's media consultant loves cricket and so asked me if I could do something WASPish about the probability of McCullum scoring 300 runs in an innings. The resulting media release is here. (The request came before the start of play today when McCull...

More Cricket: The Return of the Wasp - The Dismal Science

Nov 02, 2013

Sky is starting its Friday night coverage of the HRV cup (the domestic 20-20 cricket competition) tonight and will again be using the WASP graphic to monitor team's progress throughout the match. There was a lot of traffic coming into Offsetting las...

Are wickets more likely on hat-trick balls? - The Dismal Science

Oct 24, 2013

A student of mine has emailed me asking if I know anything about whether in cricket a wicket is more or less likely on a hat-trick ball then on any other ball. (Note for Eric and others similarly challenged in the finer nuances of cricket, a hat-trick occurs when a bowler takes a wicket with each of three consecutive deliveries. Note for followers of other sports: this is the original use of the term "hat-trick" in sport.)  The student and his flatmate have surmised that taking a wicket on a hat-trick ball is more likely than on any other randomly chosen ball. I don’t know what the data say on this, but I think the students are almost certainly right, mostly for statistical reasons. It is fun to think about how to formalise the hypothesis, and then how to test the effect of different forces. Maybe it could be a future Honours project to take this theory to the data.

Take a set of games in a particular format (say test cricket), and find the total number of deliveries and the fraction of those that resulted in the bowler being credited with a wicket. Then find the total number of deliveries in all those matches where, if the bowler had taken a wicket he would have achieved a hat-trick, and find the fraction of those deliveries where a wicket was in fact taken. Our guess is that this latter fraction will be higher than the general fraction of deliveries with wickets, and that that difference would be statistically significant. I am fairly confident about this purely because of sample selection:

  • Pitches vary considerably across matches; if a bowler has already taken two wickets in two balls, it is likely that the pitch for that game (and that point in the game) is an easier one for taking wickets than the average.
  • Bowlers (and their supporting fielders) vary in ability; if a bowler has already taken two wickets in two balls it is likely that he is a better bowler (with better supporting fielders) than the average.
  • Batsmen vary in ability and batter ability is both correlated within the batting order and correlated within teams; if a bowler has taken two wickets in two balls it is likely that the batting team has below average quality batsmen and that it is one of the weaker batsmen in the team who is facing the hat-trick ball.
  • Statistically (I can confirm this from test-cricket data), batsmen are more at risk at being dismissed early in their innings than later on; there is a high likelihood that the batsmen facing the hat-trick ball is facing his first ball of the innings.

So let’s control for these sample selection issues and consider instead a conditional probability question: Given the ability of the bowler and fielders, the batsman, how early it is in the batsman’s innings and the state of the pitch, does being on a hat-trick change the probability of a wicket? The question here becomes whether the unusual situation leads players to change their behaviour in some way. On the bowling side, the captain might set more aggressive wicket-taking fields on a hat-trick ball, but the bowler might try too hard and lose his rhythm. Similarly, the batsmen might be more conscious about not giving his wicket away, but at the same time the pressure of the situation might lead to his having leaden feet.

I would expect that the psychological effect would be greater on a batsman new to the crease than a bowler who has had a chance to find his rhythm. And in test cricket, I think that batsmen are always concentrating only on wicket preservation on the first ball they face. So If I had to guess, I would say that in test cricket the net result would still be that wickets are more likely on balls where the bowler is on a hat-trick, but the effect would be very small (and probably not discernible with statistical significance in the data). In limited overs cricket, I would expect the effect to be much smaller or even zero.

Now, if only I had ball-by-ball data for the entire history of test cricket! 


Negative Electricity Prices: Bleg - The Dismal Science

Oct 22, 2013

A couple of years ago, a visitor to our department here at Canterbury told me how sometimes in Texas, windfarms are able to generate so much electricity that the price of electricity goes negative. This recent article in the Economist (HT: Tyler at Marginal Revolution), gives a similar example from Europe. In both cases, I find this puzzling, and so I am seeking enlightenment from those who know the physics of electricity generation better than I do. To explain why it is a puzzle, let’s consider some examples of the economics of negative prices.

First imagine a pure-exchange world (i.e. one where commodities just exist rather than being created, so that economic activity consists of trade and consumption, not production). If all commodities are desired by all consumers, then competitive markets will result in all prices being positive, with prices reflecting the relative desirability and abundance of each good. If, in contrast, one of the commodities is not only not enjoyed but would be positively disliked by all consumers, the extent that its price would reflect that dislike would depend on whether there was “free disposal”, meaning whether the owner of the commodity could costlessly avoid consuming it. If there is free disposal, the price of the commodity would be zero. Without free disposal, the competitive price would be negative, again reflecting the relative (lack of) desirability.

A related situation arises when a firm produces a main product and an associated by-product. For instance, consider a motel that produces accommodation services during the peak holiday season. To provide this service, it has to incur the capital cost of building motel units that exist during the peak period, and then, as a by-product, these units exist during the off-peak times. If off-peak demand is low, some of these units might well be consistently vacant during the off-peak times, even if the price fell to zero. There again is an implicit assumption of free disposal here. If, for some strange reason, there was a requirement that motel units be occupied at all times to prevent depreciation of the capital stock, one could easily imagine the off-peak price going negative; that is, it could be worthwhile to motel owners to pay people to stay in their units during the off-peak times in order to ensure they were available for renting out at positive prices during the peak period. In effect, the opportunity cost of maintaining the units during the off-peak time would be negative, which could be reflected in the price. Again, the key assumption allowing negative prices is no-free-disposal. It does not make sense to see sellers choosing to sell something at a negative price if they could simply dispose of the good or service for free.

So now consider electricity. It is a key attribute of thermal power plants (particularly those using coal as the fuel source), that it is cheaper to keep the plant running 24/7 then to shut it down and heat it back up every day. This is just an on-peak/off-peak problem. Even if one only wanted to generate power during the peak periods each day, it would be cheaper to keep the plant running than to shut it down at off-peak times, giving a negative opportunity cost of generating power during those times. In the examples given above from Texas and Europe, wind or solar generation was able to meet regular demand at off-peak times, but shutdown costs made it economic for thermal stations to keep producing, sending prices negative. But, as we have seen, negative prices require an assumption of no-free-disposal.

My question then is: What is the physical or political constraint that implies an absence of free disposal in the electricity market? Why is it not possible to run a plant spinning the turbines, but simply not connect the station to the grid? In the case of Texas, I have heard that it is a purely political constraint: in a heavily regulated market, it is not palatable to have stations burning coal and not then produce any electricity. Is that all there is, or is there something about the physics of electricity generation that makes it imperative to force power onto the grid when a station is up and running?