Wednesday, 21 December 2016

Jennings, Hameed, Duckett .... and Bayes?

As the umpires of time take off the bails of 2016, and as the England team pick themselves off the mat after an absolute hammering from India, I bring you this year's festive look at the data. It's...a bit different.

England's test tour of Bangladesh and India featured the introduction of three new batsmen into test cricket. Keaton Jennings and Haseeb Hameed have been singled out as definite bright spots of the tour, while Ben Duckett may have to wait a little while for his next opportunity. But how can we sensibly assess each one's tour? And how likely is it that each one will be a medium-to-long term success at test level?

Things like this are difficult. Whenever a new player is picked, nobody- not the fans, not the selectors, not the player themselves- knows with certainty how it's going to go. Some demonstrably very talented players don't succeed in the long run, and some apparently more limited ones do and it isn't always obvious why. As a player starts out in test cricket (or at any new level or form of cricket), we must acknowledge that there are range of possible "outcomes" for their career- they may later be remembered as a legend, an unfulfilled talent, an "every dog has his day"... we just don't know.

But over time, we find out. With each fresh innings we see more of them, and gradually our uncertainty morphs into knowledge. A couple of years ago, I don't think it was enormously obvious which of Joe Root and Gary Ballance would be the better test player. Now, however, I think have a certain degree of confidence about the answer to that.

This is, in essence, a problem of forecasting. We have data about the past and we want to make a (hopefully, educated) guess about the future. Which of two players will be better? With each new data point, we update our forecast and hopefully arrive closer to the truth*.

There's a famous theorem of mathematics- called Bayes theorem, after Rev. Thomas Bayes, which we can use to do exactly this. As an equation it looks like this:

For our purposes: 'B' is something I have observed (e.g.  "Keaton Jennings scoring a century"). 'A' is the thing I want to find out the probability of being true (e.g. "Keaton Jennings will be a long term success at test level").

P(A|B) is the thing I want to know. It is the probability that A is true, now that I know that B is true.
P(A) is the "prior"- the probability I would have given to A being true before I knew that B was true.
P(B) is the probability of B happening without regard to whether A is true.
P(B|A) is the probability of B happening assuming A is true.

Let's try and apply this to England's new recruits, albeit in a slightly crude fashion.

To begin, let's suppose four possible long to medium term outcomes for a player's test career:

1) Very good
2) Good
3) Okay
4) Not so good

Let's now consider all the batsmen who made their debut for England batting in the top six between 2000 and 2014. (I cut it off at 2014 so as to have reasonable some chance to say how their career went after their debut).

We'll exclude Ryan Sidebottom from the sample because he was there as a nightwatchman, and Chris Woakes because I think most people would say he's mainly a bowler, leaving us with 22 players.

Ranking them by batting average and dividing the list according to the categories above, I would say they break down something like this (*controversy alert!*):
Group 1 ("very good")- Cook, Pietersen, Root
Group 2 ("good") Barstow, Bell, Strauss, Trescothick, Trott
Group 3 ("okay") Ali, Ballance, Collingwood, Compton, Stokes
Group 4 ("not so good") Bopara, Carberry, Clarke, Key, Morgan, Robson, Shah, Smith, Taylor

This gives us our initial values for P(A) in the Bayes theorem equation. For a generic England debutant batsman in the modern era:
P(very good)=3/22=13.6%
P(not so good)=9/22=40.9%

We then want to know the probability for a player belonging to each of these groups to have a given outcome from one innings. We'll categorise the outcomes of an innings pretty crudely:  0-9. 10-49, 50-99, 100-149, greater than150.

Based on the records of the players listed above we can estimate the probability that (e.g.) a player belonging to Group 2 ('good') will score between 100 and 150 in any given innings. The table looks something like this:

Obviously, the best players are more likely to get high scores and less likely to get low scores. But crucially there's a finite probability for any innings outcome for any group of player. This actually gives us all the information we need to take one innings outcome for a player and use Bayes theorem to generate a new forecast about the probability that they belong to each of our four categories.

So, let's take the example of Keaton Jennings. Before he batted, I though of him as just a generic debutant and my forecast about his ability at test level looked this:

P(Jennings is very good)=13.6%
P(Jennings is good)=22.7%
P(Jennings is okay)=22.7%
P(Jennings is not so good)=40.9%

After he scored a hundred, applying Bayes theorem gives:
P(Jennings is very good)=16.8%
P(Jennings is good)=26.8%
P(Jennings is okay)=23.5%
P(Jennings is not so good)=32.9%

So the odds I would give to him turning out to be a very good player after the fashion of Root, Cook or Pietersen went up after his hundred, but only modestly. It's still only one data-point after all, and the fact remains that most batsmen don't turn out to be a Root, Cook or Pietersen.

He then got two low scores and a fifty. Applying the process iteratively we end up at:

P(Jennings is very good)=14.2% 
P(Jennings is good)=28.0%
P(Jennings is okay)=24.3%
P(Jennings is not so good)=33.4%

So there's still a high degree of uncertainty. Relative to before his debut the probability that things won't work out is down and the probability that he'll turn out to be great is up. But only modestly. We don't know much.

For Hameed and Duckett we can do the same thing with their results on tour.

Hameed is in a similar boat to Jennings. The probability that he'll be a long term success is up, but only modestly. We'll have to wait to be sure.

P(Hameed is very good)=18.0% 
P(Hameed is good)=28.7%
P(Hameed is okay)=23.2%
P(Hameed is not so good)=30.1%

For Ben Duckett, the outlook is a bit poorer. Our calculation now gives over a 50% chance that he'll be in the "not so good" category and a less than 10% chance that he'll be in the "very good" category. Specifically:

P(Duckett is very good)=7.3% 
P(Duckett is good)=17.2%
P(Duckett is okay)=23.1%
P(Duckett is not so good)=52.4%

Still, though, the calculation calls us to be circumspect. We have some indications about Ben Duckett's test prowess, but not the full picture. A nearly 25% chance that he'll turn out either good or very good is far from nothing.

There are two things I like about this way of thinking. Firstly, it allows us to acknowledge the world's inherent uncertainty without throwing up our hands and giving up. We can't have absolute certainty, but we can have some idea. Secondly, it gives us a mechanism to build new information into our thinking, to update our view of the world as we get new information.

The calculation I've outlined above is clearly much too crude, and leaves too much out to be used for selection purposes. But I genuinely think this way of thinking- i.e. probabilistic and updating forecasts based on new information- is well suited to this kind of thing. "Keaton Jennings will open England's batting for years to come" is too certain a statement for a complicated and uncertain world. Maybe, "there's a 42% chance that Keaton Jennings will turn out to be at least as good as Marcus Trescothick" is closer to the truth.

* There's a really nice book about statistics and forecasting called "The Signal and the Noise" by Nate Silver. It doesn't mention cricket, more's the pity, but it covers many fields- from baseball to finance to earthquakes-  where some kind of forecasting is desirable and looks at why some of these areas have seen great successes using statistical methods and others have seen catastrophic failures. It's very readable and I very much recommend it if you're into that sort of thing.

No comments:

Post a Comment