Wednesday, 4 March 2015

Batting out your overs

The mantra that "the biggest sin a team batting first in an ODI can commit is to not bat our its overs" has long been a bugbear of mine. As Dan Liebke noted in a rant about net-run-rate the other day, 
We've had Duckworth Lewis for decades now and, even if the mathematics of it is beyond most casual fans, the basic concept that wickets remaining are a resource that need to be considered along with overs remaining is pretty well established. 
Yes, a team has two resources. If it is a sin to not use one of those two resources to the max, why is not also a sin to bat out 50 overs leaving capable batsmen in the pavilion with their pads on? A batting team has to manage both declining resources with no certainty as to the effect that its actions will have on either the rate of scoring or the loss of wickets. 

So I was very happy to see Chris Smith take on this mantra in his Declaration Game blog, and also to see him quote a former player, Geoff Lawson, who was prepared to take a contrarian view. 
`Why?' asked Geoff Lawson, who went on to rationalise that if all the batting side attempted was to survie the 50 overs, they were very unlikely to set a winning total. `Wouldn't it be better', Lawson argued, `to hit out wiht the aim setting a challenging targe, accepting the risk that they could be bowled out, than to crawl to an unsatisfactory total?'
Lawson is right, although maybe not quite. In this quote, he seems to be suggesting that a team that is heading towards a very low score might as well start taking more risks to get to a competitive total. This is a manifestation of a mathematical theorem known as Jensen's inequality, when optimising over a relationship that is not linear, but actually, the relationship between the total score and the probability of winning is pretty much linear over the range of possibilities that can occur on any particular ball. That means, that a batting team should always ignore the current score, accept bygones as bygones, and base their level of aggression on how many balls and wickets they have remaining.

As it happens, we can quantify this decision reasonably precisely. The graph below gives a measure of what I like to call "deathness" for the first innings. The particular metric I use is the payoff to a risky single. Imagine that the batsmen have to choose between trying for a run or not. If they choose not to run, they will score 0 runs but not lose a wicket. If they try for the run, there is some probability that attempt will fail and one batsman will be run out, or they might succeed. What probability of being run out would be too high to make the risk not worth the cost. The graph shows that cross-over probability as a function of the number of overs bowled, for each possible number of wickets lost. The higher is the probability, the greater is the risk that it is worth taking and so the greater is the level of deathness (so called, because the final overs in an innings where batsmen start to take higher levels of risk is often termed "the death"). The actual numbers aren't particularly interesting (most decisions on aggression are about striking the ball, not about whether to attempt a run), but the comparison across different lines in the graph is revealing. So, for example, the graph reveals that if a particular level of aggression is warranted after 40 overs when a team is 5 wickets down, then the same level can be justified at 23 overs if no wickets have been lost.  

Before getting to batting out your overs, a few things to note about this graph:
  1. It is based on WASP data that predates the rule change to two new balls and only four outside the circle. That said, the basic story would not change using more recent data or some other estimate of the cost of a wicket such as the Duckworth-Lewis tables. 
  2. This table indicates what the expected payoffs are to different levels of risk and return in different game situations; it does not show what different risk-return combinations are possible. So, for 0-7 wickets down, the graphs indicate that the cost of risk is high at the start of the innings (the probability of a run-out has to be very low to justify attempting a run). With the fielding restrictions in the first 10 overs, however, it can be that the return to batsmen from a particular level of risk is much higher than in the middle overs, so that a high-risk strategy is still worthwhile, despite the costs. 
  3. The graphs all hit 100% for the final ball of the innings. That makes sense. It is simply saying that as long as there is any probability whatsoever of not being run out, you might as well keep running until you lose your wicket on the final ball.  
  4. Interestingly, though, for 1, 3 and 6 wickets lost, the graphs hit 100% before getting to the final ball of the innings. Remember that this is based on average-team versus average-team data. What is going on here is that on average the batters deeper in the batting order, are better at power slugging than those further up the order. So, for example, it is common for a batting order to have two aggressive openers followed by an accumulating #3 to take the team through the middle overs. If a team gets to 43 overs with only one wicket down, it might be better to go for a suicidal run (with the #3 coming to the danger end) and bring in a power hitter than to play out a dot ball. 
  5. The graph for 9 wickets down slopes down for most of the graph. This is mostly reflects out-of-sample extrapolation (there is no actual data for games where a team is 9 wickets down after 2 overs), and also the fact that when a team is 9 wickets down very early, there is almost no chance they will bat out their overs, and are likely to lose their last wicket any time so its worthwhile the batters taking risky singles while they are still there to do so. The longer the innings progresses, the less reason there is to think that the next wicket is imminent and so more need for caution. 
  6. While there is a general tendency for the graph to be lower the more wickets that have been lost, this tendency is not absolute. This is because, while losing a wicket will reduce the expected number of runs the team will score, the cost of the next wicket is not necessarily greater. For example, after about 46 overs, the incremental cost to a team of losing its 7th wicket is less than losing its 5th or 6th at that stage, so a team being 6 wickets down should be more aggressive than one that has lost only 4 or 5 wickets. 
So let's now think about batting out your overs. In the World Cup game between New Zealand and England, England batting first lost their 6th wicket at 28.1 overs, their 7th later in the same over, and their 8th at 30.4 overs. Looking at the purple, yellow and pink lines, the deathness measures at 28-30 overs, are all pretty much the same. Yes, a lot more caution was called for than if they had only been 2 wickets down at that point (and so Broad's approach at that point was probably not beyond reproach), but also the optimal strategy was not for the team to go into its shell. Rather the situation called for playing in much the same style as any team should do in the middle overs (10-30) but delaying all-out aggression for a bit longer than if they had more wickets in hand. This pretty much describes any situation where the "make sure you bat out your overs" comment is likely to arise. A team should probably delay its all-out assault for a bit if it loses too many wickets, but at no point should it bat more conservatively than in a normal middle-orders situation.  

Risky ideas

If you wouldn't take an unapproved drug, would you really risk hearing unapproved ideas?

Maybe it sounds nuts, but it's something New Zealand's Chief Censor worries about:
Chief censor Andrew Jack argues censorship has never been more important, precisely because entertainment now comes in so many forms via so many different devices.

And there's a growing recognition that, to some extent, you are what you watch.

"If I'm watching pornography that's R18, there's nothing wrong with that. Except that if I watch large quantities of it it may be influencing the way I interact with real-life women. I think people perhaps are beginning to become more aware that you are the totality of your experience."

Take the classification officers themselves. They're a resilient bunch who stick around for an average of 10 years but every now and then one sets out to change the world and gives up in disillusionment after six months of drowning in the depths of depravity.

"This kind of proves the point that what you watch does influence your world view, " Jack says.

Like the child abuse images, there is simply more of everything out there. And the more there is, the more important it becomes that people are given good information so they can make smart choices about what they watch, he says.

"If you access stuff that hasn't been classified in New Zealand you are taking a risk around you and your communities and your families. You ought to be just as careful about that as if someone came up to you at a party and said 'Here, take this pill'. You'd want to know what was in it. You are not just going to say 'Oh, great, well I'll take it'." [emphasis added]
The whole article is well worth reading: very meaty stuff for the Dom Post's entertainment section. The article notes that the Censor's office spends about 22% of its time on stuff like classifying images of child abuse sent them by the Police. The rest of the work really seems surplus to requirements.

Our kids' entertainment is almost exclusively stuff that has never passed by the New Zealand censor. We watch DVDs that we imported from America without his approval: the kids love Animaniacs, Freakazoid and Princess Bride. We watch movies and TV shows on Netflix like Adventure Time, PowerPuff Girls, and Mr. Peabody & Sherman. All this stuff has likely also been rated by the New Zealand Censor,* but we neither know nor care.

When new shows come up and we want to know whether or not they'd work for our kids, we don't go looking for a New Zealand Censor's rating. Instead we start with IMDB and other online recommendations. They'll tell us more, and more quickly, about what works for our family than the Censor ever could.

Example? Princess Bride, above. I hadn't checked the Censor's rating on it before. Checking it now took 5 clicks from the homepage, plus a search input, then an additional click to find that the Censor rated it PG in 1987 with no additional detail. If I wanted to email the details to my wife, I couldn't send her the link: their database back end puts up URLs that can't be shared. I'd have to cut and paste the page. The best URL I could share would be the one going to the search database, where you'd still need to input the text and hope that not too many titles come up.

Alternatively, I can just type IMDB Princess Bride into my browser's title bar, click the first link, then click the "Parents Guide" link on the IMDB page that comes up to find very detailed listings of anything any parent wanted to note about the film. And here's the link to it.

The Censor's rating programmes for distribution in New Zealand is entirely surplus to requirements for anybody with a web browser.

Right now, none of it really matters for us as it's pretty unlikely that we'd be picking stuff that the Censor might have deemed illegal to watch with someone who's under the age of 13. But we might start hitting that line when the kids are 11 or 12. When it does, we'll just keep doing what we do now: using our own discretion.

* The Censor's Office, in the past few years, stopped rating things that had already received a non-restricted rating in Oz, which would likely catch some of those. But other ones would have had to have had some NZ rating because they would have been released here prior to that law change.

Tuesday, 3 March 2015


Radio New Zealand featured Alan Gibbs on Sunday. It's worth a listen.

I love the story of Ralph Hotere installing an artwork at Gibbs's farm. Hotere was lauding communist Cuba, so Gibbs brought him to Cuba to show him what it was like. Travel to Yugoslavia and East Berlin had convinced a younger Gibbs that socialism didn't work; Hotere was a bit more immune to updating based on evidence.

His discussions of the import licensing regime under which NZ operated is also worth hearing - especially for the kids who hear all the critique of the reforms of the 80s but who are clueless about why they were needed. That's from around the 25 minute mark.

At the 35 minute mark, he describes how in the 1970s his trucking company had to get licences for each truck, with opportunities for his competitors to object. Fortunately there's nothing like that now.

When entrepreneurial energy goes into figuring out how to get import licences and local regulatory monopolies....

HT: Jenesa Jeram

Monday, 2 March 2015

Feeling Chuffed Again

I'm looking forward to doing my first lecture at Victoria University today, so I hope it is not disloyal to write a post celebrating the success of students from the University of Canterbury.

Last year, I wrote celebrating post-graduate successes of students from my Honours class of 2009, and lauding the diversity of the Canterbury programme that emphasised both analytical rigour and traditional liberal arts learning. This year, the cause for celebration is the recent graduate recruitment round by the Reserve Bank of New Zealand. Three students who were in my intermediate-micro-with-calculus sequence in 2013, Amy Rice, Michael Callaghan, and Simon Greenwood, were successful in securing positions at the RBNZ for 2016 in the early-bird recruitment round for the RBNZ. My understanding is that they were the only three students in New Zealand to receive such offers. Two of them, Amy and Michael, also received Reserve Bank scholarships for their Honours year in 2015.

These successes continues the astonishing record Canterbury has had in placing students into the RBNZ over the past decade. Sadly, this might be one of the last cohorts from Canterbury to enjoy this success. As a result of the financial difficulties following the earthquake, management there has decided that the Department needs to focus on its broad-based B.Com. Accordingly, it no longer offers micro with calculus at the second year, has cancelled its Arts-style current-economic issues course, and has introduced a new Bachelor of Business Economics major targeted at a different group of students. In the current financial environment with a much smaller department, it was probably necessary for Canterbury to narrow its focus, but I hope they are able to return to offering its top students a strong maths-based, liberal-arts-consistent programme. The country needs rigorously trained economists with multi-disciplinary grounding. Fortunately, Otago, Vic and Auckland still offer calculus-based micro at the second year.

Impoverished journalists

Did you hear the story of the indebted journalist who, when on assignment hanging out as a beggar for a while to be able to write on life from the streets, found he made more money begging than he did as a journalist? So he quit his journalism job and became a professional beggar, earning enough to pay off the debts.

Times are tough for journalists when they can make more begging on the streets.

If you hadn't read the story, it's here. Arthur Conan Doyle, The Man with the Twisted Lip. 1919.

As I've already spoiled the conclusion for you, here's the excerpt.
"You are the first who have ever heard my story. My father was a school-master in Chesterfield, where I received an excellent education. I travelled in my youth, took to the stage, and finally became a reporter on an evening paper in London. One day my editor wished to have a series of articles upon begging in the metropolis, and I volunteered to supply them. There was the point from which all my adventures started. It was only by trying begging as an amateur that I could get the facts upon which to base my articles. When an actor I had, of course, learned all the secrets of making up, and had been famous in the greenroom for my skill. I took advantage now of my attainments. I painted my face, and to make myself as pitiable as possible I made a good scar and fixed one side of my lip in a twist by the aid of a small slip of flesh-colored plaster. Then with a red head of hair, and an appropriate dress, I took my station in the business part of the city, ostensibly as a match-seller but really as a beggar. For seven hours I plied my trade, and when I returned home in the evening I found to my surprise that I had received no less than 26s. 4d.
 "I wrote my articles and thought little more of the matter until, some time later, I backed a bill for a friend and had a writ served upon me for 25 pounds. I was at my wit's end where to get the money, but a sudden idea came to me. I begged a fortnight's grace from the creditor, asked for a holiday from my employers, and spent the time in begging in the City under my disguise. In ten days I had the money and had paid the debt.
     "Well, you can imagine how hard it was to settle down to arduous work at 2 pounds a week when I knew that I could earn as much in a day by smearing my face with a little paint, laying my cap on the ground, and sitting still. It was a long fight between my pride and the money, but the dollars won at last, and I threw up reporting and sat day after day in the corner which I had first chosen, inspiring pity by my ghastly face and filling my pockets with coppers. Only one man knew my secret. He was the keeper of a low den in which I used to lodge in Swandam Lane, where I could every morning emerge as a squalid beggar and in the evenings transform myself into a well-dressed man about town. This fellow, a Lascar, was well paid by me for his rooms, so that I knew that my secret was safe in his possession.
     "Well, very soon I found that I was saving considerable sums of money. I do not mean that any beggar in the streets of London could earn 700 pounds a year -- which is less than my average takings -- but I had exceptional advantages in my power of making up, and also in a facility of repartee, which improved by practice and made me quite a recognized character in the City. All day a stream of pennies, varied by silver, poured in upon me, and it was a very bad day in which I failed to take 2 pounds.
     "As I grew richer I grew more ambitious, took a house in the country, and eventually married, without anyone having a suspicion as to my real occupation. My dear wife knew that I had business in the City. She little knew what.
Shades too of Gordon Tullock on Competing for Aid.

Saturday, 28 February 2015


Here's a fun one for those of you still based at a university.

All of you put together a Human Ethics Review proposal for a field experiment on Human Ethics Review proposals.

Here is the proposal within my proposal.
Each of you would propose putting together a panel of researchers at different universities. You would propose that each of your panel members - from diverse fields, seniority levels, ethnicities and such - would submit a proposal to his or her ethics review board or Institutional Review Board for approval, and each of the panellists would track the time it took to get the proposal approved, which legitimate ethical issues were flagged, which red herring issues also held things up, and how long and onerous the whole ordeal was.

Still in your proposal, you would then propose gathering the data from your panellists and drawing some conclusions about what sorts of schools have better or worse processes. Specific hypotheses to be tested would be whether universities with medical schools were worse than others because medical ethicists would be on the panel, and whether universities with faculty-based rather than centralised IRBs would have better approval processes.

You would note that members of your panels could ask their University's HR advisers to get data on the people who are on the IRBs - race, gender, ethnicity, area of study, rank, age, experience, time on panel, number of children, marital status, and sexual orientation (though not all of those would be in each place's HR database); you'd propose using these as control variables but also to test whether a panel's experience made any difference and whether having a panel member from your home Department made any difference. It would also be interesting to note whether the gender, seniority, ethnicity and home department of the submitter made any difference to the application.
End of the proposal-within-the-proposal.

Now for the fun part: each one of you reading this is a potential member of a panel for a study for which nobody has ever sought ethical approval, but which will be self-approving in a particularly distributed fashion: The IRB proposal to be tested is the one I've just outlined. Whichever of you first gets ethical approval is the lead author on the paper, is a data point, and already has the necessary ethics approval. Everybody else, successful or not, is a data point.

I expect that they might raise legitimate concerns about accessing private HR data and that you limit yourself to publicly available data, or that you survey your IRB members AFTER they issued a decision on your proposal. Those would be very legitimate things for them to point out, and they are the practices I'd want you following anyway: don't bug your HR people. They could also very legitimately point out that since you have zero reason to expect that marital status, children, or sexual orientation have any effect, you shouldn't even survey them asking for it. A good ethics review process, I'd expect, should raise both of those.

More meddlesome ones might ask whether you have appropriately considered the value of the IRB's time across the different institutions. You might then note that getting some 'best practice' guidelines out of this could save many multiples of that time for anybody who's ever sent stuff to an IRB.

But if they tell you you'd need to seek up-front approval from each of the IRBs for your study on IRBs, well, they're proposing killing the study and it would be interesting to know which universities would do that. While they’d be raising the deception of IRB members as an issue, the deception would be necessary for the study to be undertaken.

If there seem to be enough potential folks to make a go of this, I think it could be a lot of fun.

Now it could be that I've just wrecked the potential for running this particular study.

But it could also mean that IRBs that have read the post would be more reasonable in assessing your proposal to assess other IRB proposals. So either way it's good.

If you wind up submitting the proposal above, let me know that you're doing so (so I can tell you if anybody else at your school's already done it) and then let me know how it turns out. If enough people get back to me, then that's the study; first one successfully through can be lead and I'll forward the other data points on to that person.

If we don't have enough data points, well, the first one who did get approval will have to run the study as I actually outlined it above the hard way: setting up a panel of people who will formally submit an IRB proposal. I have a couple of really fun field/audit ones that would be worth doing in their own right, but I'm not going to post them here for fear of skewing things all the way down.

And, to be very clear, lead author above means "you do all the work".

Previously: The Ethics of Ethical Review Boards.

Friday, 27 February 2015

Missed opportunity

Sadly, our tech regulations do not put us in the outside of the Asylum.

I wrote in May 2013:
New Zealand keeps ranking at or near the top of the various indices of economic and social freedoms. We could do well by encouraging greater immigration of American techies fed up with that the American governmentseems to be archiving and storing just about everything for later searches. Just show them Novopay as example of how we couldn't, even if we wanted to.
Alas, we're not immune to the shenanigans going on elsewhere. Our NSA, the GCSB, is getting a legislative redraft. Thomas Beagle of TechLiberty summarisesNoRightTurn has a few additional comments. I'm not a lawyer - maybe things aren't as bad as they seem. David Farrar is considerably less concerned....When the US seems to be doing everything it can to convince its tech guys that the government really does want to be spying on everybody, and that the IRS wants to know everything you talk about at political meetings if you have small-government leanings, the last thing we need are headlines suggesting we're heading down similar paths if the legislation doesn't actually do that. And if it does, it does need changing.
At the time, a whole pile of people offered me big assurances that the TICSA legislation was far more innocuous than the press made out and that it wouldn't just work to kill innovative startups who couldn't handle the regulations and that it was all just a beat-up by people who didn't understand the regulations and hadn't had all the super-secret briefings.

The NZ Herald now tells me that we've scared off a pile of tech investment. I guess that they didn't understand the regulations or profit from the super-secret briefings either.