In a one of a square of 2 × 2 square grid sits a stone, that randomly moves to the remaining squares with equal probabilities.
What is Expected number of moves taken to return to original square?
Bonus: Generalize for n Sided larger square where stone has equal probability of jumping to ANY of Remaining Squares
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.
Rolling a dice with probability 1/3 three times does not result in a probability 1 but instead 1-(2/3)^3 for getting the starting position at least once.
And, even if it was somehow guaranteed that after at most 4 steps you reach the original position (which is not!), then the expected number of steps would be <4, because in some cases it only takes 2 or 3 steps.
That's what I thought Jonathan, so you can roll the die to infinity without ever falling back to the starting square, well obviously the limit of (1-2/3**k) when k tends towards + infinity is 0 but you get the idea. 👍
Log in to reply
'Roll the die to infinity without ever falling back', in fact the opposite, it says just '4' moves. It's an elementary take on Expected Value.
It all boils down to calculating the infinite sum
3 1 ∑ n = 2 ∞ n ( 3 2 ) n − 2 = 4
Now, Probability returning to original square at any point P = n 2 − 1 1
E = ∑ (Number of moves to return) × (Probability that it returns in that many moves)
E = 1 × 0 + 2 × n 2 − 1 1 + 3 × ( n 2 − 1 n 2 − 2 ) × n 2 − 1 1 + 4 × ( n 2 − 1 n 2 − 2 ) 2 × n 2 − 3 1 + … ∞
E = r = 2 ∑ ∞ r × ( n 2 − 1 n 2 − 2 ) r − 2 × n 2 − 1 1
Apply A.G.M. summation to get
E = n 2
For n = 2
E = 4
I wanted to do that but well with this technique you get the most probable result, I think: that's what the question implied for me.
Log in to reply
I didn't understand your question can you please elaborate? :)
I might be wrong, the way I read the solution, I think you haven't included the move where it leaves the starting position.
Log in to reply
Actually, i have included it. In that case, probability is 1 , so no issues for that move. :)
It was included in the first term and not others for shortening the solution. :)
Let us start by labelling the smaller squares.
Let the one in which stone sits = A
The square Right to A = B
The square Left to A = C
The square Diagonally opposite to A = D
Let the expected number of moves taken to reach A from any i square = E i
From,say, B expected number of moves can be 1(with P = 1 / 3 )
,Or it could equal to E ( C ) + 1 (with P = 1 / 3 ) (1 is added as our exp. value would have increased by 1 if we go to C)
,Or it could be E ( D ) + 1 (with P = 1 / 3 )
By total expectation E ( B ) = ( 1 ) ( 1 / 3 ) + E ( C ) + 1 ( 1 / 3 ) + E ( D ) + 1 ( 1 / 3 )
The key is to realize that E ( B ) = E ( C ) = E ( D ) as all the conditions are same for these squares as from any of these squares there is a 1/3 probability of returning to A and a 2/3 probability of going to other 2 squares.
Thus, E ( B ) = E ( C ) = E ( D ) = 3
But we are not done yet as we started at A .
From A we can go to B ( and increase exp. value by 1) or to C ( and increase exp. value by 1) or to D ( and increase exp. value by 1) (all with equal probabilities)
So, E ( A ) = ( E ( B ) + 1 ) ( 1 / 3 ) + ( E ( C ) + 1 ) ( 1 / 3 ) + ( E ( D ) + 1 ) ( 1 / 3 )
So, E ( A ) = 4
I hope you can now generalize it yourself :)
In this picture the letters represents the expected number of moves from given place.
A
B
C
D
=
1
+
2
1
B
+
2
1
C
=
1
+
2
1
D
=
1
+
2
1
D
=
1
+
2
1
B
+
2
1
C
You can see
A
=
D
,
B
=
C
:
A
B
=
1
+
B
=
1
+
2
1
A
⟹
2
1
A
=
2
⟹
A
=
4
Consider a related problem: suppose we toss a fair 6 -sided die and stop when a ' 1 ' or a ' 2 ' is observed. This describes a geometric distribution.
A geometric distribution with parameter p stops after k steps with probability p ( 1 − p ) k − 1 . And the expected number of steps observed is p 1 . See the wiki for details about this distribution.
With p = 3 1 , the expected number of steps needed to get back to the first step after leaving it is 3 . Add one for the initial step, and the answer to the problem is 4 .
Problem Loading...
Note Loading...
Set Loading...
From the first place, the stone can move to any other three places. After it goes there, there is one in 'three blank units' chance that it'll go to the starting point, no matter where it goes, if it's not the starting position, the probability of getting to the starting position is one in three, 3 1 . We want to reach a probability of 100% (probability of 1) in getting to the starting position, so we'll roll the dice x amount of times such that
3 1 ∗ x = 1
Or x = 3
(This is not the actual probability, but a way to calculate the expected value)
Since total moves also include the first move where it leaves the starting position, we'd have to roll a total of 3 + 1 = 4 times.
Using the same logic the formula for a square with n unit as its side with one unit square containing the stone is,
n 2 − 1 1 1 + 1 → n 2