The Test-match leg of India's tour of South Africa consisted of three beguiling Test matches which were as challenging to read and they were enthralling to watch. None of the three pitches could be considered batting friendly. Though India lost 2-1, the series was probably as far away from a 3-0 wipeout as it was from a 2-1 Indian win.

A standard story is told about India's overseas tours in the public prints, involving some comment about the capacity (or lack thereof) of India's batsmen to face up to fearsome foreign fast bowling, and wonderment about how India's fast bowlers occasionally challenge the home batting. India's batsmen are expected to slay impossible demons regularly. India's bowlers are expected to impersonate demons only occasionally. Given that most of the writers who write about India's Test team are men, this storyline is a psychoanalyst's dream. Or perhaps, it is a psychoanalyst's cliche. The transcript of the Indian captain's press conference after the second Test match consisted entirely of questions about team selection and the performance of the batting. Much of the discourse was about how India's bowlers kept dragging the team back into Test matches, making up ground the batsmen were seemingly repeatedly losing.

The problem underlying all these storylines is an absence of information. Evaluating batsmen and bowlers on the basis of their careers averages is reasonable because over the course of a career, averages are a good proxy for quality of batting and bowling. Over a solitary Test match, though, this makes very little sense. But then, over the course of a single Test, no other systematic measurement has hitherto been available. In the past decade, ESPNcricinfo has maintained a record of all cricket matches it covers on a ball-by-ball basis. Apart from the commentary, they record the usual outcomes - how many runs, how many extras, whether or not a wicket fell, what was the line and length of the delivery. They also record a judgement: was the batsman in control of the delivery?

Control is an elegant binary measurement of batting and bowling, as opposed to runs and wickets, which represent the outcome of batting and bowling. It records whether or not the ball went where the batsman intended it to.

In the case of the South Africa-India series, the control measurement provides a less batting-centric picture. It shows that while India's batting coped admirably with the home bowling, it was the superior overall quality of the home bowling that proved to be the difference between the two sides.

The ball-by-ball record can be summarised in various ways, from the most specific individual bowler v batsman match-ups to innings summaries. Two measures are developed from the data. The first measure "In Control Per Not In Control" records the number of balls the batsman was in control for every ball that the batsman was not in control. This is designed to demonstrate the amount of control the batsman had over proceedings. Higher values show that the batsman was in control more, while lower ones show that the bowler created more uncertainty. The second measure "% Runs Scored Not In Control" gives the percentage of the total runs that came from deliveries where the batsman was not in control. This is designed to be a stand-in for "luck". Almost every single dismissal (run-outs excluded) occurs when the batsman in not in control. Finally, scoring rates (runs per six balls faced) for in-control and not-in-control delivery sets are presented.

Summarised by team innings, the control numbers reveal that the series consisted of two types of Tests. The first and third Tests were both unusually bowler-friendly. The second Test was far more conventional, with the bowlers gaining ascendancy as the match went on. It could be argued that the toss in the second Test was the most crucial one of the series, because judging by the control figures, the wicket in Centurion became progressively worse for batting as the match progressed.

Control stats for each innings in the South Africa-India Test series Match Inns Bat team Balls faced Runs Wkts In control per not in control % runs scored not in control In-control scoring rate Not in control scoring rate 1st 1 SA 440 280 9 2.5 14.3 4.6 1.9 1st 2 Ind 442 195 10 2.6 23.1 2.8 2.2 1st 3 SA 250 128 10 2.7 25.0 3.1 2.9 1st 4 Ind 256 134 10 2.9 21.6 3.3 2.6 2nd 1 SA 684 326 8 5.5 8.3 3.1 1.5 2nd 2 Ind 556 295 8 4.9 17.6 3.2 3.3 2nd 3 SA 550 250 10 4.1 18.0 2.8 2.5 2nd 4 Ind 303 146 9 3.3 23.3 2.9 2.9 3rd 1 Ind 464 161 10 2.2 27.3 2.2 1.8 3rd 2 SA 400 171 10 1.8 23.4 3.1 1.7 3rd 3 Ind 485 218 10 2.3 20.6 3.1 1.9 3rd 4 SA 443 164 10 3.4 15.9 2.4 1.6

