You throw a dice until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that
all throws gave even numbers.

Here are direct links to Kalai’s two blog posts on the problem:

It is fun to click through to the first Kalai blog post linked above to cast your vote for the answer if you haven’t seen the problem before.

We actually started the project today by doing that:

Next we rolled some 6-sided dice to see how this game worked. I note seeing the video that a few of the rolls went off camera, sorry about that đź™‚

At the end we discussed what we saw and why what we found was a little surprising.

The next part of the project was having the boys play the game off camera until they found 5 rolls meeting the criteria.

After this exercise the boys started to gain some confidence that the answer to the problem was 3/2.

Now I walked them through what I think is the easiest solution to understand. It comes from a comment on the first Gil Kalai’s blog post linked above:

Listening to this discussion now, I wish I would have done a better job explaining this particular solution. Still, I hope the discussion is instructive.

Finally, we went to Mathematica to evaluation the sum from the last video and then to explore the problem via a short program I wrote.

At the end of this video the boys some up their thoughts on the problem.

I love this problem. It isn’t that often I run across a clever problem that is interesting for both professional mathematicians and kids. Those problems are absolute

## Comments

Love your video. It was like hanging out with you and your kids for the morning!

Here’s how I wrote the problem in JavaScript:

function rollDie() {

return Math.floor(Math.random() * (7 – 1) + 1);

}

function allEven(arr) {

for (var i = 0; i < arr.length; i += 1) {

if (arr[i] % 2 !== 0) {

return false;

}

}

return true;

}

function rollsToSix() {

var rollResults = [];

var sixRolled = false;

while (sixRolled === false) {

var roll = rollDie();

if (roll === 6) {

rollResults.push(6);

sixRolled = true;

} else {

rollResults.push(roll);

}

}

console.log(rollResults);

return rollResults;

}

function howManyPositiveResults(attempts) {

var positiveResults = 0;

for (var i = 0; i < attempts; i += 1) {

var resultOfRoll = allEven(rollsToSix());

if (resultOfRoll === true) {

positiveResults += 1;

}

}

return positiveResults;

}

console.log(howManyPositiveResults(1000000));

Not surprising, my results get the same answer as you guy’s.

Found you via Nassim Talebs tweet. Thanks for the morning math fun.