\renewcommand{\coddate}{\small \today}
\renewcommand{\sheweek}{MT2006/2007 Solution 3}
\begin{center}
\Huge \textbf{Solutions for Exercise 3}
\end{center}
\vspace{1cm}

\begin{enumerate}

\item
We are asked to find
\[
M_X(t)=E\left[e^{tX}\right]
\]
for $X\sim N(\mu,\sigma^2)$. We may write $X=\mu +\sigma Z$ where
$Z\sim N(0,1)$, so that
\begin{align*}
 M_X(t)&=E\left[e^{t(\mu+\sigma Z)}\right]=e^{\mu
t}E\left[e^{\sigma tZ}\right]\\
&=e^{\mu t}M_Z(\sigma t).
\end{align*}
So one need only find the MGF for a standard normal random
variable.
\begin{align*}
 M_Z(t)&=\int_{-\infty}^\infty
e^{zt}\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}z^2}dz\\
 &=\int_{-\infty}^\infty\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}[(z-t)^2-t^2]}dz\\
&=e^{\frac{1}{2}t^2}\int_{-\infty}^\infty\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(z-t)^2}dz\\
 &=e^{\frac{1}{2}t^2}.
\end{align*}
The last integral is the total probability for a $N(t,1)$ random
variable, and so is equal to 1. The step from line 1 to line 2
follows from the simple algebraic identity
\[
-\frac{1}{2}[(z-t)^2-t^2] =-\frac{1}{2}z^2 +zt.
\]
The MGF for the general normal distribution is
\[
M_X(t)=\exp(\mu t+\sigma^2t^2/2).
\]
The mean of $Y$ is
\[
E[e^X]=M_X(1)=\exp(\mu +\sigma^2/2).
\]
Also,
\[
E[Y^2]=M_X(2)=\exp(2\mu +4\sigma^2/2).
\]
The variance of $Y$ is therefore
\[
\exp(2\mu +4\sigma^2/2)-\exp(2\mu
+2\sigma^2/2)=\exp(2(\mu+\sigma^2/2))(\exp(\sigma^2)-1).
\]

\item The Markov inequality says that if $X$ is a non-negative
random variable, then for $\lambda>0$,
\[
P[X \ge \lambda]\le \frac{E[X]}{\lambda}.
\]
The proof is fairly easy.
\begin{align*}
P[X\ge\lambda ] &= E[I_{[\lambda,\infty)}(X)]\\
&\le  E[\frac{X}{\lambda}I_{[\lambda,\infty)}(X)]\\
&=\frac{1}{\lambda}E[XI_{[\lambda,\infty)}(X)]\\
&\le\frac{1}{\lambda}E[X].
\end{align*}
If $t>0$, then the events $Y\ge\gamma$ and $e^{tY} \ge
e^{t\gamma}$ are the same. We can take, in the Markov inequality,
$X=e^{tY}$ where $t>0$, to obtain
\begin{align*}
P[Y\ge \gamma]&=P[e^{tY}\ge e^{t\gamma}]\le \frac{E[e^{tY}]}{e^{t\gamma}}\\
&=\frac{M_Y(t)}{e^{t\gamma}}.
\end{align*}
Notice that this is true for every $t >0$, so we can choose that
value of $t$ that gives the sharpest upper bound.