The first Test was decided on the very first day. Despite three early wickets, India's bowling conceded runs at a rate neither side would achieve at any subsequent point in the series. Of the 440 balls bowled by India's bowlers, the South African batsmen were in control for 315. They scored at 4.6 runs per over from these 315 deliveries. For the rest of the series, they scored at 2.9 runs per over from deliveries where they were in control. Had India kept South Africa down to the in-control scoring rate which they managed for the rest of the series, the home side would have made 153 runs in those 315 balls instead of 240. The final margin of victory for the home team in the first Test was 72 runs. Later, Ravi Shastri observed that ten extra days of preparation in South Africa might have been useful. Perhaps he was right. That first day, when India's bowling looked underprepared, proved fatal. In light of what occured in the series, it could well be said that India lost the series on the first day.

A couple of claims made about India's batsmen are worth examining. First, it has been observed that Cheteshwar Pujara and M Vijay have a tendency to get stuck, even though they look secure at the crease. This is because they were extremely selective about the shots they were willing to play, especially as the series developed. But they were able to collect singles and get off strike from time to time. This has had very little effect on India's overall scoring rate. When in control, India's batting scored at about the same rate as South Africa's (excluding the first innings of the first Test).

Jasprit Bumrah offers pace, and a bit of novelty in terms of his action, but he conceded 3.5 runs for every six in-control deliveries he bowled AFP/Getty Images

Second, it has been observed that picking Rohit Sharma ahead of Ajinkya Rahane was an obvious mistake. This is not obvious, or possibly even a mistake. If one compares Rahane and Rohit over their careers, then their run returns suggest that Rahane is indeed the better overall Test batsman. But if one asks who is playing better currently, it is debatable. Rahane was not in control for 30 of the 96 balls he faced in Johannesburg. Rohit was not in control for 37 out of 190 balls he faced in the series. Rahane's cavalier approach brought India 57 runs at the Wanderers, but as with all other batsmen in that Test, the runs against his name were largely a measure of the amount of luck he enjoyed.

Rohit had a different problem. He defended superbly in both Tests he played, but of the 86 balls he faced in the first innings in Centurion and Cape Town, he did not score one single. The break-down of the deliveries he faced is: three fours, one three, three twos and 79 dots. If we consider every ball that a batsman is not in control to be a potential source of dismissal, or a mistake, then Rohit was dismissed on his 13th (in 59 balls), fifth (in 30 balls), third (in 27 balls) and 16th (in 74 balls) mistakes. Rahane was dismissed on his tenth (in 27 balls) and 20th (in 69 balls) mistakes. While Rahane is the better overall batsman, there's no evidence to suggest that he played better in this series. Despite Rohit's stroke-making ability, it was his inability to get off strike, rather than any defensive technical problem that proved to be his undoing in South Africa.

Overall, South Africa's superior pace attack was the difference between the two sides. The home fast bowlers created about 10% more uncertainty than India's did, and conceded 0.4 runs per over fewer when the batsmen were in control. The composition of the two sides was symmetrical in each Test. In the first two Tests, each side played five batsmen, one wicketkeeper, four fast bowlers and one spinner. In the third Test, each side replaced the spinner with a fast bowler. In the tables below, the players are classified as follows:

South Africa bowlers: Kagiso Rabada, Dale Steyn, Morne Morkel, Vernon Philander, Keshav Maharaj, Lungi Ngidi and Andile Phehlukwayo.

India bowlers: Mohammed Shami, Bhuvneshwar Kumar, Ishant Sharma, Jasprit Bumrah, Hardik Pandya, R Ashwin (The fast-bowler classification excludes Ashwin and Maharaj.)

South Africa top order: Aiden Markram, Dean Elgar, Hashim Amla, AB de Villiers, Faf du Plessis

India top order: M Vijay, Shikhar Dhawan, KL Rahul, Cheteshwar Pujara, Virat Kohli, Rohit Sharma, Ajinkya Rahane

Control stats: bowling Bowling type Balls bowled Wkts In control per not in control %runs conceded with bat not in control In control scoring rate Not in control scoring rate Ind bowlers 2767 57 3.3 16 3.1 1.9 SA bowlers 2506 57 2.9 22 2.9 2.3 Ind fast bowlers 2308 50 3.0 17 3.2 2.0 SA fast bowlers 2290 56 2.7 23 2.8 2.3

