\documentclass[11pt]{article}
\newcommand{\bd}{\displaystyle}
\begin{document}
\begin{center}
{\large \bf Problem Set 3 Solution}\\
17.872 TA Jiyoon Kim\\
October 25, 2003\\
\end{center}
{\bf \large Bulmer Problem 3.1} Since $x$ is uniformly distributed, you can have the distribution function of $x$.
(Uniform distribution between [a,b] is $\frac{1}{b-a}$.)
\[
X \sim U[0,1]\ \mbox{ then, } \ f(x) = \left\{
\begin{array}{lll}
    1 & &\mbox{ if } \ 0 \leq x \leq 1\\
    0 & &\mbox{ otherwise}
\end{array}
\right.
\]
Then, what is $G(y)$ and $g(y)$?\\
(a)  $ y = x^2$\\
According to the rule demonstrated in the book,\\
\[
\begin{array}{llll}
G(y) &=& \Pr[Y \leq y] = \Pr[x^2 \leq y]\\
\\
&=& \Pr[-\sqrt{y} \leq x \leq \sqrt{y}]\\
\\
&=& \Pr[-\sqrt{y} \leq x \leq 0] + \Pr[0 \leq x \leq \sqrt{y}]\\
\\
&=& \Pr[0 \leq x \leq \sqrt{y}] \ \leftarrow \mbox{ because $x$ is between 0 and 1}\\
\\
&=& \bd \int^{\sqrt{y}}_0 f(x)\ dx = F(\sqrt{y}) - F(0)\\
\\
&=& \left[x \right]^{\sqrt{y}}_0 = \sqrt{y}
\end{array}
\]
\\
\[
g(y) = \frac{dG(y)}{dy} = \frac{d\sqrt{y}}{dy} = \frac{1}{2} \cdot
y^{-\frac{1}{2}}\\
\]
(b)  $y = \sqrt{x}$\\
\[
\begin{array}{llll}
G(y) &=& \Pr[Y \leq y] = \Pr[\sqrt{x} \leq y]\\
\\
&=& \Pr[x \leq y^2]\\
\\
&=& \bd \int^{y^2}_0 f(x)\ dx  = F(y^2) - F(0)\\
\\
&=& \left[x \right]^{y^2}_0 = y^2
\end{array}
\]
\\
\[
g(y) = \frac{dG(y)}{dy} = \frac{dy^2}{dy} = 2y\\
\]
\\
{\bf Bulmer Problem 3.2}\\
(a)  First, the proof when $b$ is a negative number follows.\\
\[
\begin{array}{lllll}
G(y) &=& Pr[Y \leq y] = Pr[a + bX \leq y] = Pr[bX \leq y - a] =
Pr\left[X \geq \bd \frac{y-a}{b}\right]\\
\end{array}
\]
Since the total probability of any distribution is 1, $Pr\left[X
\geq \bd \frac{y-a}{b}\right]$ will be the same as $1 - Pr\left[X
\leq \bd \frac{y-a}{b}\right]$.  (note: you can also consider this
as same as $Pr\left[X \leq -\bd \frac{y-a}{b}\right]$, but it only
woks when the symmetry of
a distribution is assumed.)  Therefore,\\
\[
\begin{array}{llll}
G(y) &=& 1 - Pr\left[X \leq \bd \frac{y-a}{b}\right] = 1 - F\left(\bd \frac{y-a}{b}\right)\\
\\
g(y) &=& \bd \frac{dG(y)}{dy} = - \frac{1}{b}f\left(\bd
\frac{y-a}{b}\right)
\end{array}
\]
by Chain rule.\\
\\
(b)  Now, the application.  When $Y = -log_{e} x$, find $g(y)$.
First, $X$ is assumed to be uniformly distributed between 0 and 1.
From this assumption, we can induce $X$'s probability density
function of $f(x)$.  It is\\
\[
\begin{array}{llll}
f(x) &\left\{\begin{array}{lllll}
            1 & & \mbox{ if } 1 \leq x \leq 0\\
            0 & & \mbox{ otherwise}\end{array} \right.
\end{array}
\]
$f(x)$ is always a constant of 1, since the probability of $f(x)$
is evenly 1 at any point on $x$-axis.  Using the procedure in (a),
\[
\begin{array}{lllll}
G(y) &=& Pr\left[Y \leq y \right] = Pr\left[ -log_{e} x \leq y
\right] = Pr\left[log_{e} x \geq y \right]\ \\
\\
    &=& 1 - Pr\left[log_{e} x \leq -y \right]\ = 1 - Pr\left[x
    \leq e^{-y} \right]\\
\\
    &=& 1 - F\left(e^{-y} \right) \\
\\
g(y) &=& \bd \frac{dG(y)}{dy} = - f(e^{-y})(-1)e^{-y} = e^{-y}\\
\end{array}
\]
\\
{\bf Bulmer Problem 3.3}\\
This is a similar question as the first one, but with different
$X$ distribution.  Now, $X$ is uniformly distributed between $-1$
and $2$, which makes the probability density function of $X$ is \\
\[
\begin{array}{lllll}
f(x) & \left\{\begin{array}{lllll}
               \frac{1}{3}  & &  \mbox{ if } -1 \leq x \leq 2\\
               \\
               0            & &  \mbox{ otherwise} \end{array}
               \right.
\end{array}
\]
And $Y = X^2$.  The transformation process yields\\
\[
\begin{array}{lllll}
G(y) &=& Pr\left[Y \leq y \right] = Pr\left[ X^2 \leq y \right] =
Pr\left[-\sqrt{y} \leq x \leq \sqrt{y} \right]\\
\end{array}
\]
Here, we have to consider the range of possible $x$s.  Differing
from the Problem 3.1, $x$ has the range of $[-1,2]$.  Between
$[-1,1]$, $Y$ is non-monotonous function and then monotonously
increasing between $[1,2]$.  The distribution function should be
different for these two different ranges.  \\
\\
First, I consider when $x$ is between $[-1,1]$.  The
transformation is:\\
\[
\begin{array}{llll}
G(y) &=& Pr\left[-\sqrt{y} \leq x \leq \sqrt{y} \right] = \bd
\int^{\sqrt{y}}_{-\sqrt{y}} f(x) dx \\
    \\
    &=& F(\sqrt{y}) - F(-\sqrt{y})\\
\\
g(y) &=& \bd \frac{dG(y)}{dy} =
f(\sqrt{y})\frac{1}{2}y^{-\frac{1}{2}} -
f(\sqrt{y})\left(-\frac{1}{2}\right)y^{-\frac{1}{2}}\\
\\
    &=& \bd \frac{1}{3}y^{\frac{1}{2}}
    \end{array}
    \]
This works if $0 < y \leq 1$ since the function is not defined if
$y$ is 0.\\
\\
Now, consider the case when $x$ is between $[1,2]$.  As noted, it
is increasingly monotonous with a lower boundary.  Therefore,\\
\[
\begin{array}{lllll}
G(y) &=& Pr\left[1 \leq x \leq \sqrt{y} \right] = \bd
\int^{\sqrt{y}}_{1} f(x) dx = F(\sqrt{y}) - F(1)\\
\\
g(y) &=& \bd \frac{dG(y)}{dy} = f(\sqrt{y})\frac{1}{2}y^{\frac{1}{2}}\\
\\
    &=& \bd \frac{1}{6}y^{\frac{1}{2}}
    \end{array}
    \]
This is when $1 < y \leq 4$.\\
\\
{\bf Experimental Question}\\
For the Stata result, please see attached.\\
Theoretical mean can be obtained by using the following formula.\\
\[
\begin{array}{lllll}
E(x) &=& \int^1_0 xf(x)\  dx = \int^1_0 x \cdot 1 \  dx = \left[\bd \frac{1}{2}x^2\right]^1_0\\
\\
    &=& \bd \frac{1}{2}\\
    \\
Var(x) &=& \int^1_0 (x - E(x))^2 \ dx = \int^1_0 x^2 - x + \frac{1}{4} \ dx \\
\\
    &=& \left[ \bd \frac{1}{3}x^3 - \bd \frac{1}{2}x^2 + \bd \frac{1}{4}x \right]^1_0 = \bd \frac{1}{12}\\
    \end{array}
    \]
Now, compare these with Stata result.


\end{document}
