Archive for the ‘Math’ Category

PostHeaderIcon Kids, ping-pong balls: it’s all the same.

A Facebook friend of mine recently challenged his readers to solve this puzzle:
"I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?"

The "born on a Tuesday" makes for an surprisingly interesting twist, but since I’d like to keep THAT part for a later blog post (in which I hope to convince Dr. Dylan Evans that he is wrong), I’m going to simplify the puzzle to:

"I have two children. One is a boy. What is the probability I have two boys?"

Quite a few people answered: 50% (50-50, 1 in 2).
They were (rightly) informed they were wrong.
Then some people insisted they were right, demanded to be shown how it could NOT be 50% and someone even put a nice amount of money on the answer being 50%.
Unfortunately Dr. Evans didn’t further comment (ignoring the low hanging fruit: that monetary offer), and I posted that I would devote a blog post to it, showing (for free!) WHY the answer is NOT: 50%

The people arguing in favor of 50% are in good company though: their reasoning is also often applied in another famous puzzle: "The Monty Hall problem"  that almost everybody gets wrong; even a genius like Paul Erdős initially got this wrong!

I will try to explain what the correct answer is by describing a simple experiment. Even if one doesn’t ‘buy’ or ‘get’ the explanation, simply doing the experiment will be convincing.
For the programmers amongst you, you can also write a simple short program that models the problem: this is how I verified my solution to the Monty Hall problem: it’s VERY convincing (and satisfying) when you see the probability number getting closer and closer to your prediction as the number of iterations over the event increases rapidly!

Before we start: we are allowed to assume that the chance of getting a boy is equal to the chance of getting a girl.

Here we go:
The argument of the "50%" people usually goes something like this:
He has one boy. Therefore the other kid is EITHER a boy, or a girl. The chances of getting either a boy or a girl are the same. There are NO other options. So, how on earth can the chance of getting a kid of certain sex NOT be 1 in 2 (= 50%)?
It’s a fairly intuitive answer, and it’s easy to see why people are even willing to put money on it.
But it’s wrong.

The first thing one needs to understand is this:
The fact that an event has only TWO possible outcomes does NOT necessarily mean that the PROBABILITY of both outcomes are equal!
This is easy to see when I present you with a bowl filled with 1000 ping-pong balls. Each ping-pong ball is either white or black. (if you want to actually DO the following experiment, and don’t have 1000 ping pong balls, use matches, and give the ‘black’ ones a mark with a pen.)
Now I ask you to take (without looking) ONE ball from the bowl.
Note AGAIN that there are ONLY two outcomes here: that ball is either white, or it is black.
So if I ask you what the probability is that the ball you picked is white (this is essentially the same situation as with the kids), would you AGAIN say: "50%"?
You’d be VERY right if you’d answer: well, that depends! It depends on the ratio of white balls to the total number of balls in the bowl: if there are 500 white balls and 500 black balls in the bowl, then yes, the chance of picking a white one is indeed 50%.
But if the bowl contains 999 black balls and only 1 white ball, then your chance of picking that one white ball is NOT 50%! It is a chance of 1 in a 1000, or 0.1%.
In that last case, there are still ONLY two possible outcomes: white or black, but the CHANCE of you picking the white one, while not 0 (meaning: it IS possible), is most definitely not 50%!

A short word to those who would still claim that even in the last case (999 black, 1 white) the chance is still 50%, because: "Hey, there IS a white ball in there, so .. I either grab it, or I don’t: 50-50 chance".
Try applying that to participating in a lottery: Hey, I’ve got a 50% chance of winning the $10,000,000: I either win it, or I don’t, no other possibilities: 50% chance!
We need to keep in mind here what is MEANT by the probability of an outcome of an event. Simply put, the probability of that outcome is the number of occurrences of that outcome when we repeat that event often.
So, while we can then apply that number to a single event’s outcome, (like for instance the chance of winning that lottery, or picking that white ball), that same number is derived from considering what WOULD happen if we replayed our event over and over again. In other words, if you say something has a chance of 50% of happening, then that means, that when you repeat the event often, that ‘something’ happens about 50% of the time, and the more often you repeat the event, the closer to 50% it gets.
Another example: if we throw a die only ONE time, then the PROBABILITY that a given number comes up is NOT 50-50, but 1 out of 6, BECAUSE when we WOULD throw that die MANY times, 1/6 of the times that number would come up.
If you claim that you have a 50% chance of winning the lottery, then what that means (not what you WANT it to mean!) is that if you play that lottery MANY times, you win half of them. Unfortunately, that’s seldom the case with real lotteries, especially the ones with $10,000,000 prizes.

