The Randy Hall Problem¶

Fiddler¶

You are a producer on a game show hosted by Randy “Random” Hall (no relation to Monty Hall). The show has three doors labeled 1 through 3 from left to right, and behind them are various prizes.

Contestants pick one of the three doors at which to start, and then they press an electronic button many, many times in rapid succession. Each time they press the button, they either stay at their current door or move to an adjacent door. If they’re at door 2 and move to an adjacent door, that new door will be 1 or 3 with equal probability.

Randy has decided that when a contestant presses the button while at door 2, there should be a 20 percent chance they remain at door 2.

As the producer, you want the chances of a contestant ultimately winding up at each of the three doors to be nearly equal after many button presses. Otherwise, mathematicians will no doubt write you nasty letters complaining about how your show is rigged.

If a contestant presses the button while at door 1 (or door 3), what should the probability be that they remain at that door?

Solution¶

I solved a more general problem where :

  • $x$ is the probability that they remain at door 2.
  • $z$ is the probability that they remain at door 1 (or door 3).

The following state transition diagram summarizes the problem:

Looking at the Markov Chain the end distribution can be represented as,

$$\pi_\infty = \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right]$$

and transition matrix can be represented as,

$$T = \left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-x}{2} & x & \dfrac{1-x}{2} \\ 0 & 1-z & z \end{matrix} \right]$$

Solving for many button presses... \begin{align*} \\ \pi_\infty &= \pi_\infty T\\ \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right] &= \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right]\left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-x}{2} & x & \dfrac{1-x}{2} \\ 0 & 1-z & z \end{matrix} \right] \\ \\ \left[\begin{matrix} 1 & 1 & 1 \end{matrix} \right] &= \left[\begin{matrix} z + \dfrac{1-x}{2} + 0 & (1-z) + x + (1-z) & 0 + \dfrac{1-x}{2} + z \end{matrix} \right] \\ \\ &= \left[\begin{matrix} -\dfrac{x}{2}+z+\dfrac{1}{2} & x-2z+2 & -\dfrac{x}{2}+z+\dfrac{1}{2} \end{matrix} \right] \\ \end{align*}

Both $1 = -\dfrac{x}{2}+z+\dfrac{1}{2}$ and $1 = x-2z+2$ yield $$\boxed{z = \dfrac{x}{2}+ \dfrac{1}{2}}$$

Answer¶

For $x = 0.2$,

$$z = 0.6 = \boxed{60\%}$$

Extra Credit¶

Randy has an updated suggestion for how the button should behave at door 2. What hasn’t changed is that if a contestant at door 2 and moves to an adjacent door, that new door will be 1 or 3 with equal probability.

But this time, on the first, third, fifth, and other odd button presses, there’s a 20 percent the contestant remains at door 2 (if they happen to be there). On the second, fourth, sixth, and other even button presses, there’s a 50 percent chance the contest remains at door 2 (again, if they happen to be there).

Meanwhile, the button’s behavior at doors 1 and 3 should in no way depend on the number of times the button has been pressed.

As the producer, you want the chances of winding up at each of the three doors—after a large even number of button presses— to be nearly equal.

If a contestant presses the button while at door 1 (or door 3), what should the probability be that they remain at that door?

Solution¶

I solved a more general problem where :

  • $x$ is the probability that they remain at door 2 on odd presses.
  • $y$ is the probability that they remain at door 2 on even presses.
  • $z$ is the probability that they remain at door 1 (or door 3).

The following state transition diagram summarizes the problem :


even presses are in grey

Looking at the Markov Chain the end distribution can be represented as,

$$\pi_\infty = \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right]$$

and transition matrixes can be represented as,

$$T = \left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-x}{2} & x & \dfrac{1-x}{2} \\ 0 & 1-z & z \end{matrix} \right]\left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-y}{2} & y & \dfrac{1-y}{2} \\ 0 & 1-z & z \end{matrix} \right]$$

