\problemdata       % Takes 5 *mandatory* arguments
  {variance-facts}         % latex-friendly label for the prob.
  {variance,expectation}   % The topic(s) of the problem content.
  {}                       % Source (if known)
  {S02 cp12F-4}            % Usage (list ones you are aware of).
  {Nick Matsakis, S02}     % Last revision info (author, date).

\begin{problem}
Let $R:S\rightarrow \naturals$ be a random variable.
\begin{problemparts}
\problempart
Let $R'=cR$ for some positive constant~$c$.
If $\variance{R} = v$, what is $\variance{R'}$?
\solution{
\begin{eqnarray*}
\variance{R'} 
& = & \expect{{R'}^2} - \expectsq{R'} \\
& = & \expect{(cR)^2} - \expectsq{cR} \\
& = & \expect{c^2R^2} - c^2\expectsq{R} \\
& = & c^2\expect{R^2} - c^2\expectsq{R} \\
& = & c^2 v \\
\end{eqnarray*}
}
\problempart
If $\expect{R}=1$, how large can $\variance{R}$ be?

\solution{
The variance of R is unbounded. Suppose we let $R$ be a random variable
parameterized on $n$. $R$ takes on the value $n$ with probability $1/n$ and 0 otherwise. For all $n$, $\expect{R} = n/n = 1$ as required.  However, 

\[
\variance{R} = \expect{R^2} - \expectsq{R}= \frac{n^2}{n} - 1
\]

This quantity can grow arbitrarily large with $n$.  For a different
distribution, the variance can actually be \emph{infinite} and not
just unbounded.  Consider the random variable $R$ taking values over
$\set{0, 1, 2, \dots}$ with
\begin{eqnarray*}
\pr{R=i}&=&\frac{1}{i^3\zeta(2)}~~~~\forall i\geq 1\\
\pr{R=0}&=&1-\frac{\zeta(3)}{\zeta(2)}
\end{eqnarray*}
With $\zeta$ being the Reimann Zeta function,
\[
\zeta(k)=\sum_{i=1}^\infty\frac{1}{i^k}
\]
It's easy to see that this sum converges for $k>1$ and is strictly
decreasing in $k$, so $\frac{\zeta(3)}{\zeta(2)}<1$.  (Incidentally
$\zeta(2)=\frac{\pi^2}{6}=1.644...$ and $\zeta(3)=1.202...$).

$R$ is a well defined random variable since
\begin{eqnarray*}
\sum_{i=0}^\infty\pr{R=i}&=&\pr{R=0}+\sum_{i=1}^\infty\pr{R=1}\\
&=&1-\frac{\zeta(3)}{\zeta(2)}+\sum_{i=1}^\infty\frac{1}{i^3\zeta(2)}\\
&=&1-\frac{\zeta(3)}{\zeta(2)}+\frac{\zeta(3)}{\zeta(2)}=1
\end{eqnarray*}
Also
\begin{eqnarray*}
\expect{R}&=&\sum_{i=0}^\infty i\pr{R=i}\\
&=&0\left(1-\frac{\zeta(3)}{\zeta(2)}\right)+\sum_{i=1}^\infty\frac{i}{i^3\zeta(2)}\\
&=&0+\frac{1}{\zeta(2)}\sum_{i=1}^\infty\frac{1}{i^2}=1
\end{eqnarray*}
But
\begin{eqnarray*}
\variance{R}&=&\expect{(R-\expect{R})^2}\\
&=&\sum_{i=0}^\infty (i-1)^2\pr{R=i}\\
&>&\sum_{i=2}^\infty (i-1)^2\pr{R=i}=\sum_{i=2}^\infty
\frac{(i-1)^2}{i^3\zeta(2)}\\
&>&\sum_{i=2}^\infty\frac{(i-1)^2}{(i-1)^3\zeta(2)}=\frac{1}{\zeta(2)}\sum_{i=2}^\infty\frac{1}{i-1}=\infty\\
\end{eqnarray*}
From divergence of the harmonic series.
}

\problempart
If $R$ is always positive (nonzero), how large can $\expect{1/R}$ be?

\solution{ 
$\expect{1/R}$ is maximized at 1 when $R = 1$ with probability $1$.
Intuitively, this can be seen by trying to shift some of the
probability mass away from $1$.  No matter how you do it, you will
always wind up with an expectation that is less than $1$.

Formally, we can prove this as follows. Suppose $\pr{R=1} = 1-\delta$
for some $\delta > 0$. Then
\begin{eqnarray*}
\expect{R}
& = & 1\cdot(1-\delta) + \sum_{i=2}^{\infty}\frac{1}{n}\cdot \pr{R=n}\\
& \leq & 1\cdot(1-\delta) + \sum_{i=2}^{\infty}\frac{1}{2}\cdot \pr{R=n}\\
& \leq & 1\cdot(1-\delta) + \frac{1}{2}\sum_{i=2}^{\infty}\pr{R=n}\\
& \leq & 1\cdot(1-\delta) + \frac{1}{2}\cdot\delta\\
& \leq & 1-\delta\cdot\frac{3}{2}.\\
\end{eqnarray*}

So, for any positive $\delta$, $\expect{R}$ is less than 1. Therefore,
the given distribution maximizes $\expect{1/R}$.  }

\end{problemparts}
\end{problem}
