There is a urn with $2$ red balls, $1$ blue ball and $1$ green ball. John draws a ball three balls, one turn at a time, and after each turn he returns the ball to its urn.
Let $B, R, G$ be the number of blue, red, green balls are drawn respectively.
Calculate: $\operatorname{Var}_{P}(B-R)=E[(B-R)^{2}]-(E[B-R])^{2}$
I am struggling on the first term because $E[(B-R)^{2}]=E[B^2]-2E[BR]+E[R^{2}]$
and I know how to treat $E[B^2]$ and $E[R^2]$ once I have computed $E[B]$ and $E[R]$. But I am stuck on $E[BR]$, I cannot say $E[BR]=E[B]E[R]$ since $B$ and $R$ are definitely not independent. How can I treat this?
You are probably aware of the formula for E(BR) being the following:
$$E(BR) = \displaystyle \sum_B \sum_R b r P(B=b \cap R=r)$$
Therefore, I will guess that you are either having problems determining $P(B=b \cap R=r)$.
For that joint distribution, here are some facts relevant to determining what the distribution is: There is a fixed number of independent trials. Each trial has more than 2 mutually exclusive events. Each of those events have a fixed probability that does not change. That is the definition of the Multinomial Distribution.
In this case, we have 3 mutually exclusive events for each trial. The trial could red, blue, or green. The probability of a single trial being red is 1/2, the probability for blue is 1/4, and the probability for green is 1/4. The number of trials is 3, because we are drawing balls 3 times with replacement. That gives us $r+b+g=3$. We are interested in $r$ and $b$ right now, so we can solve for $g$ in terms of those other 2: $g=3-r-b$. That gives us all of the information we need to insert into the pmf of the multinomial distribution:
$$P(B=b \cap R=r) = \dfrac{3!}{b!r!(3-b-r)!}\left(\dfrac{1}{4}\right)^b\left(\dfrac{1}{2}\right)^r\left(\dfrac{1}{4}\right)^{3-r-b}$$
Substituting... $$E(BR) = \sum_{b=0}^{3}\sum_{r=0}^{3-b}br\dfrac{3!}{b!r!(3-b-r)!}\left(\dfrac{1}{4}\right)^b\left(\dfrac{1}{2}\right)^r\left(\dfrac{1}{4}\right)^{3-r-b}$$
From here, you just have to check each of the combinations of b and r. As a hint, there are 10 total possibilities, but only 3 of them have non-zero values for both b and r. That means you only have to calculate the probability 3 times before summing it up to get the expected value.
With all that said, there is a much easier way to calculate $\text{Var}(B-R)$. In the multinomial distribution, $\text{Cov}(X_i,X_j)=-np_ip_j$ for $i\ne j$.
The covariance we are interested in is $\text{Cov}(B,R) = -(3)(1/4)(1/2)$.
Having that formula, it is fairly simple to get the final answer. Just remember this variance identity:
$$\text{Var}(B-R) = \text{Var}(B) - 2\text{Cov}(B,R) + \text{Var}(R)$$
You can get the covariance from the formula I shared for the multinomial distribution, you can get the 2 variances by using the variance formula for the binomial distribution.