Variance of a random sum of random variables using generating functions.

generating-functionsprobabilityprobability theoryvariance

Let $\{X_i\}_{i \in N}$ and $T$ be independent random variables taking non-negative integer values such that the $X_i$ are identically distributed. Suppose the $X_i$ have distribution $\{P_k^X\}_{k \in N} $. Let $$g_X(z) = \sum_{k \in N} z^k P_k^X$$ be the generating function of the $X_i$ (so that $g'_X(1)= E[X]=\mu_X$) and $g_T$ for $T$. Define the random variable Z as $$Z(w)=\sum_{i=1}^{T(w)} X_i$$
I have shown that $g_Z(z)=g_T(g_X(z))$, so $E[Z]=E[T] E[X]$. I want to find the variance of $Z$ using its generating function. So, I first showed that for any random variable $X$, $$\sigma^2_X=g''_X(1)+g'_X(1)-g'_x(1)^2$$
We have that $$g'_Z(z)=g'_T(g_X(z)) g'_X(z) $$ and $$g''_Z(z)=g''_T(g_X(z))g'_X(z)^2 + g''_X(z)g'_T(g_X(z))$$
So, $$\sigma^2_Z=g''_Z(1)+g'_Z(1)-g'_Z(1)^2$$ $$=(\mu_{T^2} – \mu_T)(\mu_X)^2 + (\mu_{X^2}-\mu_X)\mu_T + \mu_X \mu_T – (\mu_T)^2 (\mu_X)^2$$
$$=\mu_{T^2}(\mu_X)^2 – \mu_T (\mu_X)^2 + \mu_{X^2} \mu_T – (\mu_T)^2(\mu_X)^2$$
However, I don't know if this is correct. Maybe I'm making some mistake when differentiating or something. I would appreciate some help identifying where I have errors if there are any.

Best Answer

If $T$ and the $X_i$ are independent, the Wald-Identity should be the result of your calculation:

$$\text{Var}(Z) = \text{Var}(T)(\mathbb{E}[X_0])^2 + \mathbb{E}[T]\text{Var}(X_0)$$

Your just one step away from this in your calculation ;)

Hope this helps, Peter

EDIT: This is actually the Blackwell-Girschick Identity or second Wald-Identity