5 The random variable \(X\) has the binomial distribution \(\mathrm { B } ( n , p )\).
- Write down an expression for \(\mathrm { P } ( \mathrm { X } = \mathrm { r } )\) and hence show that the probability generating function of \(X\) is \(( \mathrm { q } + \mathrm { pt } ) ^ { \mathrm { n } }\), where \(\mathrm { q } = 1 - \mathrm { p }\).
- Use the probability generating function of \(X\) to prove that \(\mathrm { E } ( \mathrm { X } ) = \mathrm { np }\) and \(\operatorname { Var } ( \mathrm { X } ) = \mathrm { np } ( 1 - \mathrm { p } )\). [5]