Back to the problem at hand, and let’s rephrase it in terms of a bowl with balls. Since we were allowed to assume that it’s as likely to get a boy as it is to get a girl, we will emulate that ‘equality’ by using equal numbers of white and black balls. Since we also know that probability numbers become more ‘accurate’ with bigger numbers of events, lets put 500 white and 500 black balls  in the bowl.
The problem can now be stated as "I grab two balls from the bowl. One is white. What is the chance I got two white balls". The only difference with the ‘kid’ problem is that we can actually PERFORM this experiment.

So let’s do the experiment: grab two balls. there are only three possibilities: 2 whites, 2 blacks, 1 white and 1 black.
Put each pair on their own stack (bb, ww, mixed). Do that for all 1000 balls in the bowl.
So now we have stacks of possible pairs.
All we have to do is count the number of white-white pairs and express that as a ratio of total pairs.
But before we do that, we have to deal with the extra information we were given!
What’s the chance, in the problem scenario, that we picked TWO black balls? That chance is of course ZERO! Because we were told that one of the balls was white!
So we can now simply dispose of the stack of black-black pairs: they don’t play a roll in this problem.
So, now count all the white-white pairs (which is, of course, the entire white-white stack, and none in any other stack), and express them as a percentage of the number of pairs in both the white-white and mixed-color stacks.
That percentage would of course be 50% .. if, and only if, both stacks would be equal in size.
But when you have actually PERFORMED this experiment (and belonged to the "50%" folks), you are now staring at the AMAZING fact that the mixed-color stack is TWICE as large as the white-white stack!

SO, what happened? Where did we go wrong? How did the mixed-color stack end up twice as big as the white-white (and black-black for that matter) stack?
The problem is that for probabilities ‘order’ (as in ‘sequence’) is important.
When counting ‘possible outcomes’ black-white is NOT the same as ‘white-black’, these are two different outcomes. EVEN if that order doesn’t play a role in your problem.
You can see this be grabbing the pairs of balls by using TWO hands: one ball in each. You then make FOUR stacks: black-black, black(in right hand)-white(in left hand), white(in right hand)-black(in left hand), white-white. Another method is to first pick one ball (chance 1/2 it’s white), then pick another ball (change it’s white: also 1/2, total chance 1/2 * 1/2 = 1/4: do that for all combinations, and you’ll get four different combinations, each with a chance of 1/4) and place THOSE pairs in stacks where B-W is a different stack than W-B.
(If you would be using these different possible outcomes for different problems, like, say, forming binary numbers, where white = 0, and black = 1, then it would be easy to see that 01 would be a completely different outcome than 10, as where 00 and 11 would be the same regardless of order of individual bits, so  ‘order’ is important for determining possible outcomes).
You will now see that you have FOUR equally sized stacks op pairs of balls. You may then conclude, that 1) the stack B-B can go (since we were given information that one ball was white), and b) that for YOUR problem there’s no meaningful difference between B-W and W-B pairs, so you can lump them together, but then the resulting stack will be twice as big as the original stacks.
(Of course you don’t HAVE to lump them together, you will then have THREE equally sized stacks, with only the white-white stack containing white-white pairs, or, 1/3 of all pairs is white-white)
You will now SEE (even if you still don’t believe or follow the explanation) that 1/3 of all pairs is white-white.
So if you now put all those pairs back in the bowl, you have, of course, a chance of 1/3 to grab a white-white pair. (simply because 1/3 of all pairs in the bowl IS white-white)
Not 50-50!

