Expected value over a grid

250 Views Asked by At

We have a d*d grid, each square of the grid has a probability $p_{i,j}$ of being white, otherwise the square is black. Let X the discrete random variable which gives the number of white squares. What is the expected value of white square ?

$E[X]= \sum_{i=0}^{d^2} i*P(Z=i)$

I think we have :

$P(Z=0)= \prod_{i,j} (1-p_{i,j})$

$P(Z=1)= \sum_{i,j} p_{i,j}*\prod_{n,m} (1-p_{n,m})$ with $n \neq i$ and $m \neq j$

But it seems very difficult to express $P(Z=i)$ for $i>1$. Do you have an idea ? Is it a common law ? Thanks you.

2

There are 2 best solutions below

0
On BEST ANSWER

Define the indicator random variable $U_{ij}$ by $U_{ij}=1$ if square $(i,j)$ is white and by $U_{ij}=0$ otherwise. Then $$X=\sum_{i=1}^d\sum_{j=1}^d U_{ij}.$$ By the linearity of expectation we have $$E(X)=\sum_{i=1}^d\sum_{j=1}^d E(U_{ij}).$$ Finally, $E(U_{ij})=p_{i,j}$.

0
On

Let $B_{i,j}$ be the indicator of the square $(i,j)$ being white. Then the total number of of white square will be equal to $$ Z = \sum_{i=1}^d \sum_{j=1}^d B_{i,j}$$ and the expectation, by linearity, is $$ E[Z] =E\left[\sum_{i=1}^d \sum_{j=1}^d B_{i,j}\right] = \sum_{i=1}^d \sum_{j=1}^d E[B_{i,j}] = \sum_{i=1}^d \sum_{j=1}^d p_{i,j} $$