How Kolkata Biriyani helped me in understanding Mahalanobis Distance.

People in Kolkata (including me) are quite sentimental about two things.

1. Presence of potato in their Biriyani
2. ISI Kolkata

Even though IIM Joka and IIT Kharagpur are more prominent in world-wide rankings, ISI Kolkata caters a totally different niche of talent and commands a different level of respect in both academics and industry, especially in data science and analytics.

Interestingly, Google reminded us about its founder, Prasanta Chandra Mahalanobis, by celebrating his 125th birthday yesterday with an intriguing doodle. The image represents a beautiful amalgamation of the idea of survey sampling and mahalanobis distance.

There are enormous amount of mathematical literature, both online and offline, which explains survey sampling and mahalanobis distance exhaustively. But, to a lazy bengali like me, those latin and greek symbols acts as gaurd to explore these concepts, rather than a gaurdian guiding me to understand and appreciate them.

So, what does a frustrated bengali do, when he gets exhausted of thinking on a Friday afternoon? He Eats.

And this takes me back to our delicious point 1. Kolkata Biriyani.

A crucial part of Biriyani is par-boiled Rice grains just before cooking the biriyani. And how do we decide the rice is par-boiled? We pick a few grains while the rice is still in the pot and check the softness. If those few rice grains are soft enough, we consider the whole pot of rice has boiled up perfectly.

This leap of faith, is what we do by sampling for a survey. The way we sample, is a subject by itself, that can be explored using the vast available literature.

If we try to dissect the Main Actors of a Kolkata Biryani:

1. Masala (Spice-mix)
2. Rice
3. Chicken/Mutton
4. Potato

Biryani spice-mix is the soul of the preperation. The amount we will get from the ingredients listed below does seems a lot, and has to be used to make biryanis many times over. However, it is easy to make larger amounts of a perfect mix. This spice-mix can be used in daily cooking as we use garam masala.

1 tbs cumin seeds (Saah Jeera)
1 tbs coriander seeds
1 tbs black pepper
1 tbs white pepper
2 or 3 black cardamom
7 or 8 green cardamom
1 whole nutmeg (jaifol)
2 whole maces (javetri flower)
5 or 6 whole cloves
1 inch long cinnamon stick

Apart from these we need many other stuff as detailed below:

2 cups of fine quality Basmati Rice (Aged rice as it is less starchy)
4 Tbs of White Vegetable Oil (Most of the Biryani recipes use ghee)
4 or 5 big Onions
10 to 15 cloves of Garlic
1 inch long Ginger
150 gms plain Curd
1 tbs Red chilli powder

2 Tbs warm milk
A pinch of sugar
A pinch of saffron
A pinch of Salt

2 tsp Rose water
1 tsp Rose Essence
1 tsp Keora Water (this gives the Biryani its flavor)
1 Dollop of ghee
4 Pieces of Chicken Legs
2 Medium sized Potatoes

Now, Imagine various coordinate axes for our domain (biriyani domain) being the ingredient volumes. Sugar. Safforn. Ginger. Salt.RedChilli. Curd. Etc.

Hard isn’t it? Exactly!

How to imagine so many dimensions?

Let us look it in other way round.... you are provided with the above list and quantity, and being asked what can we make out of this list.

An experienced chef will eventually identify the “latent” objective and tell us that this is a perfect recipe for kolkata biriyani. But for a layman, we might end up guessing it is for some sort of spicey chicken and rice, or a pulao, or a chicken khicri or a biriyani.

Moreover, A half cup addition in rice or 1 extra dollup of ghee might be going to make the perfect biriyani less great, but not killer. Yet just a small amount more saffron or increasing a tablespoon of sugar will knock you over a flavor cliff from an authentic biryani to a painfully tasted pulao.

So to appreciate the concept, Mahalanobis isn’t as much a distance in "ingredient volumes" as it is distance away from "authentic taste".

In other words, Mahalanobis distance measures the unit of deviation, we have for the actual amount of an ingredient used to create the actual biriyani from the ideal amount of that same ingredient to create the perfect biriyani, provided the other ingredient volumes remains constant.

Mahalanobis distance helps us to identify really "potent" ingredients, the ones very sensitive to variation, so that their variation is most carefully controlled.

And oh, I almost forgot the outlier! You do NOT mess up with the amount of potato!

The mahalanobis distance between an authentic Kolkata Biriyani with some random Lucknowi biriyani is, 2 Medium sized evenly cooked Potatoes.

Numbers alone don't get standing ovation; narratives does. Narratives inform, illuminate, and inspire. So, I tell more of them.