Associated Topics || Dr. Math Home || Search Dr. Math

### Penny-moving Game

```
Date: 06/24/99 at 20:59:07
From: Kathy
Subject: Probability

The numbers 0  1  2  3  4  5  6  7 are on a number line. A penny is
placed on the 3. A fair coin is flipped. If the flip of the coin shows
heads, the penny is moved one space to the left. If the flip of the
coin shows tails, the penny is moved one space to the right.

What is the probability of the penny landing on 0 before it lands
on 7?
```

```
Date: 06/25/99 at 10:52:34
From: Doctor Anthony
Subject: Re: Probability

Since there are equal probabilities of going left or right, the
probabilities are almost certainly in inverse proportion to the
distance from the starting point. So we can expect that the
probabilities of reaching 0 before we reach 7 are in the ratio 4:3.

So the probability of reaching 0 before we reach 7 is 4/7.

We can prove this by a series of linear equations. Suppose that x1 is
the probability of reaching 0 first if we are at position 1, x2 is the
probability of reaching 0 if we are at position 2, and so on. We need
to find the value of x3.

We have

x1 = 1/2 + (1/2)x2

That is, if we are at position 1, there is 1/2 probability of
'winning' and 1/2 probability of moving to position 2 where the
probability of winning is now x2.

So we get the following sequence of six equations:

x1 =   1/2   + (1/2)x2  ......(1)
x2 = (1/2)x1 + (1/2)x3  ......(2)
x3 = (1/2)x2 + (1/2)x4  ......(3)
x4 = (1/2)x3 + (1/2)x5  ......(4)
x5 = (1/2)x4 + (1/2)x6  ......(5)
x6 = (1/2)x5 +  0       ......(6)

The last entry is 0 because if you move to position 7 you can't win.

From these 6 equations with 6 unknowns we can find any of the
probabilities we require.

Working up the list of equations, and putting (6) into (5) we get

x5 = (1/2)x4 + (1/2)(1/2)x5
(3/4)x5 = (1/2)x4
x5 = (2/3)x4

Then from (4)

x4 = (1/2)x3 + (1/3)x4
(2/3)x4 = (1/2)x3
x4 = (3/4)x3

Then from (3)

x3 = (1/2)x2 + (3/8)x3
(5/8)x3 = (1/2)x2
x3 = (4/5)x2

Then from (2)

x2 = (1/2)x1 + (2/5)x2
(3/5)x2 = (1/2)x1
x2 = (5/6)x1

Then from (1)

x1 = 1/2 + (5/12)x1
(7/12)x1 = (1/2)
x1 = 6/7

Then      x2 = (5/6)(6/7) = 5/7

and   x3 = (4/5)(5/7) = 4/7

So we get the result x3 = 4/7 as we predicted.

This method could of course be used if there were a difference in the
probabilities of moving left or right where the simple ideas of method
(1) would not work.

If you are familiar with difference equations you can use the
following method to solve this.

We can make up a linear recurrence relation to find the required
probability.

Let u(n) be the probability that we end up at position 0 before
position 7 when we are at position 'n'.

The recurrence relation is

u(n) = (1/2)u(n-1) + (1/2)u(n+1)

or   u(n+1) - 2.u(n) + u(n-1) = 0

This is a homogeneous difference equation whose solution will be given
by solutions of the quadratic  x^2 - 2x + 1 = 0

(x-1)^2 = 0   or   x = 1 (twice)

So the expression for u(n) will be   u(n) = (A + Bn)1^n
= A + B.n

We have u(0) = 1 and  u(7) = 0  so we get

A + 0.B = 1   ->  A = 1
A + 7.B = 0   ->  B = -1/7

Therefore   u(n) = 1 - n/7

We require u(3) which we can see is 1 - 3/7 =  4/7   as required.

- Doctor Anthony, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Probability

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search