I was completing revision for an upcoming task and this question was presented. Was hoping for some insight!
The random variable $N$ is discrete, with probability function $$f_N(n)=\begin{cases} p(1-p)^{n-1}, & \text{; n = 1, ...} \\ 0, & \text{; otherwise,} \end{cases}$$ where $0 < p < 1$. The random variables $X_1, X_2, ...$ are independent of $N$ and are independent and identically distributed with probability function $$f_X(k)=\begin{cases} r(1-r)^{k-1}, & \text{; k = 1, ...} \\ 0, & \text{; otherwise,} \end{cases}$$ where $0<r<1$. Find the probability generating function of $$S_N=\sum_{j=1}^N X_j$$ and hence determine the probability function of $S_N$.
Any help is greatly appreciated! I can derive the moment-generating-function just fine but need some guidance. Thanks!
You repeatedly toss two coins with heads probability $r$ and $p$ respectively, until the first coin yields heads. Then, you examine the second coin. If it also yields heads you stop, otherwise start over. Thus the probability function of $S_N$ is geometric with parameter $pr$, that is, $$P(S_N=s)=pr(1-pr)^{s-1} \,.$$