Home > Mathematical Mice, Probability > Mathematical Mice – Part I

Mathematical Mice – Part I

Mrs Farmer is frightened of mice.  One day she finds 3 mice in her kitchen.  She tries to scare them out, but these are no ordinary mice…

Mice Think Dice

Problem:

Mrs Farmer is frightened of mice.  One day, whilst trying to prepare dinner, she finds three mice in her kitchen: a large one, a medium-sized one and a small one. She tries to scare them out but they are Mathematical Mice that will only pass through the door when a dice is rolled.

When the dice shows 1 or 2, the small mouse goes through the door.
When the dice shows 3 or 4, the medium-sized mouse goes through.
When the dice shows 5 or 6, the big mouse goes through.

For example:
Mrs Farmer rolls a 3, so the medium-sized mouse goes through the door.  Next she rolls 5, so the big mouse goes through the door.  Next she rolls 4, so the medium-sized mouse comes back through the door.  Then she rolls 2, so the small mouse leaves.  Finally she rolls a 4, so the medium-sized mouse leaves, and then all three are out of the kitchen.

Can you find a rule for the number of throws that it takes to get out all the mice?

What if there were two mice, or six mice?

Horizontal Line

Some initial comments:

My mother gave me this problem on a half torn, scruffy piece of A5 paper she found on the floor at work.  Being me, I had to have a crack at it.  It looks innocent enough, but you may agree there’s something about it that seems wicked, particularly in the last three words.

It should be noted that Mrs Farmer might get all the mice out within a small number of throws, or it could take her all day, or all week, or, well, forever.   It’s impossible to be certain about how many throws it will take her, but perhaps we can calculate the probability of it taking no more than a particular number of throws and make realistic predictions.  This is the subject of this investigation – probability – and the goal of this post is to show how probability can be applied to make predictions.

A mathematical investigation is the systematic development of a concept with a goal, and as with most investigations it’s useful to consider a basic version of problem just to get the ball rolling, so we will first consider the cases of 1 mouse and then 2 mice, before proceeding to 3 mice and 6 mice later.  With 3 mice, as detailed in the problem, the 6 sides of the die are distributed fairly between them, i.e. 2 numbers each.  With only 2 mice, it would make sense to assume the sides are still fairly distributed – i.e. 3 numbers each – and if there were 6 mice, one number each.

Note: As with all my posts, I have tried to make each of the steps accessible to approximately GCSE standard, but if there are any parts which you don’t quite understand then you will be able to skip over the technicalities without losing the flow of the story, so I urge you to press on!  And there is of course a comments engine at the bottom for you to ask any questions.

Part I: Basic Cases – 1 mouse and 2 mice

This will sound absurdly obvious, but it’ll useful to compare with 2 mice.  With just one mouse, all 6 numbers on the dice will be assigned to that mouse, so when Mrs Farmer rolls the dice it doesn’t matter what number it shows; the mouse will leave the kitchen and she can immediately get on with preparing that lovely roast dinner.  The probability of her having expelled “all the mice” within one throw is 1 or 100% certain.

Now think about the case of two mice.  The small mouse is assigned dice numbers 1, 2 and 3; the large mouse is assigned numbers 4, 5 and 6.

2 Mice + Door + Dice

The first throw will definitely expel one mouse, large or small; it doesn’t matter which mouse, but one of ’em is certainly off outside.  The next throw will either expel the second mouse too, or it will bring the first mouse back into the kitchen, bringing Mrs Farmer back to where she started with “all the mice” still in the kitchen.  Each of those scenarios has a 50-50 chance of occurring. If the second throw of the dice did bring the first mouse back into the room, the next two throws of the dice will follow the same pattern, i.e. the third throw will definitely expel one of the mice and the fourth throw will either bring that mouse back or kick the other one out too.  And so on and so forth.

Written in mathematical terms, we have this:

The probability that Mrs Farmer expels “all the mice” in 2 throws of the dice is: (1 × ½) = ½
The probability that she expels both mice in 4 throws of the dice is: (1 × ½) × (1 × ½) = ¼

Can Mrs Farmer expel all the mice in 3 throws?  No she can’t, because the only possible format of 3 throws of the dice would be for one mouse to leave the kitchen and then return, and then for one mouse to leave the kitchen.  The same goes for 5 throws.  In fact, she can’t solve the problem in an odd number of throws because, assuming she stops throwing the dice if all the mice have been expelled, the only feasible result of an odd number of throws is to have once mouse in and one mouse out.