Solving for many button presses... \begin{align*} \\ \pi_\infty &= \pi_\infty T\\ \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right] &= \left[\begin{matrix} \dfrac{1}{3} & \dfrac{1}{3} & \dfrac{1}{3} \end{matrix} \right]\left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-x}{2} & x & \dfrac{1-x}{2} \\ 0 & 1-z & z \end{matrix} \right]\left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-y}{2} & y & \dfrac{1-y}{2} \\ 0 & 1-z & z \end{matrix} \right] \\ \\ \left[\begin{matrix} 1 & 1 & 1 \end{matrix} \right] &= \left[\begin{matrix} -\dfrac{x}{2}+z+\dfrac{1}{2} & x-2z+2 & -\dfrac{x}{2}+z+\dfrac{1}{2} \end{matrix} \right]\left[\begin{matrix} z & 1-z & 0 \\ \dfrac{1-y}{2} & y & \dfrac{1-y}{2} \\ 0 & 1-z & z \end{matrix} \right] \\ \\ \left[\begin{matrix} 1 \\ 1 \\ 1 \end{matrix} \right] &= \left[\begin{matrix}\left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)z + (x-2z+2)\left(\dfrac{1-y}{2}\right) + \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)0\\ \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)(1-z) + (x-2z+2)y + \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)(1-z) \\ \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)0 + (x-2z+2)\left(\dfrac{1-y}{2}\right) + \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}\right)z \end{matrix} \right]\\ \\ &= \left[ \begin{matrix} \left(-\dfrac{1}{2}xz+z^2+\dfrac{1}{2}z\right) + \left(\dfrac{1}{2}x-z+1-\dfrac{1}{2}xy+yz-y \right) + 0 \\ \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}+\dfrac{1}{2}xz-z^2-\dfrac{1}{2}z\right) + (xy-2yz+2y) + \left(-\dfrac{1}{2}x+z+\dfrac{1}{2}+\dfrac{1}{2}xz-z^2-\dfrac{1}{2}z\right) \\ 0 + \left(\dfrac{1}{2}x-z+1-\dfrac{1}{2}xy+yz-y \right) + \left(-\dfrac{1}{2}xz+z^2+\dfrac{1}{2}z\right) \end{matrix} \right] \\ \\ &= \left[ \begin{matrix} z^2 + z\left(-\dfrac{1}{2}x + y -\dfrac{1}{2}\right) + \left(-\dfrac{1}{2}xy+\dfrac{1}{2}x-y+1\right) \\ -2z^2 + z\left(x -2y + 1\right) + \left(xy-x+2y+1\right) \\ z^2 + z\left(-\dfrac{1}{2}x + y -\dfrac{1}{2}\right) + \left(-\dfrac{1}{2}xy+\dfrac{1}{2}x-y+1\right) \end{matrix} \right] \\ \end{align*}

Both $z^2 + z\left(-\dfrac{1}{2}x + y -\dfrac{1}{2}\right) + \left(-\dfrac{1}{2}xy+\dfrac{1}{2}x-y+1\right) = 1$ and $-2z^2 + z\left(x -2y + 1\right) + \left(xy-x+2y+1\right) = 1$ yield
$$\boxed{0 = 2z^2 + z\left(-x +2y - 1\right) + \left(-xy+x-2y\right)}$$

Answer¶

For $x = 0.2$ and $y = 0.5$,

\begin{align*} 0 &= 2z^2 + z\left(-0.2 + 2(0.5) - 1\right) + \left(-(0.2\cdot 0.5) + 0.2 - 2(0.5)\right) \\ &= 2z^2 + -0.2z - 0.9 \\ &= 20z^2 - 2z - 9 \\ z &= \boxed{\dfrac{1+\sqrt{181}}{20} \approx 72.268\%} \\ \end{align*}

There will be a boundary when $b^2-4ac = 0$, separating real and imaginary solutions for $z$. Since $a = 2$, $b = -x + 2y - 1$, and $c = -xy + x - 2y$,
\begin{align*} 0 &= b^2 -4ac \\ &= (-x + 2y - 1)^2 - 4\cdot 2\cdot (-xy + x - 2y) \\ &= (x^2 + 4y^2 +1 - 4xy + 2x - 4y) + (8xy-8x+16y) \\ &= \boxed{x^2 + 4xy + 4y^2 -6x + 12y + 1} \\ \end{align*}

There will be also be a boundary when $4ac = 0$, separating 1 positive and 2 positive solutions.
\begin{align*} 0 &= 4ac \\ &= - 4 \cdot 2 \cdot (-xy + x - 2y) \\ &= \boxed{xy - x + 2y} \\ \end{align*}

Here is the graph in 3 dimensions.

Rohan Lewis¶

2025.11.10¶

Code can be found here.