% 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 04}
% 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:} November 12, 1:20pm. No late assignments will be
accepted or graded. There will be $10\%$ bonus points for
exceptional solutions.

\begin{enumerate}
\item From $\tt{strength.data}$, compute a $95\%$ bootstrap confindence interval for the correlation coefficient of $\tt{arm}$ and $\tt{grip}$ strengh.

\item Harry's restaurant business fluctuate in successive years between two states: 1 (bankruptcy) and 2 (solvency). The transition matrix is given by
$${\bf P} = \left(\begin{array}{cc}
1 & 0 \\
0.75 &  0.25\\
\end{array}\right).$$
Check if the states are recurrent. What is the invariant distribution for the Markov chain? What is the expected number of years until Harry's restaurant goes bankrupt assuming that it starts from the state of solvency? 

\item Find the general form of ${\bf P}^n$ and compute $\lim_{n \to \infty} {\bf P}^n$. 


\item Using MCMC generate 10,000 numbers that follow the lognormal dsitribution
$$f(x)=\frac{1}{x\sqrt{2\pi}}\exp \Big(-\frac{(\ln x)^2}{2}\Big)$$\end{enumerate}

\end{document}
