Year: 2007
Paper: 3
Question Number: 12
Course: UFM Statistics
Section: Bivariate data
Difficulty Rating: 1700.0
Difficulty Comparisons: 0
Banger Rating: 1487.4
Banger Comparisons: 1
I choose a number from the integers $1, 2, \ldots, (2n-1)$ and
the outcome is the random variable $N$. Calculate $ \E(N)$ and $\E(N^2)$.
I then repeat a certain experiment $N$ times, the outcome of the $i$th experiment being the random variable $X_i$ ($1\le i \le N$). For each $i$, the random variable $X_i$ has mean $\mu$ and variance $\sigma^2$, and $X_i$ is independent of $X_j$ for $i\ne j$ and also independent of $N$. The random variable $Y$ is defined by $Y= \sum\limits_{i=1}^NX_i$. Show that $\E(Y)=n\mu$ and that $\mathrm{Cov}(Y,N) = \frac13n(n-1)\mu$. Find $\var(Y) $ in terms of $n$, $\sigma^2$ and $\mu$.
\begin{align*}
&& \E[N] &= \sum_{i=1}^{2n-1} \frac{i}{2n-1} \\
&&&= \frac{2n(2n-1)}{2(2n-1)} = n\\
&& \E[N^2] &= \sum_{i=1}^{2n-1} \frac{i^2}{2n-1} \\
&&&= \frac{(2n-1)(2n)(4n-1)}{6(2n-1)} \\
&&&= \frac{n(4n-1)}{3} \\
&& \var[N] &= \frac{n(4n-1)}{3} - n^2 \\
&&&= \frac{n^2-n}{3}
\end{align*}
\begin{align*}
&& \E[Y] &= \E \left [ \E \left [ \sum_{i=1}^N X_i | N = k\right] \right]\\
&&&= \E \left[ N\mu \right] = n\mu \\
\\
&& \mathrm{Cov}(Y,N) &= \mathbb{E}[XY] - \E[X]\E[Y] \\
&&&= \E \left [ \E \left [N \sum_{i=1}^N X_i | N = k\right] \right] - n^2 \mu \\
&&&= \E[N^2\mu] - n^2 \mu \\
&&&= \left ( \frac{n^2(4n-1)}{3} - n^2 \right) \mu \\
&&&= \frac{n^2-n}{3}\mu \\
\\
&& \E[Y^2] &= \E \left [ \E \left [ \left ( \sum_{i=1}^N X_i \right) ^2\right ] \right] \\
&&&= \E \left [ \E \left [ \sum_{i=1}^N X_i ^2 + 2\sum_{i,j} X_iX_j\right ] \right] \\
&&&= \E \left [ \sum_{i=1}^N \left ( \E[X_i ^2] + 2\sum_{i,j} \E[X_i]\E[X_j]\right ) \right] \\
&&&= \E \left [ N(\sigma^2 + \mu^2) + (N^2-N)\mu^2\right] \\
&&&= n(\sigma^2+\mu^2) + \left ( \frac{n^2-n}{3}-n \right)\mu^2 \\
&&&= n\sigma^2 + \frac{n^2-n}{3} \mu^2 \\
\Rightarrow && \var[Y] &= n\sigma^2 + \frac{n^2-n}{3} \mu^2 - n^2\mu^2 \\
&&&= n\sigma^2 - \frac{2n^2+n}{3} \mu^2
\end{align*}
There were some attempts at this question but they faltered when trying to find the expectation of Y, even though some may have believed that they had obtained the required result through false logic.