Control stats: batting Category Balls faced Runs In control per not in control %runs scored with bat not in control In control scoring rate Not in control scoring rate Ind top order 1601 685 3.9 19 2.6 2.4 SA top order 1977 944 4.2 12 3.1 1.8 Ind lower order 905 464 1.9 25 3.5 2.2 SA lower order 790 375 1.9 25 3.2 2.1

After the first two Tests, despite the fact that India lost both, there was a niggling feeling that they had not been outplayed. South Africa's superior control with the ball was decisive, but the Indian batting demonstrated that it could cope with the South African attack. Given that the pitches were prone to misbehaving, India kept collecting wickets regularly when they bowled. India required 11.4 not-in-control deliveries to get one wicket. South Africa required 11.2 not-in-control deliveries to get one wicket. Each side created three run-out dismissals. Given the nature of the pitches, it could be argued that South Africa's attack was better suited to the conditions. Neither side can claim to have been especially unlucky. But South Africa can claim to have bowled better.

India will be haunted by the fact that the series was decided on the first day, when their bowling was decisively under par. The current squad is such that in conditions where India don't play two spinners, they don't have clear idea what their best XI is. This is not their fault. It is not clear who India's three best fast bowlers are. Each has obvious limitations. It is easy to see why the selectors and the management find Jasprit Bumrah such a promising proposition, though he is far from the finished product. Bumrah has pace, seems to be tireless, and has an unusual run-up and action, which provide India with a little bit of novelty in their attack. He troubled the batsmen (only 2.6 in-control deliveries per not-in-control delivery) but also conceded a lot of runs when he didn't trouble them (3.5 runs per six in-control deliveries, unlike Ishant Sharma, who was very difficult to score off, conceding only 2.3 runs per in-control delivery). For a debut series, Bumrah's returns were spectacular. But India's team management will probably have noted his inability to draw edges for the slip cordon. The wickets in England will probably not be as quick as those in South Africa, and Bumrah is unlikely to get batsmen out fending in England as easily as he did in South Africa. Still, he has easily justified India's decision to give him a Test debut.

None of India's bowlers stands up in comparison to Kagiso Rabada, who, at 22, already has 120 Test wickets to his name. If there was one player who was the difference between the two sides, it was him. Steyn was lethal when he played, but Rabada was South Africa's mainstay, what with Vernon Philander having his problems with injury. As superb as Morne Morkel is (his Test record after 83 Tests is better than James Anderson's was at that stage), he has not succeeded Steyn as the spearhead of the South African attack. Rabada, with his pace, accuracy and ability to work a batsman over, is the undisputed South African all-wicket spearhead.

Philander and Bhuvneshwar Kumar had very good series in conditions that suit them. Philander controlled the scoring more effectively than Bhuvneshwar. Lungi Ngidi had a promising start to his career, bowling in a quartet with three experienced colleagues. It remains to be seen how he goes when the conditions are less helpful.

Control stats in the South Africa-India series by bowler Bowler Balls bowled Wkts In control per not in control % runs conceded with bat not in control In control econ Not in control econ Kagiso Rabada 628 15 2.7 22.4 3.0 2.3 Mohammed Shami 503 15 3.1 16.0 3.3 1.9 Vernon Philander 579 15 2.9 25.7 2.5 2.5 Jasprit Bumrah 678 14 2.6 17.2 3.5 1.9 Morne Morkel 596 13 3.0 20.2 2.7 2.0 Bhuvneshwar Kumar 406 10 2.8 17.6 3.3 2.0 Lungi Ngidi 321 9 2.4 23.4 3.1 2.3 Ishant Sharma 414 8 3.4 16.7 2.3 1.6 R Ashwin 459 7 5.4 9.3 3.0 1.7 Hardik Pandya 307 3 3.7 19.3 3.2 2.9 Dale Steyn 105 2 2.0 21.6 3.4 1.9 Andile Phehlukwayo 61 2 4.1 28.6 3.1 5.0 Keshav Maharaj 216 1 6.4 11.2 3.6 2.9

With a top innings score of 335 and 40 wickets falling in each Test, this was a bowler's series. The side whose bowlers created more uncertainty won it, fittingly, and the side that dropped the ball while bowling on the very first day lost.