Monday, May 3, 2010

You are a null set

The "theory of probability" was one of my favorite subjects during university education.

Our lecturer was a man with great sense of humor, then Assoc. Prof. Fatih Canatan.

In probability theory there were abundant of interesting real life examples that would pull you out of the realm of photons (electromagnetic fields’ constituent particles) and put you on the ground standing firm on your feet, well almost firm, as we are talking about probabilities here. The theory of probability gave us the students a rare sense of belonging in our otherwise weird electrical engineering curriculum.

I remember we also had a classmate, an annoying type, you know the guy, a definitive 'nerd', who constantly asks stupid questions without giving a fig about how disruptive he is being for the class. 

Then one day following a chain of dumb and tiring interruptions he asked “what is a ‘null set’ professor?”. Mr Canatan turned, calmly puffed his long pipe twice, deeply thinking, but his face now turning slightly pinkish, answered:

“Mmm. A null set is an empty set as I already mentioned number of times. For example you, you are a null set!”.

The whole class suddenly cracked up, tears in eyes.

A classical problem in introductory probability lectures is:

"What is the probability of finding at least two people with the same birthday in a group of people?"

Most people underestimates the value of such probability. To give you an idea in a group of 20 people the probability is 41%.

In my hand writing the solution is given as follows :

If you also want to plot how probability varies with the group size first of all you need a good calculator which won’t give you overflow with large factorials. Most likely your computer’s calculator application would fail. You would need a tool like Wolfram Alpha.

Wolfram Alpha is a magnificent online math tool. Go to then in the search box type;

1 - 365!/((365-k)!*365^k)

After a few seconds Wolfram will give you a set of interesting plots and numbers in various forms:

If you want to zoom into the probability distribution for a group size between 20 and say 40, simply follow your intuition:

1 - 365!/((365-k)!*365^k) from 20 to 40

And you would get this;

Or if you want to calculate the probability for a group of 40 people simply type:

1 - 365!/((365-k)!*365^k) where k=40

And you would get the result as 89.1232%:

Isn’t this amazing! I mean the whole thing. It simply feels great NOT to be a null set.


mehmet said...

Hi Ergun, I have just finished Adam Fawer's book "IMPROBABLE". He has couple of pages dedicated to the same problem, you may find it interesting.

Ergun Çoruh said...

Thanks Mehmet. I am certainly interested.

Bob MacNeal said...

Glad to see that you too have discovered WolframAlpha. I marvel at what they have on that website - and it's only going to get better and better over time.

Have you listened to Stephen Wolfram's TED talk? If not, see

Ergun Çoruh said...

Thanks Bob. Yes I have listened to the video. It is amazing how Wolfram turns dull statistical analysis into a fun experience. I guess the key must be 'empowerment of the user'.