And if you’re STILL not convinced: I’d LOVE to play some poker matches with you! 😉

Next time: we’ll add the ‘born on a Tuesday’ clause and have some fun with THAT!

(So, please, no comments on the “Tuesday” part on this post)

PostHeaderIcon Numbers

Here’s another quiz:

Consider a list of naturally occurring numbers. And by naturally occurring is meant numbers like for example stock prices, number of inhabitants of cities, your electricity bills of the past few years, prices on your Saturday grocery receipt, lengths of rivers, number of books in the bookcases of all your friends, you name it.

The question then is about how often a particular digit appears as the first digit of the numbers in such a list.

Let’s take for example the digit ‘1’. The question then becomes: how often (in %) will ‘1’ be the first digit of these numbers in a given list? Or to put the same question differently: How many numbers in that list (in % of the total number of numbers) start with a ‘1’?

Hint: keep in mind the first category this post is published in!

PostHeaderIcon … Another spousal conversation


… just not one of mine …

… but it certainly and easily could have been one!

The following is a quote from a book I just finished (and recommended earlier: this is how chapter 21 starts in “The Black Hole War” by the renowned theoretical (theoradical!) physicist Leonard Susskind).

I post it here, because this is a perfect example of the type of conversations my wife and I sometimes have.

One morning, when I went down to breakfast, my wife Anne, remarked that my T-shirt was on backwards; the V shape woven into the fabric was in the back. Later in the day, when I came home from a jog, she laughed and said: “Now it’s inside out.” That set me to thinking: how many ways are there to wear a T-shirt? Anne mockingly said, “That’s the sort of stupid thing you physicists are always thinking about.” Just to prove my superior cleverness, I quickly declared that there are 24 ways to wear a T-shirt. You can stick your head through any of 4 holes. That leaves 3 holes for your torso. Having picked a neck hole and a torso hole, that leaves 2 possibilities for your left arm. Once you decide where your left arm goes, there is only one choice for your  right arm. So that means 4 x 3 x 2 = 12 ways to choose from. But then you can turn the shirt inside out, giving another 12, so I proudly announced that I had solved the problem: 24 ways to wear a T-shirt. Anne was not impressed. She replied, “No, there are 25 ways. You forgot one.” Puzzled I asked, “What did I miss?” With a look that would freeze hell, she said, “You can roll it in a ball and shove it …” You get the idea 1.

1. Since writing this, Anne has discovered at least 10 more ways to wear a T-shirt.

Sometimes … you just can’t win.

PostHeaderIcon Elementary, Dear Data

In episode 29 of the Star Trek series “The Next Generation”, the holodeck computer generates a character from the Sherlock Holmes novels by Arthur Conan Doyle: the villainous Professor Moriarty.

The interesting twist is that this holographically created image, at some point, starts to realize that he, in fact, IS a computer generated entity, and not the actual human being he is supposed to represent.

A remarkable feat! Only outdone by his success in actually leaving the holodeck.

I found that a very interesting episode, mostly because I have often thought along those lines myself (and who hasn’t?) .. what IF? What IF we were just part of a computer simulation? Could it be we’re just somebody’s (cruel) science project? Could it be that the universe as we perceive it, is just a hologram?

As I recently found out, scientifically, this is maybe not such a crazy nutjob idea after all.

The idea more or less started when the Dutch physicist (and Nobel laureate) Gerard van ‘t Hooft proposed his holographic principle, which, simply put, states that all information in a three dimensional space can be mapped onto a two dimensional boundary surface of that space. Or, to turn that around, the information described on a two dimensional surface can be projected in a three dimensional ‘holograph’.

The American scientist (who started his career at age thirteen as a plumber) Leonard Susskind developed that idea further.  If you find the idea of a holographic universe intriguing, you may consider getting yourself his book An Introduction To Black Holes, Information And The String Theory Revolution: The Holographic Universe [Update: Disclaimer: This book is NOT exactly a ‘popular science’ book: it’s chockful of ‘higher’ mathematics! WAY over my head.].

