\documentclass[12pt]{article}
\usepackage{fullpage,amsmath,amsfonts}

\usepackage[homework]{quizmachine}


\def\e{{\mathrm e}}

\begin{document}

\title{Engineering and Science Mathematics 2B}
\author{Homework 10 - Quiz Only!}
\date{Quiz dates are Tuesday, May 14 or Thursday, May 16}

\quizleft{ESM 2B}
\quizcenter{Quiz 10}
\quizright{May 14/16, 2013}

\hwpreamble{\noindent
Normal questions and advanced questions (A) are worth $5$ points; easy
questions (E) are worth $4$ points.  Complete either the easy, or the
advanced version, not both.}

\defproblem{Consider an infinite sequence of independent trials which
result in \emph{success} with probability $p$ and in \emph{failure}
with probability $q=p-1$.

Let $X$ be the number of trials required to obtain the first success.
Find $P(X=n)$, i.e., the probability that $n$ trials are required to
obtain the first success.}

\defproblem{Consider an infinite sequence of independent trials which
result in \emph{success} with probability $p$ and in \emph{failure}
with probability $q=p-1$.

Let $X$ be the number of failures before the $r$th success.  Find
$P(X=n)$, i.e., the probability that there are $n$ failures before the
$r$th success.}

\defproblem{Show that the moment generating function for the binomial
distribution is given by
\[
  M(t) = E[\e^{tX}] = (p \e^t + q)^n
\]
and use the moment generating function to find $E[X]$.}

\defproblem{In a promotional quiz each player, independently, has the chance
of winning 1\,000 Euros with probability $p$.  It is obviously bad for
the organizer if more than one person wins, but it is also considered
bad for the promotion if nobody wins at all.
\begin{enumerate}
\item With 500 players participating, what is the optimal choice for
$p$, i.e.\ the one that maximizes the chance of exactly one player
winning?

\item For this value of $p$, what is the expected payout?
\end{enumerate}}

\defproblem{Suppose you receive, on average, $5$ emails per hour.
What is the probability of receiving only one mail in one hour?}

\defproblem{ Let $X_1$, $X_2$, \ldots\ be independent discrete random
variables taking values in $\{-\tfrac12, \tfrac12 \}$ with probability
function
\[
  p(-\tfrac12) = q\,, \qquad p(\tfrac12) = (1-q) \,,
\]
and $p(x)=0$ for all other values of $x$.
\begin{itemize}
\item[(E)] Find the expectation for the random variable
\[
  Z_N = \frac{X_1+\dots+X_N}N
\]
as $N \to \infty$.  

\item[(A)] Let $Y_n = 2^{-n} X_n$.  Find the expectation for the
random variable
\[
  Z_N = Y_1+\dots+Y_N 
\]
as $N \to \infty$.  
\end{itemize}}


\quizzes{100}

\end{document}
