Brilli The Ant And His Numberline Wall

Brilli the ant starts on a number line at the number 0, and flips a fair coin. If it lands on heads, he goes to the right (+1), but if it lands on tails, Brilli goes to the left (-1). However, there is a wall at the point 1000 -1000 , and as such if Brilli ever finds himself at the point 1000 -1000 , he will always go to the right, regardless of what the result of the coin flip is.

Brilli keeps flipping coins and moving until he eventually reaches the point 100. What is the expected number of times Brilli visited the wall at -1000?


The answer is 100.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Ivan Koswara
May 1, 2016

Relevant wiki: Expected Value - Problem Solving

Let E ( x ) E(x) be the expected number of wall bumps when starting from point x x . We have the following three identities:

  • E ( 100 ) = 0 E(100) = 0 (if we're at 100, we're done)
  • E ( 1000 ) = 1 + E ( 999 ) E(-1000) = 1 + E(-999) (if we're at -1000, we're bumping the wall, and our next step is to -999)
  • E ( x ) = 1 2 ( E ( x 1 ) + E ( x + 1 ) ) E(x) = \frac{1}{2} (E(x-1) + E(x+1)) for 999 x 99 -999 \le x \le 99 (if we're anywhere else, we have equal chances going left or right, and we won't bump the wall midway)

Now, interestingly, we can induct using the second and the third identities to prove that E ( x ) = 1 + E ( x + 1 ) E(x) = 1 + E(x+1) . (Induct from x = 1000 x = -1000 upward.) After obtaining this relation, we can use induction again with the first identity to show that E ( x ) = 100 x E(x) = 100 - x . (Induct from x = 100 x = 100 downward.) We're seeking for the value of E ( 0 ) E(0) , which is 100 0 = 100 100 - 0 = \boxed{100} .


First, it's surprising that the answer is 100, while it looks like the finish is much closer and thus the answer should be tiny. This is intuitively explained by the fact that in the off-chance that we do go left a lot, we will bump the wall many, many times before we finally manage to go back to the right, to the finish line.

More surprisingly, it doesn't matter where the wall to the left of us is; the wall can be at -1, at -1000, or at negative Graham's number, and the expected value is the same. The intuition is similar: apparently, even though the chance of going close to the wall shrinks as we go farther, in that tiny chance that we do go there, the chance of us exiting also shrinks as well, thus we bump the wall many more times that it offsets the probability completely.

Moderator note:

Detailed clear explanation.

What would the answer look like if the goal was 10? Or 1?

Martino Gabra - 5 years, 1 month ago

Log in to reply

The answer is exactly the number of steps away from the goal. (Just change the first identity to E ( goal ) = 0 E(\text{goal}) = 0 and try to solve it; you'll find E ( x ) = goal x E(x) = \text{goal} - x .) If the goal is 1, the answer is 1; if the goal is 10, the answer is 10.

This is somewhat like... something whose name I forgot, but it goes like this: you flip a coin. If you get tails, you walk away with $1. If you get heads, you double your possible winnings (to $2) and flip again. Again, if it's tails, you walk away with your now $2, and if heads, you double it again to $4 and flip again. You keep doing this until you get tails. The tiny probability of lasting long enough is offset by the exponential explosion of the winnings, that the expected value of the entire thing becomes infinite.

Ivan Koswara - 5 years, 1 month ago

Minor point: in your intuitive explanation, you say the chance of getting to the wall shrinks exponentially. It actually shrinks much slower: with a wall at -n and a goal at m, the chance of hitting the wall is m/(n+m).

I do like your proof though. It was certainly different than how I solved this.

Anonymous Anonymous - 5 years, 1 month ago

Log in to reply

That's correct; modified it.

Ivan Koswara - 5 years, 1 month ago

The main idea here is that we can view this as a series of events as well as a compound event, and look at the average of brilli's position before and after each even. Our compound event is brilli reaching the point 100, which has an expected value of 100, while the individual events are (a) brilli flipping the coin at a position other than -1000, which has an expected value of 0, and (b) flipping the coin at position -1000, which has an expected value of 1.

Thus, we have that 100 = (the average number of coin flips on a position other than -1000) * 0 + (the average number of coin flips on position -1000) * 1, and thus it is clear that the average number of coin flip on position -1000 must be 100.

Note that it actually doesn't matter where the wall is, as the only number that really comes into play is how far off Brilli's goal is.

Shouldn't he be hitting the wall at a proportion related to the z distribution- he's more likely hitting 100 much sooner than -1000, why would he hit -1000 100 times?

It would follow that if he stood at 101, he would hit -1000 101 times or if he stood at 1 he hit -1000 1 time. But why is the statistical relationship linear?
Do you mind explaining this differently please?

Martino Gabra - 5 years, 1 month ago

Log in to reply

I agree with you, this does not make sense to me, I understand that it is very hard to get to that 100. But in this way, it is even harder to get to -1000. I don't think this would happen in a practical experiment

Battist Oberhößel - 5 years, 1 month ago

To reach the wall at -1000 brilli must have thrown at least 1000 tails. But as the chances are only 50% to get tails, he would have thrown also around 1000 heads. You are saying that he hits the wall 100 times. So he must have thrown at least 1100 tails. So how the hall would he not reach the 100 finish before hitting the wall even once

Battist Oberhößel - 5 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...