Deriving binomial distribution from a recurrence.

607 Views Asked by At

Let $X_n, n\geqslant1$ be iid random variables with distribution $\mathbb P(X_1=1)=p = 1 - \mathbb P(X_1=0)$. Let $S_0=0$ and $S_n=\sum_{i=1}^n X_i$, $n\geqslant1$. Let $q_{n,k}=\mathbb P(S_n=k)$, for $n\geqslant 1$ and $1\leqslant k\leqslant n$. We can verify by conditional probability that $q_{n,k}$ satisfies the recurrence $$q_{n+1,k} = pq_{n,k-1} + (1-p)q_{n,k}. $$ The goal is to solve this recurrence using generating functions. Let $$P_n(s)=\mathbb E[s^{S_n}] = \sum_{k=0}^n q_{n,k}s^k$$ be the generating function of $S_n$. Then multiplying both sides of the recurrence by $s^k$ and summing over $k\geqslant 1$, we get $$\sum_{k=1}^{n+1} q_{n+1,k}s^k = p\sum_{k=1}^{n+1} q_{n,k-1}s^k + (1-p)\sum_{k=1}^{n+1} q_{n,k}s^k. $$ The left-hand side is $P_{n+1}(s)-(1-p)^{n+1}$ and right-hand side $psP_n(s) + (1-p(P_n(s)-(1-p)^n)$. Solving for $P_{n+1}(s)$ we get $$P_{n+1}(s) = (1- p + ps)P_n(s). $$ Since $P_1(s)=1 - p + ps$ it is clear from induction that $$P_{n+1}(s) = (1-p+ps)^{n+1},$$ so that $S_n$ has a $\operatorname{Bin}(n,p)$ distribution. Is this correct?