So, focussing only on even numbers of throws, can you spot the pattern?  What’s the probability of Mrs Farmer expelling all the mice in 6 throws?  Easy – she’d only get to throw the dice a fifth time if the result of the fourth throw was that both mice were in the kitchen again, so the probability of it taking exactly 6 throws is (1 × ½) × (1 × ½) × (1 × ½) .

General Formula for the probability that it takes Mrs Farmer exactly n throws of the dice

Using mathematical shorthand, we might formulate this as follows:

Let d represent the number of throws it takes Mrs Farmer to expel both mice.

P(d=2) = ½  (“Probability that d=2”)
P(d=4) = ¼
P(d=6) = ⅛
P(d=8) = what do you think?

We have enough information now to write a general formula – an “nth term” – for the probability that it takes Mrs Farmer n throws of the dice to expel both mice:

Equation 1: Probability that it takes exactly n throws of the dice
Equation 1: Probability that it takes exactly n throws of the dice

An “nth term” formula like this allows us to quickly answer a question like, for example, “What’s the probability that it takes exactly 24 throws of the dice?”

Eqn2

As you can see, the probability that it takes 24 throws to expel both mice is extremely low, and the formula will tell us that the probabilities of it taking 26, or 28 throws, say, would be even smaller.  What might be a more pertinent figure to calculate is the probability that it takes no more than a certain number of throws.

General Formula for the probability that it takes no more than n throws of the dice

What’s the probability that it takes no more than 4 throws?  Well it could take 2 throws, or 4 throws, so we simply add those probabilities together:

P(d≤4)
= P(d=2) + P(d=4)
=     ½     +     ¼
¾

And, similarly, we would calculate P(d≤6) by adding ½, ¼ and ⅛ together, giving .

The general formula for P(d≤n) can be expressed in two different ways.  We might decide, as we have already done, to add up all the probabilities of it taking fewer than or exactly n throws of the dice.  Expressed using summation notation,

Eqn3

Equation 2i: Probability that it takes no more than n throws of the dice

Or, more simply, we can spot a pattern which allows for a much more efficient computation.  That formula is:

Eqn4

Equation 2ii: Simpler form of Equation 2i

Now to put this result into perspective, let’s think about how it translates into real figures and real predictions of how many throws it will take Mrs Farmer to expel all the mice.  But first, we need to choose a confidence interval.  Remember: although it’s extremely unlikely, Mrs Farmer might be throwing the dice for years on end without success; or she might banish those pesky murines in just a couple of rolls.  We want to be confident that, for example, 9 times out of 10, or 19 times out of 20, Mrs Farmer will expel the mice within n throws of the dice.  If we opt for “9-times-out-of-10” confidence, that’s a 90% confidence interval.  If we opt for “19-times-out-of-20”, that’s a 95% confidence interval.  Of course, we could request 99% confidence or 99.99% confidence; it doesn’t matter, as long as we achieve understandable numerical results and we are consistent when comparing to greater numbers of mice later in the investigation.

We will choose the 95% confidence interval, so we seek to answer the question, “What’s the maximum number of times Mrs Farmer will need to roll the dice for us to be at least 95% sure that all the mice will have been expelled?

In other words, we wish to find the value of n which satisfies Equation 2ii for P(d≤n)=0.95 (we use logarithms here; don’t worry if you’re not familiar with logs).

Eqn5

But we can only have whole number values of n because you can only throw a dice a whole number of times.  Also, as we have established, n cannot be odd, so it is not sufficient to simply round this figure up to 9, nor is it sufficient to round the number down to 8, because if we stick n=8 into Equation 3 we get 0.9375 which does not give us the required 95% confidence.  Therefore we must round the figure up to the next even number, which in this case is n=10, i.e. 10 throws of the dice.

In the next post on this topic we will see how all this translates to the case of 3 mice!

  1. June 4th, 2010 at 20:34 | #1

    Great info, thanks for useful post. I am waiting for more

  2. Laura
    May 3rd, 2010 at 16:01 | #2

    I had to do this 4 HW and I found a pattern, when the numder is odd the number of throws will ALWAYS be odd and if the number even then the answer will ALWAYS be even!!!

  3. January 26th, 2010 at 09:54 | #3

    more of this.great job.

  4. December 19th, 2009 at 16:14 | #4

    This is a very cool page. Keep on keeping on.

  1. No trackbacks yet.