= Solution
A <geometric distribution> with parameter $p$ on $\{1,2,\ldots\}$ has <probability mass function>
$$
\boxed{P(X=n)=(1-p)^{n-1}p,\qquad n\geq1.}
$$
It counts the trial on which the first success occurs in independent trials with success <probability> $p$. Its <probability generating function> is $ps/[1-(1-p)s]$. Differentiating at $s=1$ gives
$$
EX=\frac1p,\qquad \operatorname{Var}X=\frac{1-p}{p^2}.
$$
This support convention is important: a count of failures before the first success would start at zero.
Back to article page