% This is a simple LaTex sample document that gives a submission format
%   for IEEE PAMI-TC conference submissions.  Use at your own risk.

% Make two column format for LaTex 2e.\
\documentclass[12pt]{article} %,twocolumn

%\usepackage{times,amsmath,amsfonts}

% Use following instead for LaTex 2.09 (may need some other mods as well).
%\documentstyle[times,twocolumn]{article}
\usepackage[dvips]{graphicx,graphics}
% Set dimensions of columns, gap between columns, and paragraph indent
\setlength{\textheight}{10in} \setlength{\textwidth}{6in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0in} \setlength{\headsep}{-1in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.3in}  % Centers text.
\setlength{\evensidemargin}{-.3in}

% Add the period after section numbers.  Adjust spacing.
\newcommand{\Section}[1]{\vspace{-8pt}\section{\hskip -1em.~~#1}\vspace{-3pt}}
\newcommand{\SubSection}[1]{\vspace{-3pt}\subsection{\hskip -1em.~~#1}
        \vspace{-3pt}}
\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand {\diff}[1] {\frac{\partial}{\partial #1}}
\newcommand{\jacob}[3]{\frac{\partial^2 #3}{\partial #1 \partial #2}}
\newcommand{\der}[2]{\frac{\partial #2}{\partial #1}}
\begin{document}

% Make title bold and 14 pt font (Latex default is non-bold, 16pt)
\title{Stat 471: Homework 01}
% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle \thispagestyle{empty}

{\bf Due Date:} September 22, 1:20pm. No rate assignments will be
accepted or graded. There will be $10\%$ bonus points for
exceptional solutions.

\begin{enumerate}

\item (Computational) If $X \sim N(0,1)$, the c.d.f. of $X$ is
given by
$$\Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x
\exp \Big(\frac{z^2}{2}\Big) \;dz.$$ It can be shown that
$$\Phi^{-1}(x) \approx t - \frac{a_0 + a_1 t}{1 + b_1 t + b_2
t^2}$$ for constants $a_0 = 2.30753, a_1=0.27061, b_1=0.99229,
b_2=0.04481$ $(t^2= -2 \log x)$ (Abramowitz and Stegun, Handbook
of mathematical functions, 1964). Write a function that generate
the
standard normal random numbers using the integral transform
method. Is your random number generator sufficiently good enough?

\item (Computational) Cauchy distribution is defined as $g(x)=
\frac{1}{1+x^2}, x \in \mathbb{R}$. Write a function that generate
Cauchy random numbers. You may need to refer to a calculus
textbook for the integral.

\item (Computational) Using the Cauchy random number generator,
write a function that produce the standard normal random numbers
using the accept-reject method. Compare the performance of the two
standard normal random number generators using the Q-Q plot and
other methods.

 \item (Theoretical) When you generate the Q-Q plot of
$N(\mu_1,\sigma_1^2)$ and $N(\mu_2,\sigma_2^2)$ for some arbitrary
$\mu_i$ and $\sigma_i$, you will always get a straight line. Prove
this fact by determining the equation of the line.
\end{enumerate}
\end{document}
