Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I compute the pmf of a random sum(1 to N) of iid bernoulli random variables, where N is distributed geometrically?

share|cite|improve this question
I suppose pmf stands for probability mass function. – Aryabhata Oct 19 '10 at 13:42
up vote 2 down vote accepted

Let $S = \sum_{i=1}^{N} X_i$ be the random sum that you are interested in. $X_i$ are the iid Bernoulli random variables. To compute the probability that the random sum $S$ equals an integer $s$, use the law of total probability as follows:

$P(S=s) = \sum_{n=1}^{\infty} P(S=s \mid N=n) P(N=n)$.

Once we condition on $N = n$, the sum of $n$ iid Bernoulli random variables is easy to compute (the answer will be another familiar distribution). Since $P(N=n)$ follows the geometric law, we can compute both the terms of the product and then compute the infinite sum.

share|cite|improve this answer
Is it possible to obtain a closed form for the resulting infinite sum? – user2617 Oct 19 '10 at 4:40
@user2617: Yes, I was able to get a closed form. – Dinesh Oct 19 '10 at 4:54

if $N$ is independent of the bernoulli sequence, you have what is called a compound distribution. the pmf can be obtained by conditioning: if $X$ is the [random] sum,

$P(X = k | N = n) = {\rm bin}(k,n,p) = {\binom{n}{k}}p^k(1-p)^{n-k}.$

if $N$ is geometric-$t, P(N = n) = (1- t)t^n, n = 0,1,\dots .$


$P(X=k, N=n) = \binom{n}{k}p^k(1-p)^{n-k}(1-t)t^n.$

now sum out $n$ for $n \ge k$ to get

$P(X=k) = \sum_{n=k}^\infty \binom{n}{k}p^k(1-p)^{n-k}(1-t)t^n$

$= p^kt^k(1-t)\sum_k^\infty \binom{n}{k}[(1-p)t)]^{n-k}$

$= (pt)^k(1-t)\sum_{m=0}^\infty \binom{m+k}{k}[(1-p)t)]^m$

$=(pt)^k(1-t)(1- (1-p)t)^{-(k+1)}$


so $ X \sim {\rm geom}-\frac{pt}{1-t+pt}.$

share|cite|improve this answer
Isn't the pmf of a geometric series (1-t)^(n-1)*t ? – user2617 Oct 19 '10 at 5:07
@user2617 - It depends on whether the geometric random variable takes values from $0,1,\dots$ or from $1,2,\dots$. The distribution you have in the comment corresponds to the former one. But in the context of your problem, the later version is more meaningful. – Dinesh Oct 19 '10 at 6:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.