If $Z\sim N(0,1)$, then $M_Z(t)=e^{t^2/2}$, so the previous
inequality gives
\[
P[Z \ge \gamma]\le \frac{e^{t^2/2}}{e^{\gamma t}}
\]
and choosing $t=\gamma$ gives, for $\gamma > 0$
\[
P[Z \ge \gamma]\le e^{-\gamma^2/2}.
\]
The inequality is also obviously true for $\gamma =0$. One can
show that taking $t=\gamma$ gives the sharpest result.
\item
\begin{enumerate}
\item
We know that
\[
M_X(t)=\sum_{j=0}^\infty m_j\frac{t^j}{j!}
\]
This gives
\[
K_X(t)=\log M_X(t)= \log \left[ \sum_{j=0}^\infty
m_j\frac{t^j}{j!}\right].
\]
the right hand side is
\[
\log \left[1 + m_1\frac{t}{1!}
+m_2\frac{t^2}{2!}+m_3\frac{t^3}{3!}+\dots\right]
\]
Using the Taylor series expansion $\log (1+x) = x -x^2/2+x^3/3
-\dots$, we get
\begin{multline*}
K_X(t)=\left[m_1\frac{t}{1!} +m_2\frac{t^2}{2!}+m_3\frac{t^3}{3!}+\dots\right]\\
-\left[m_1\frac{t}{1!} +m_2\frac{t^2}{2!}+m_3\frac{t^3}{3!}+\dots\right]^2\Big/2\\
+\left[m_1\frac{t}{1!}
+m_2\frac{t^2}{2!}+m_3\frac{t^3}{3!}+\dots\right]^3\Big/3+\dots
\end{multline*}
Retaining terms up to degree $t^3$ gives
\begin{multline*}
K_X(t)=\left[m_1t/1! +m_2t^2/2!+m_3t^3/3!+\dots\right]\\
-\left[(m_1)^2t^2 +2 m_1m_2t^3/2+\dots\right]/2\\
+\left[(m_1)^3t^3\right]/3+\dots.
\end{multline*}
This gives
\begin{multline*}
K_X(t)=m_1\frac{t}{1!} +\left[m_2-(m_1)^2\right]t^2/2!\\
+\left[m_3 -3m_1m_2 +2(m_1)^3\right]t^3/3! +\dots.
\end{multline*}
So, identifying coefficients of $t^r/r!$ on each side for
$r=1,2,3$
\begin{align*}
\kappa_1&=m_1\\
\kappa_2&=m_2-(m_1)^2=\mu_2\\
\kappa_3&=m_3 -3m_1m_2 +2(m_1)^3=\mu_3.
\end{align*}
\item
IF $Y=X-m_1$, then by definition, $m_r^{(Y)} =\mu_r^{(X)}=\mu_r$
for $r=2,3,\dots$. We can also see that
\begin{align*}
M_Y(t)&=E[e^{Yt}]\\
&=E[e^{t(X-m_1)}]\\
&=e^{-tm_1}M_X(t).
\end{align*}
It follows that
\begin{align*}
K_Y(t)&=-tm_1 +K_X(t)\\
&=-\kappa_1t+K_X(t).
\end{align*}
It follows that {\bfseries all} the cumulants of $Y$ and $X$ must
be the same except for the first. In other words, the cumulants of
order greater than 1 {\bfseries do not depend on the location} of
the distribution. We can get $\kappa_2, \kappa_3, \kappa_4,
\kappa_5$ from the moments of $Y$, which are just the central
moments for $X$.
\[
K_Y(t)=\log [1+\mu_2t^2/2!+\mu_3t^3/3!+ \mu_4 t^4/4! +\mu_5t^5/5!
+\dots]
\]
Once again expanding the right hand side we get
\begin{multline*}
K_Y(t)=[\mu_2t^2/2!+\mu_3t^3/3!+ \mu_4 t^4/4! +\mu_5t^5/5! +\dots]\\
-[\mu_2t^2/2!+\mu_3t^3/3!+ \mu_4 t^4/4! +\mu_5t^5/5!
+\dots]^2/2+\dots
\end{multline*}
Keeping terms to the fifth power of t,
\begin{multline*}
K_Y(t)=[\mu_2t^2/2!+\mu_3t^3/3!+ \mu_4 t^4/4! +\mu_5t^5/5! +\dots]\\
-[\mu_2^2t^4/4 +2\mu_2\mu_3t^5/12 +\dots]/2 +\dots
\end{multline*}
which gives
\begin{multline*}
K_Y(t)=\mu_2t^2/2! +\mu_3t^3/3! +(\mu_4-3\mu_2^2)t^4/4! \\
+(\mu_5-10\mu_3\mu_2)t^5/5!+\dots.
\end{multline*}
Picking out the coefficients of $t^r/r!$ on each side
\begin{align*}
\kappa_2^{(Y)}&=\mu_2\\
\kappa_3^{(Y)}&=\mu_3\\
\kappa_4^{(Y)}&=\mu_4-3\mu_2^2\\
\kappa_5^{(Y)}&=\mu_5-10\mu_3\mu_2.
\end{align*}
\item If $Z=Y/\sigma$, then
\[
K_Z(t)=\log M_Z(t)=\log E[e^{Zt}] =\log E[e^{Yt/\sigma}]
=K_Y(t/\sigma).
\]
It follows that $\kappa_r^{(Z)}=\kappa_r^{(Y)}/\sigma^r$, and so
\begin{align*}
\kappa_2^{(Z)}&=1\\
\kappa_3^{(Z)}&=\mu_3/\mu_2^{3/2}\\
\kappa_4^{(Z)}&=(\mu_4-3\mu_2^2)/\mu_2^2\\
\kappa_5^{(Z)}&=(\mu_5-10\mu_3\mu_2)/\mu_2^{5/2}.
\end{align*}
\item For the normal distribution, $K_X(t)=\mu t +\sigma^2t^2/2$, so that
\begin{align*}
\kappa_1&=\mu\\
\kappa_2&=\sigma^2\\
\kappa_r&=0\text{ for } r > 2.
\end{align*}
So
\begin{align*}
m_1&=\kappa_1=\mu\\
m_2&=\kappa_2+(m_1)^2 =\sigma^2+\mu^2\\
m_3&=\kappa_3+3m_2m_1 -2(m_1)^3=3\sigma^2\mu+\mu^3.
\end{align*}
\end{enumerate}

