Paper 2, Section I, F

Probability
Part IA, 2012

Define the probability generating function G(s)G(s) of a random variable XX taking values in the non-negative integers.

A coin shows heads with probability p(0,1)p \in(0,1) on each toss. Let NN be the number of tosses up to and including the first appearance of heads, and let k1k \geqslant 1. Find the probability generating function of X=min{N,k}X=\min \{N, k\}.

Show that E(X)=p1(1qk)E(X)=p^{-1}\left(1-q^{k}\right) where q=1pq=1-p.