Imagine you are captain of the national cricket team. With 20 minutes left in day one of a test match, your top-order batsman is dismissed. Do you employ a nightwatchman? That is, do you send in a tail-end batsman to see out the bowling until the end of the day’s play and protect your top-order?

Well, a little bit of maths can show you that you shouldn’t.

Let’s a have a look at the first Test between Australia and India this summer, which played out last week. With 30 minutes to go on the first day, Australian batsman Mitchell Marsh was dismissed. Rather than send in the next, and extremely talented, batsman Brad Haddin, then-captain Michael Clarke opted for Nathan Lyon, the number 11.

Those in favour of a nightwatchman argue as follows: there was almost nothing that Haddin could contribute in the final 30 minutes of the day. He could score only a handful of runs, and he risked being dismissed. With all respect to Lyon, his being dismissed early the following day would be no great loss.

Others counter with the following: presumably the conditions are such that Haddin had a high chance of being dismissed in the evening. If this was so, surely the nightwatchman, Lyon, had an even greater chance of being dismissed: after all, he bats at number 11 for a reason.

So if Lyon was dismissed before close of play … what would you do then? Employ another nightwatchman?

AAP/David Mariuz

As it happened, Lyon was dismissed after facing only 14 balls. Haddin was sent in next, but also dismissed at the close of play.

There are always good talking points about employing a nightwatchman, but no mathematical account appears in the literature (though there is this statistical study).

Were a nightwatchman a good idea, we should expect that a team would be “better off” (meaning more runs, fewer wickets or both) by employing one. To see whether this is a good bet for the captain we must examine the situation on the average.

(An extreme example of success is Jason Gillespie’s unbeaten double century after coming in as a nightwatchman against Bangladesh in 2006.)

Matters of order

We can investigate how many runs a team is expected to score when they do – and do not – employ a nightwatchman: we can then compare the two and make our decision accordingly.

At first blush you might say “each batsman will bat his average”: the average team score is therefore the sum of the averages of the batsmen. We can see that this is misleading by considering the following simplified example.

Suppose that you are the captain of a team with only three players:

two star batsmen ( S and** S**)

and** S**) one genuine tail-ender (T).

Surely you choose the batting order SST and you dismiss TSS and STS: the best batsmen have to bat first. Why? To increase their chances of scoring runs.

If one of the stars comes in last, his partner may be dismissed before he has made many runs. Good batsmen have good averages because they have the time to make runs.

AAP/Tony Ashby

Going further: the batting order SST will always have one partnership between stars and one partnership involving the tail-ender.

The batting order TSS will always have one partnership involving the tail-ender, but what about the other partnership? In the normal course of events the tail-ender is dismissed first: this leads to a partnership between the two stars.

If, though, the star is dismissed first, this batting order has two partnerships involving tail-enders: we surely expect fewer runs in this case.

Running the numbers

This light analysis agrees with our intuition to send in the strongest batsmen but leads us to a harder question. How can we predict a batsman’s average number of runs, given that we must take into account batting order?

Thanks to cricket news website ESPN Cricinfo we can access:

a batsman’s strike rate: the number of runs scored per 100 balls

what I call his occupancy rate, R: the average number of balls faced per innings.

The higher the occupancy rate, the longer the batsman spends at the crease. Indeed, we can go further and say that the probability of a batsman being dismissed is 1/ R . Assuming independence of events (that one delivery does not affect any other), the probability that a batsman survives exactly 9 balls, say, is (1-1/ R )9.

(If this assumption of independence is too hard to swallow, you can easily build into the model the assumption that a batsman is more vulnerable at the start of his innings.)

So given a batsman’s strike rate and the probability of his surviving a certain number of balls, we can predict the number of runs scored in a partnership. This analysis shows that the expected number of runs is always lower when one employs a nightwatchman.

In short, sending in a top-order batsman instead of a nightwatchman has two benefits – they’re less likely to be dismissed, and are more likely to put on some runs.

I only wish I’d written this in time to save Lyon, Haddin and Clarke the trouble.