<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\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) &amp; = &amp; np(ps+q)^{n-1} &amp; G'(1) &amp; = &amp;
np = E(X) \\ G''(s) &amp; = &amp; n(n-1)p^2(ps+q)^{n-2} &amp; G''(1) &amp; = &amp;
n(n-1)p^2\end{array}$$
\begin{eqnarray*} Var X &amp; = &amp; n{n-1}p^2 +
np - (np)^2 \\ &amp; = &amp; np - np^2  =  np(p-1) =  npq
\end{eqnarray*}



\end{document}
</pre></body></html>