Ancient India holds a completely mind-blowing, hardly-known conceptual connection to small sample statistics problem: estimating a massive population from a microscopic sample.
It is recorded in the Vana Parva of the Mahabharata, through a highly advanced mathematical concept known as Akṣa-Hṛdaya (The Heart of the Dice/Numbers).
In the epic, King Nala loses his entire kingdom in a rigged game of dice because he lacks the cognitive framework to understand probability & patterns. He goes into exile, loses his identity & ends up working as a humble charioteer named Bāhuka for King Rituparna of Ayodhya.
Rituparna was not just a king; he was a master of Akṣa-Hṛdaya, which ancient texts describe as a secret system that allowed a person to immediately compute vast numbers & understand the mathematics of gambling.
1 day, as Nala is driving Rituparna’s chariot through a dense forest, they pass a massive, sprawling Vibhitaka tree (the Terminalia bellerica, ironically the very tree whose nuts were dried & used as dice in ancient India).
Rituparna looks at the bursting, chaotic canopy of leaves & fruits & makes a casual boast to Nala:
"Look at this tree, Bāhuka. Not all of its leaves & fruits are visible to the eye. But I can tell you that on this tree, there are exactly 50 million leaves & 2095 fruits."
Nala is stunned & deeply skeptical. He stops the chariot & says, "O King, you are making a claim about things that are hidden from view. I am going to chop down this tree, count every single leaf & verify if your words are true."
Nala literally spends hours cutting the branches & counting. When the final tally matches Rituparna's calculation down to the last single digit, Nala falls at his feet & begs to learn the secret.
How did King Rituparna do this? Mainstream mythological retellings treat this as a magical mantra/a divine superpower. But in reality, Rituparna was executing the world's oldest recorded example of Estimation by Sampling.
Rituparna could not see 50 million leaves. He did not have time to count them. Instead, he took a tiny sample of a single branch, counted the density of leaves on that specific layout, calculated the total volumetric area of the tree's canopy & multiplied the sample weight against the whole.
The text notes that the moment Nala absorbs the mathematics of sampling & probability into his consciousness, the demon Kali (the personification of chaos, ignorance & bad luck) is literally vomited out of Nala’s body.
In ancient Indian thought, mastering the mathematical relationship b/w a tiny sample & the grand universe was the ultimate spiritual tool to destroy chaos & regain control over destiny. 🙏🙏