Lesson 27 Expected Value of a Product


Theorem 27.1 (Expected Value of a Product) If \(X\) and \(Y\) are independent random variables, then \[\begin{equation} E[XY] = E[X] E[Y]. \tag{27.1} \end{equation}\] In fact, if \(X\) and \(Y\) are independent, then for any functions \(g\) and \(h\), \[\begin{equation} E[g(X)h(Y)] = E[g(X)] E[h(Y)]. \tag{27.2} \end{equation}\]

Example 27.1 (Xavier and Yolanda Revisited) In Lesson 25, we calculated \(E[XY]\), the expected product of the numbers of times that Xavier and Yolanda win. There, we used 2D LOTUS. Now, let’s repeat the calculation using Theorem 27.1.

You might be tempted to multiply \(E[X]\) and \(E[Y]\). However, this is wrong because \(X\) and \(Y\) are not independent. Every time Xavier wins, Yolanda also wins. So we cannot apply Theorem 27.1 directly.

We can express the number of times Yolanda wins as: \[ Y = X + Z, \] where \(Z\) is the number of wins in the last two spins of the roulette wheel. Now, \(X\) and \(Z\) are independent. Furthermore, we know that \(X\) is \(\text{Binomial}(n=3, N_1=18, N_0=20)\), and \(Z\) is \(\text{Binomial}(n=2, N_1=18, N_0=20)\).

Therefore, \[\begin{align*} E[XY] &= E[X(X + Z)] & \text{(by the representation above)} \\ &= E[X^2 + XZ] & \text{(expand expression inside expected value)} \\ &= E[X^2] + E[XZ] & \text{(linearity of expectation)} \\ &= E[X^2] + E[X]E[Z] & \text{(by independence of $X$ and $Z$ and \ref{eq:ev-product})} \end{align*}\]

Now, \(X\) and \(Z\) are binomial, so there is a simple formula for their expected value: \[\begin{align*} E[X] &= n\frac{N_1}{N} = 3\frac{18}{38} \\ E[Z] &= n\frac{N_1}{N} = 2\frac{18}{38}. \end{align*}\] The only non-trivial part is calculating \(E[X^2]\). However, we showed in Examples 24.3 and 26.4 that for a binomial random variable \(X\), \[ E[X(X-1)] = n(n-1) \frac{N_1^2}{N^2}. \] Since \(E[X(X-1)] = E[X^2 - X] = E[X^2] - E[X]\), we can solve for \(E[X^2]\): \[\begin{align*} E[X^2] &= E[X(X-1)] + E[X] \\ &= n(n-1) \frac{N_1^2}{N^2} + n\frac{N_1}{N} \end{align*}\] For the number of bets that Xavier wins, \[ E[X^2] = 3(2)\frac{18^2}{38^2} + 3\frac{18}{38}. \]

Putting it all together, we get \[ E[XY] = 3(2)\frac{18^2}{38^2} + 3\frac{18}{38} + \left( 3\frac{18}{38} \right) \left( 2\frac{18}{38} \right) \approx 4.11, \] which matches the answer from Lesson 25.

Essential Practice

  1. Consider the following three scenarios:

    • A fair coin is tossed 3 times. \(X\) is the number of heads and \(Y\) is the number of tails.
    • A fair coin is tossed 4 times. \(X\) is the number of heads in the first 3 tosses, \(Y\) is the number of heads in the last 3 tosses.
    • A fair coin is tossed 6 times. \(X\) is the number of heads in the first 3 tosses, \(Y\) is the number of heads in the last 3 tosses.

    In Lesson 25, you showed that \(E[X + Y]\) was the same for all three scenarios, but \(E[XY]\) was different. In light of Theorems 26.2 and 27.1, explain why this makes sense.

  2. Two fair dice are rolled. Let \(X\) be the outcome of the first die. Let \(Y\) be the outcome of the second die. Calculate the expected ratio between the numbers on the two dice, \(\displaystyle E[X / Y]\). (You can use Theorem 27.1, since \(X\) and \(Y\) are independent. However, be careful because \(E[X / Y] \neq E[X] / E[Y]\).)

    What is \(E[Y / X]\)? Why does this seem paradoxical?

  3. At Diablo Canyon nuclear plant, radioactive particles hit a Geiger counter according to a Poisson process with a rate of 3.5 particles per second. Let \(X\) be the number of particles detected in the first 2 seconds. Let \(Y\) be the number of particles detected in the second after that (i.e., the 3rd second). Find \(E[XY]\).