Or, for a quick introduction, read the August, 2003 article in Scientific American by Professor Jacob Bekenstein.

Fascinating stuff, and I wish I would understand ten percent of it. [Update: Now that I have thumbed through the above mentioned book – that I no longer recommend for lay persons like myself – I have to humbly adjust that percentage from 10 to 1]


“Computer … resume program!”
[Update: Instead of the book mentioned above I WOULD recommend two of Leonard Susskind’s books that ARE written for the lay person. See below.]

The Black Hole War: My Battle with Stephen Hawking to Make the World Safe for Quantum Mechanics

The Cosmic Landscape: String Theory and the Illusion of Intelligent Design

PostHeaderIcon Infinities (1)

Suppose there is a people somewhere that has not yet been corrupted by what we like to call civilization.

Their mathematical skills allow them to count up to five, but not beyond. Anything over 5 is considered ‘many’.

Does that mean they consider all collections of over 5 items as quantitively equal?

No, of course not. They fully realize that there are different kinds of ‘many’: a handful of peanuts is not quite as ‘many’ as a bucket full of peanuts!

Somewhat similarly, ‘civilized’ mathematicians have come to realize that there are different kinds of infinities. Even though we can’t count them, we know that there are infinite sets that differ in ‘size’.

But things get a bit weird when it comes to infinities.

Take for instance the infinite set of all integers.

It’s obvious, and one can also show mathematically, that the set of all EVEN integers is as ‘big’ (or strong) as the set of all ODD integers.

To get you to think a bit about infinities, I’ll end this short introductory post to a (finite!) set of posts on infinities here with a small ‘test’.

I intend to explain later where I’m going with all this. For now, I’d like to keep it simple.

Let ‘I’ be the set of all integers, ‘E’ the set of all EVEN integers and ‘S(s)’ the size  of set ‘s’.
What can be said about the size of I?

Answers 1)
a. S(I) < S(E)
b. S(I) = S(E)
c. S(I) > S(E)
d. Huh?

Bonus question:
What is the most dangerous remark in the above post, especially with regards to the correct answer?

1) For the equation challenged:
Is the set of all integers a) smaller, b) equal or c) larger than the set of all even intergers, or d) no clue?

PostHeaderIcon 666

749For a long time, Judeo-Christian people have considered the number 666 to be the mark of The Beast (The Devil Himself).

Interestingly, it now appears that this number once had a lower value: 616 to be exact.


In May 2005, it was reported that scholars at Oxford University using advanced imaging techniques[9] had been able to read previously illegible portions of the earliest known record of the Book of Revelation, from the Oxyrhynchus site, Papyrus 115 or P115, dating to the mid to late third century. The fragment gives the Number of the Beast as 616 (chi, iota, stigma), rather than the majority text 666 (chi, xi, stigma).[1] The other early witness Codex Ephraemi Rescriptus (C) has it written in full: hexakosiai deka hex(lit. six hundred sixteen).[10]

Significantly, P115 aligns with Codex Alexandrinus (A) and Codex Ephraemi Rescriptus (C) which are generally regarded as providing the best testimony to Revelation. Thus, P115 has superior testimony to that of P47 which aligns with Codex Sinaiticus and together form the second-best witness to the Book of Revelation. This has led some scholars to conclude that 616 is the original number of the beast

This means that the devil’s number is subject to inflation!

Which made me wonder what the devil’s number is TODAY.

So, after two years of focussing my considerable mathematical knowledge and skills on this problem I can now reveal the 21st century value of the number of The Beast.

It’s …


(I’m SO sorry for the folks in Reeves, Louisiana:,2933,318765,00.html)

PostHeaderIcon Highschool math .. or .. The Power of Nothing

math dummiesWe all know from our highschool math classes that:

1. x0 = 1 for any value of x (not very intuitive, but easy to prove)


2. 0x = 0 for any value of x

Considering rule 1 and 2: what, then, is the value of