Probability – Proof of Sum of Two Independent Geometric Random Variables

probabilitystatistics

If $X$ and $Y$ are independent geometric random variables, $X \sim G(p)$ and $Y \sim G(q)$ then if $Z = X+Y$ I need to show that:

$$P[Z=z] = \frac{pq}{p-q}[(1-q)^{z-1}-(1-p)^{z-1}]$$

My attempt:
\begin{align}
P[Z=z] &= \sum_{k=1}^z P[X=k]P[Y=z-k] && \text{(not sure of my summation limits here)} \\
&= \sum_{k=1}^z p(1-p)^{k-1} \cdot q(1-q)^{z-k-1} \\
&= \frac{pq}{(1-p)}\cdot \frac{(1-q)^z}{(1-q)}\cdot\sum_{k=1}^z (\frac{1-p}{1-q})^k \\
&= \frac{pq}{(1-p)}\cdot \frac{(1-q)^z}{(1-q)} \cdot \frac{1-(\frac{1-p}{1-q})^k}{1-\frac{1-p}{1-q}} \\
&= \frac{pq}{(1-p)}\cdot \frac{(1-q)^z}{(p-q)} \left[1 -(\frac{1-p}{1-q})^k\right] \\
&= \frac{pq}{p-q}\left[\frac{(1-q)^z}{1-p} – \frac{(1-p)^z}{1-p}\right]
\end{align}

The result is pretty close to the answer. The only discrepancy is the first expression in the parentheses, $\frac{(1-q)^z}{1-p}$ which should be $\frac{(1-q)^z}{1-q}$.

Could someone please have a look at my working and show me where I have gone wrong? Or perhaps a neater calculation? Thanks!

PS
I did check similar questions answered here, but couldn't find anything relevant to my problem.
Is the sum of two independent geometric random variables with the same success probability a geometric random variable?
How to compute the sum of random variables of geometric distribution

Best Answer

I think you made a mistake in the calculation. First geometric random variable is at least 1, hence $z\ge 2$.

\begin{align*} P[Z=z] &= \sum_{k=1}^{z-1} P[X=k]P[Y=z-k]\\ &=\sum_{k=1}^{z-1} p(1-p)^{k-1} \cdot q(1-q)^{z-k-1}\\ &=\frac{pq}{(1-p)} (1-q)^{z-1}\sum_{k=1}^{z-1} (\frac{1-p}{1-q})^k \\ &=\frac{pq}{(1-p)} (1-q)^{z-1} \cdot \frac{1-p}{1-q}\frac{1-(\frac{1-p}{1-q})^{z-1}}{1-\frac{1-p}{1-q}}\\ &=\frac{pq}{p-q} (1-q)^{z-1} \cdot [1 -(\frac{1-p}{1-q})^{z-1}]\\ &=\frac{pq}{p-q}[(1-q)^{z-1} - (1-p)^{z-1}], \end{align*} which is the desired result.