Why is $E[X_{A \text{ or } B}]$ equal to half the harmonic mean of $E[X_A]$ and $E[X_B]$?

86 Views Asked by At

[In the title I was attempting to reference a relationship similar to that of two resistors in parallel, i.e. $\dfrac{1}{R} = \dfrac{1}{R_1} + \dfrac{1}{R_2}$; if there's a name for such a relationship please let me know and I'll edit the title.]

This question arose from an answer I recently wrote to a dice-rolling question; I'll add a link to it at the bottom but here's a a quick summary: The original question asked what the expected number of rolls of a fair 6-sided die would be until one gets either a $1$ or two consecutive $6$'s; it also noted that the expected numbers of rolls for each of those two events considered separately are $6$ and $42$ respectively.

As it turned out, the answer to that question was $\dfrac{21}{4}$, which struck me as being somehow related to the two previously-mentioned expected values, and pretty quickly a surprising (to me, anyway) connection popped up.

Let $X_A$ be the number of rolls taken until a $1$ appears, $X_B$ the number of rolls until two consecutive $6$'s appear, and $X_{A \text{ or } B}$ the number of rolls until either a $1$ or two consecutive $6$'s appear. Then it turned out that

$$\frac{1}{\mathbb{E}[X_{A \text{ or } B}]}=\frac{1}{\mathbb{E}[X_A]}+ \frac{1}{\mathbb{E}[X_B]}$$

Trying to make sense of this, the first thing that came to mind was that if somehow these reciprocals of expected values could be thought of as probabilities, then the equation would essentially be $\Pr(A \text{ or } B)$ for mutually exclusive events, which these particular $A$ and $B$ are.

The only such relationship I know of is for geometric probability distributions, where we have $\mathbb{E}[X] = \dfrac{1}{p}$; the probability distribution of the number of rolls until a $1$ appears is of course geometric, but I can't see how either of the other two are. Despite that, I tried to make sense of $\frac{1}{42}$ as a probability related to rolling two consecutive $6$'s and couldn't; I also checked whether there was some property of expected values I was unfamiliar with that would explain this but came up empty.

So is there an explanation for this relationship between these expected values?

[Here's the link to the original question.]

1

There are 1 best solutions below

2
On

I'll make the problem a little more general. Suppose that we have a weighted dice, and we roll a $1$ with probability $p$, and a $6$ with probability $q$ (with $0 < p, q < 1$, and $p + q < 1$).

As you already said in your question, we know that $X_A$ is a geometric random variable so $$\mathbb{E}[X_A] = \frac{1}{p}.$$

Now we calculate $\mathbb{E}[X_B]$. Let the sequence of rolls be $R_1, R_2, \dots$. Conditioning on the first three rolls and using the law of total expectation, we have \begin{align*} \mathbb{E}[X_B] =\ &\mathbb{E}[X_B | R_1 \neq 6]\Pr(R_1 \neq 6) \ + \\ &\mathbb{E}[X_B | R_1 = 6, R_2 \neq 6]\Pr(R_1 = 6, R_2 \neq 6) \ + \\ &\mathbb{E}[X_B | R_1 = 6, R_2 = 6]\Pr(R_1 = 6, R_2 = 6). \end{align*} If we fail to get a $6$ on the first roll then we are back to square one but we've wasted one roll, so $$\mathbb{E}[X_B | R_1 \neq 6] = \mathbb{E}(X_B) + 1,$$ and clearly $\Pr(R_1 \neq 6) = 1-q$.

If we get a $6$ on the first roll but then don't get a $6$ on the second roll we are back to the start but we've wasted two rolls, so $$\mathbb{E}[X_B | R_1 = 6, R_2 \neq 6] = \mathbb{E}[X_B] + 2,$$ and also $\Pr(R_1 = 6, R_2 \neq 6) = q(1-q)$.

Finally, if we roll two 6s straight away then we are finished so $$\mathbb{E}[X_B | R_1 = 6, R_2 = 6] = 2,$$ and $\Pr(R_1 = 6, R_2 = 6) = q^2$.

Putting all of this together we get $$\mathbb{E}[X_B] = (\mathbb{E}[X_B] + 1)(1 - q) + (\mathbb{E}[X_B] + 2)q(1-q) + 2q^2.$$ Quite a lot of the terms cancel out to give $$\mathbb{E}[X_B] = \frac{1 + q}{q^2}.$$

Now, to calculate $\mathbb{E}[X_{A \text{ or } B}]$. We have \begin{align*} \mathbb{E}[X_{A \text{ or } B}] =\ &\mathbb{E}[X_{A \text{ or } B} | R_1 = 1]\Pr(R_1 = 1) \ + \\ &\mathbb{E}[X_{A \text{ or } B} | R_1 \notin \{1,6\}]\Pr(R_1 \notin \{1,6\}) \ + \\ &\mathbb{E}[X_{A \text{ or } B} | R_1 = 6]\Pr(R_1 = 6). \end{align*}

Using similar reasoning from before we have \begin{align*} &\mathbb{E}[X_{A \text{ or } B} | R_1 = 1] = 1, &\Pr(R_1 = 1) = p, \\ &\mathbb{E}[X_{A \text{ or } B} | R_1 \notin \{1,6\}] = \mathbb{E}[X_{A \text{ or } B}] + 1, &\Pr(R_1 \notin \{1,6\}) = 1 - p - q, \\ &\mathbb{E}[X_{A \text{ or } B} | R_1 = 6] = \mathbb{E}[X_{A \text{ or } B}](1 - p - q) + 2, &\Pr(R_1 = 6) = q. \end{align*}

Putting this all together we get $$\mathbb{E}[X_{A \text{ or } B}] = p + (\mathbb{E}[X_{A \text{ or } B}] + 1)(1 - p - q) + (\mathbb{E}[X_{A \text{ or } B}](1 - p - q) + 2)q.$$ Again we get a lot of cancellations to give $$\mathbb{E}[X_{A \text{ or } B}] = \frac{1 + q}{p + pq + q^2}.$$

We then calculate $$\frac{1}{\mathbb{E}[X_A]}+ \frac{1}{\mathbb{E}[X_B]} = p + \frac{q^2}{1+q} = \frac{p + pq + q^2}{1 + q} = \frac{1}{\mathbb{E}[X_{A \text{ or } B}]}.$$

If $B$ had just been another geometric (e.g. stop when we reach the first $6$) it would have been much easier to show this - the probability of terminating each time would just be $p+q$, so we would have had $\mathbb{E}[X_{A \text{ or } B}] = 1/(p + q)$ and it would have been straightforward to show the equality. But for your choice of $A$ and $B$, I can't think of an easier way to show the relationship.