# Find the variance using the Law of total variance

Let a bacteria which behaves in one of two following ways: In the end of the day it may die but bring $2$ descendants with the probability of $p$ or die without bringing any descendants with the probability $1-p$. Let $X_k$ be the number of terms after $k$ days (And $X_0 = 1$). Find $\text{Var}(X_{k+1})$.

I already showed the following using induction: $E[X_{k+1} | X_k] = 2pX_k$ and $E[X_k] = (2p)^k$.

I'm trying to find the variance using the Law of total variance:

$$V(X_{k+1}) = V(E(X_{k+1}|X_k)) + \color{Red}{E(V(X_{k+1}|X_k))}$$

How to evaluate the red part?

This is a Galton-Watson branching process. Using generating functions, you can show that $\operatorname{Var}(X_{k+1})= \mu^2\operatorname{Var}(X_k) + \mu^k\sigma^2$, where $\mu$ and $\sigma^2$ are the mean and variance of $X_1$. To solve that recurrence, show that $$\operatorname{Var}(X_{k+1}) = \mu^k\sigma^2\sum_{i=0}^k \mu^k,$$ and consider the cases when $\mu=1$ and $\mu\neq 1$.