\item We shall require that $-1<t<1$ for some parts of the following derivation:
\begin{align*}
M_X(t)&=\int_{-\infty}^\infty e^{xt}\frac{e^{-|x|}}{2}dx\\
&=\int_{-\infty}^0 e^{xt}\frac{e^{x}}{2}dx+\int_0^\infty e^{xt}\frac{e^{-x}}{2}dx\\
&=\int_{-\infty}^0 \frac{e^{x(1+t)}}{2}dx+\int_0^\infty \frac{e^{-x(1-t)}}{2}dx\\
&=\frac{e^{x(1+t)}}{2(1+t)}\Big|_{-\infty}^0+\frac{-e^{-x(1-t)}}{2(1-t)}\Big|_0^\infty\\
&=\frac{1}{2(1+t)}+\frac{1}{2(1-t)}\\
&=\frac{1}{1-t^2}.
\end{align*}
\begin{align*}
K_X(t)&=-\log (1-t^2) =t^2+(t^2)^2/2 + (t^2)^3/3+\dots\\
&=0t+2\frac{t^2}{2!}+0\frac{t^3}{3!}+12\frac{t^4}{4!}+\dots.
\end{align*}
So,
\begin{align*}
\kappa_1&=0\\
\kappa_2&=2\\
\kappa_3&=0\\
\kappa_4&=12.
\end{align*}

\item
\begin{enumerate}
\item
This can't work, because if it were true
\[
F(\infty,\infty)=H(\infty)+G(\infty)=1+1=2.
\]
This is inconsistent with $F(\infty,\infty)$ being a probability.
\item
If we consider the joint distribution of independent random
variables $X$ with distribution function $H(x)$ and $Y$ with
distribution function $G(y)$, then
\begin{align*}
F(x,y)&=P[X\le x, Y\le y]\\
&=P[X\le x]P[Y\le y]\\
&=H(x)G(y).
\end{align*}
This verifies that $H(x)G(y)$ is a joint distribution function.
\item
This one does not work because
\[
F(-\infty,\infty) = \max [H(-\infty),G(\infty)] =\max [0,1] =1.
\]
But this should be $0$.
\item
As the question suggests, consider the singular joint distribution
for which $X$ and $Y$ always take exactly the same value, and for
which the marginal distribution function of $X$ is $H(x)$. A
typical value for $(X,Y)$ is $(x,x)$.  The support of this
distribution in the $X$$Y$ plane is the line $y=x$. We have
\begin{align*}
F(x,y)&=P[X\le x, Y\le y]\\
&=P[X\le x, X\le y]\\
&=\min [H(x), H(y)].
\end{align*}
So we have shown that this is a distribution function, though for
a singular distribution.

A more difficult exercise would be to show that $F(x,y) = \min
[H(x),G(y)]$ is a joint distribution function.
\end{enumerate}
\end{enumerate}
