# Thread: Expected Value/Variance, multivariate

1. ## Expected Value/Variance, multivariate

Suppose that tosses of a biased coin which come sup heads with probability 1/4 are independent. The coin is tossed 40 times and the number of heads X is counted. The coin is then tossed X more times.
a) Determine the expected total number of heads.
b) Determine the variance of the total number of heads.

My solution so far:
Let X1 be the total number of heads after the 40 first tosses. Let X2 be the total number of heads in the next set of tosses.

a) X1 ~ bin(1/4, 40) and X2 ~bin(1/4, x1)

E(X1 + X2) = E(X1) + E(X2) = 10 + 2.5 = 12.5

b) I am stuck here. If I use
var(X1+X2) = var(X1) + var(X2) +2cov(X1,X2)

How can I get cov(X1,X2)?
Cov[X,Y] = E[X1X2]-E[X1]E[X2] But what is E[X1X2]?

If I made a mistake in the first part please let me know about that too.
Thanks

2. Originally Posted by EitanG
Suppose that tosses of a biased coin which come sup heads with probability 1/4 are independent. The coin is tossed 40 times and the number of heads X is counted. The coin is then tossed X more times.
a) Determine the expected total number of heads.
b) Determine the variance of the total number of heads.

My solution so far:
Let X1 be the total number of heads after the 40 first tosses. Let X2 be the total number of heads in the next set of tosses.

a) X1 ~ bin(1/4, 40) and X2 ~bin(1/4, x1)

E(X1 + X2) = E(X1) + E(X2) = 10 + 2.5 = 12.5

b) I am stuck here. If I use
var(X1+X2) = var(X1) + var(X2) +2cov(X1,X2)

How can I get cov(X1,X2)?
Cov[X,Y] = E[X1X2]-E[X1]E[X2] But what is E[X1X2]?

If I made a mistake in the first part please let me know about that too.
Thanks
I can't help right now but I will note for others reading this thread that $\displaystyle E(X_2) = \frac{10}{4}$ can be found by first defining $\displaystyle X_2 = \sum_{i = 1}^{X_1} Y_i$ where $\displaystyle Y_i$ is a Bernoulli random variable and then using Wald's equation.