% BTS exercise 1

\documentclass[11pt,a4paper]{article}
\usepackage{latexsym}

%NEW COMMANDS

\newcommand{\eqref}[1]{(\ref{#1})}
\newcommand{\mat}[1]{\mbox{\boldmath{$#1$}}}
\newcommand{\proc}[1]{$\{#1_t\}$}
\newcommand{\eps}{\varepsilon}
\newcommand{\var}{{\rm Var}}
\newcommand{\cov}{{\rm Cov}}
\newcommand{\nid}{{\rm NID}}
\newcommand{\iid}{{\rm IID}}
\newcommand{\norm}{{\rm N}}
\newcommand{\wn}{{\rm WN}}
\newcommand{\diag}{{\rm diag}}


%FORMATTING
\thispagestyle{empty}
\parindent 0pt
\parskip 11pt
\topmargin -1cm

\oddsidemargin -0.5cm
\evensidemargin -0.5cm
\textwidth 16.5cm
\textheight 23.5cm

%DOCUMENT
\begin{document}

\begin{center}
\huge ST402 Principals and Methods of Statistical Practice \\
\huge Mid-term Test \\
\end{center}

\Large Answer as much of this as you can in the 45 minutes
available. You may consult your notes but not your colleagues. All
questions will be marked out of 10 (although question 4 may be
slightly longer than the others).

\begin{enumerate}
%
% Qu 1
%
\item I have an urn with 3 disks of which 2 are green and 1 is red.  I
draw $2$ discs from the urn without replacement; $X$ is the number of
green discs that I draw. I replace the discs in the urn, and draw
another $X$ discs from the urn, without replacement. Suppose that the
$X$ discs drawn contain $Y$ green discs.
%
   \begin{enumerate}
   \item Find $E(X)$ and $E(Y|X)$. Hence find $E(Y)$.
   \item Find the probability mass function of $Y$.
    \end{enumerate}
%
%
% Qu 2
%
\vspace{1cm}
\item Let $X$ and $Y$ be random variables with joint density function
\begin{equation} \label{joint:eq}
f_{X,Y}(x,y) = \left\{ \begin{array}{ll} k(x+y), & 0 < x  < 1, 0<y <1, 0<x+y<1 \\
0, & {\rm otherwise.} \end{array}\right.
\end{equation}
\begin{enumerate}
\item Find $k$. \item Find the density of $X|Y=y$ and hence find
$E(X|Y= \frac{1}{2})$.
\end{enumerate}
%
\vspace{1cm}
% Qu 3
%
\item Let $Y$ and $Z$ be independent  random variables with exponential
distributions with the same mean $\frac{1}{\lambda}$.
\begin{enumerate}
\item Find the joint density function of $(Y,Z)$. \item Find the
Jacobian of the transformation $U=Z+Y$, $V=Z/Y$. \item find the joint
density function of $(U,V)$, and show that $U$,$V$ are independent.
\end{enumerate}
%
%
\newpage
% Qu 4
%

\item Let
\[
X = \left\{\begin{array}{rl}
            \sum_{i=1}^NY_i&N>0\\
            0&N=0
            \end{array}
    \right.
\]
where $N$ is a discrete random variable taking values from the set of
non-negative integers, and $Y_1, Y_2,\dots$ is a sequence of i.i.d.
random variables that are independent of $N$ such that
$P(Y_1=1)=P(Y_1=0)=0.5$.
\begin{enumerate}
\item Let $N$ be a Poisson random variable with mean $\lambda$.  Find
$E(X)$ and the moment generating function (mgf) of $X$.  Thus find
$P(X=k)$ for all $k$. \item Now let $N$ have a geometric distribution
such that $P(N=n)=(0.5)^{n+1}$ for $n=0,1,2,\dots $Find $E(X)$, the mgf
of $X$ and prove that
\[
P(X=k)=\frac{2}{3}\left(\frac{1}{3}\right)^k,\hspace{0.25in}
k=0,1,2,\dots.
\]
(You may use the fact that the  mgf of a Poisson random variable is
$e^{\left(\lambda (e^t-1)\right)}$.)
\end{enumerate}
\end{enumerate}
\end{document}
