# Blackwell-Girshick equation

The Blackwell-Girshick equation is an equation in probability theory that allows for the calculation of the variance of random sums of random variables. It is the equivalent of Wald's lemma for the expectation of composite distributions.
It is named after David Blackwell and Meyer Abraham Girshick.

## Statement

Let $N$ be a random variable with values in $\mathbb {Z} _{\geq 0}$, let $X_{1},X_{2},X_{3},\dots$ be independent and identically distributed random variables, which are also independent of $N$, and assume that the second moment exists for all $X_{i}$ and $N$. Then, the random variable defined by
    $Y:=\sum _{i=1}^{N}X_{i}$
has the variance
    $\operatorname {Var} (Y)=\operatorname {Var} (N)\operatorname {E} (X_{1})^{2}+\operatorname {E} (N)\operatorname {Var} (X_{1})$.
The Blackwell-Girshick equation can be derived using conditional variance and variance decomposition. If the $X_{i}$ are natural number-valued random variables, the derivation can be done elementarily using the chain rule and the probability-generating function.

## Proof

For each $n\geq 0$, let $\chi _{n}$ be the random variable which is 1 if $N$ equals $n$ and 0 otherwise, and let $Y_{n}:=X_{1}+\cdots +X_{n}$. Then
    ${\begin{aligned}\operatorname {E} (Y^{2})&=\sum _{n=0}^{\infty }\operatorname {E} (\chi _{n}Y_{n}^{2})\\&=\sum _{n=0}^{\infty }\operatorname {P} (N=n)\operatorname {E} (Y_{n}^{2})\\&=\sum _{n=0}^{\infty }\operatorname {P} (N=n)(\operatorname {Var} (Y_{n})+\operatorname {E} (Y_{n})^{2})\\&=\sum _{n=0}^{\infty }\operatorname {P} (N=n)(n\operatorname {Var} (X_{1})+n^{2}\operatorname {E} (X_{1})^{2})\\&=\operatorname {E} (N)\operatorname {Var} (X_{1})+\operatorname {E} (N^{2})\operatorname {E} (X_{1})^{2}.\end{aligned}}$
By Wald's equation, under the given hypotheses, $\operatorname {E} (Y)=\operatorname {E} (N)\operatorname {E} (X_{1})$. Therefore,
    ${\begin{aligned}\operatorname {Var} (Y)&=\operatorname {E} (Y^{2})-\operatorname {E} (Y)^{2}\\&=\operatorname {E} (N)\operatorname {Var} (X_{1})+\operatorname {E} (N^{2})\operatorname {E} (X_{1})^{2}-\operatorname {E} (N)^{2}\operatorname {E} (X_{1})^{2}\\&=\operatorname {E} (N)\operatorname {Var} (X_{1})+\operatorname {Var} (N)\operatorname {E} (X_{1})^{2},\end{aligned}}$
as desired.$^{:§5.1,Theorem5.10}$

## Example

Let $N$ have a Poisson distribution with expectation $\lambda$, and let $X_{1},X_{2},\dots$ follow a Bernoulli distribution with parameter $p$. In this case, $Y$ is also Poisson distributed with expectation $\lambda p$, so its variance must be $\lambda p$. We can check this with the Blackwell-Girshick equation: $N$ has variance $\lambda$ while each $X_{i}$ has mean $p$ and variance $p(1-p)$, so we must have
    $\operatorname {Var} (Y)=\lambda p^{2}+\lambda p(1-p)=\lambda p$.

## Application and related concepts

The Blackwell-Girshick equation is used in actuarial mathematics to calculate the variance of composite distributions, such as the compound Poisson distribution. Wald's equation provides similar statements about the expectation of composite distributions.

## Literature

* For an example of an application: Mühlenthaler, M.; Raß, A.; Schmitt, M.; Wanka, R. (2021). "Exact Markov chain-based runtime analysis of a discrete particle swarm optimization algorithm on sorting and OneMax". Natural Computing: 1–27.