Grid: \(\mathbb{E}[XY]\)

An ant starts at \((0,0)\). Each second it moves Right with probability \(1/3\), Diagonal (up-right) with probability \(1/3\), Up with probability \(1/9\), and stays put with probability \(2/9\). After \(100\) seconds, find \(\mathbb{E}[XY]\), where \((X,Y)\) is the ant's position.

Answer

Let \(X\) be the \(x\)-coordinate and \(Y\) be the \(y\)-coordinate after \(100\) trials.

We see that \(X\) represents the number of times the ant increases its \(x\)-coordinate (Right or Diagonal) in 100 trials, hence

\[ X\sim \mathrm{Bin}\!\left(100,\frac13+\frac13=\frac23\right) \quad\Rightarrow\quad \mathbb{E}[X]=100\cdot\frac23=\frac{200}{3}. \]

Similarly, \(Y\) represents the number of times the ant increases its \(y\)-coordinate (Up or Diagonal) in 100 trials, hence

\[ Y\sim \mathrm{Bin}\!\left(100,\frac19+\frac13=\frac49\right) \quad\Rightarrow\quad \mathbb{E}[Y]=100\cdot\frac49=\frac{400}{9}. \]

Now, the trials \(1,2,\dots,100\) are independent, however both \(X\) and \(Y\) can increase on the same trial (that happens on a Diagonal move). Define indicator r.v.'s

\[ I_i=\mathbf{1}\{\text{\(X\) increases on trial \(i\)}\},\qquad J_i=\mathbf{1}\{\text{\(Y\) increases on trial \(i\)}\}. \]

Then

\[ X=\sum_{i=1}^{100} I_i,\qquad Y=\sum_{j=1}^{100} J_j, \]

so

\[ \mathbb{E}[XY] =\mathbb{E}\!\left[\left(\sum_{i=1}^{100} I_i\right)\left(\sum_{j=1}^{100} J_j\right)\right] =\sum_{i=1}^{100}\sum_{j=1}^{100}\mathbb{E}[I_iJ_j]. \]

There are \(100^2\) terms: \(100\) terms with \(i=j\) (same trial) and \(9900=100^2-100\) terms with \(i\neq j\) (different trials).

  • If \(i=j\), then \(I_iJ_i=1\) exactly when the move is Diagonal, so

    \[ \mathbb{E}[I_iJ_i]=\mathbb{P}(\text{Diagonal})=\frac13. \]
  • If \(i\neq j\), then the trials are independent, so \(I_i\) is independent of \(J_j\) and

    \[ \mathbb{E}[I_iJ_j]=\mathbb{E}[I_i]\mathbb{E}[J_j] =\left(\frac23\right)\left(\frac49\right)=\frac{8}{27}. \]

Therefore,

\[ \mathbb{E}[XY]=100\cdot\frac13+9900\cdot\frac{8}{27} =\frac{8900}{3}. \]
Notes and comments

Comment 1: In general, if \(X\sim\mathrm{Bin}(n,p_1)\) and \(Y\sim\mathrm{Bin}(n,p_2)\) come from the same \(n\) independent trials, then

\[ \mathbb{E}[XY]=n\,\mathbb{P}(I_1=1,J_1=1)+n(n-1)p_1p_2. \]

This holds for both cases where the events defining \(p_1\) and \(p_2\) can happen simultaneously or not.

If they cannot happen simultaneously, then \(\mathbb{P}(I_1=1,J_1=1)=0\) and

\[ \mathbb{E}[XY]=n(n-1)p_1p_2. \]
Back to collection