\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}


{\bf Question}

Find the p.g.f. for a binomial $B(n,p)$ random variable, and use
it to find the mean and variance.


\vspace{.25in}

{\bf Answer}

For $j = 0$ to $n,$ $p_j = \left( \begin{array}{c} n \\ j
\end{array} \right) p^jq^{n-j} \hspace{.2in} (p+q)=1$

So $\ds G(s) = \sum_{j=0}^n\left( \begin{array}{c} n \\ j
\end{array} \right) p^jq^{n-j}s^j = (ps+q)^n$
$$\begin{array}{rclrcl} G'(s) & = & np(ps+q)^{n-1} & G'(1) & = &
np = E(X) \\ G''(s) & = & n(n-1)p^2(ps+q)^{n-2} & G''(1) & = &
n(n-1)p^2\end{array}$$
\begin{eqnarray*} Var X & = & n{n-1}p^2 +
np - (np)^2 \\ & = & np - np^2  =  np(p-1) =  npq
\end{eqnarray*}



\end{document}
