\documentclass[11pt,reqno]{amsart}
\usepackage[charter]{mathdesign}
\usepackage{verbatim}

\begin{document}

\newcommand{\smean}{\overline X}
\newcommand{\Cov}{\mathop{\mathrm{Cov}}}
\newcommand{\Var}{\mathop{\mathrm{Var}}}
\newcommand{\Ceil}[1]{\left\lceil{#1}\right\rceil}
\newcommand{\Parens}[1]{\left({#1}\right)}
\newcommand{\Pipes}[1]{{\left|{#1}\right|}}
\newcommand{\df}{\mathrm{df}}

\theoremstyle{remark}
\newtheorem*{problem*}{Problem}

\newenvironment{sol}{\begin{proof}[Solution]}{\end{proof}}
\renewcommand{\labelenumi}{(\alph{enumi})}
\renewcommand{\labelenumii}{(\roman{enumii})}

\title{HW Solutions}
\author{Melikamp}
\date{\today}
\maketitle

\section{Problems due by August 4}

All drawings are omitted. All equalities in computations should be
assumed to be approximate, even though $=$ is used.

\begin{problem*}[6.6.5]
\end{problem*}\begin{sol}
  We are assuming that population variances are equal.
  \begin{enumerate}
  \item Use the formula from p. 239:
    \[\smean_1-\smean_2\pm Z_{1-\alpha/2}S_p\sqrt{\frac1{n_1}+\frac1{n_2}},\]
    where $S_p$ is the pooled standard deviation:
    \begin{equation*}
      \tag{$\dagger$}
      \label{S_p-def}
      S_p = \sqrt{\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}}.
    \end{equation*}
    From the given data we know that $\smean_1 = 80.2$, $\smean_2 =
    75.4$, $s_1 = 5.7$, $s_2 = 6.1$, $n_1=n_2=100$, so we can
    write
    \begin{eqnarray*}
      S_p &=& \sqrt{\frac{(100-1)5.7^2+(100-1)6.1^2}{100+100-2}} = 5.9
    \end{eqnarray*}
    and the CI is
    \[80.2-75.4\pm1.96\cdot5.9\sqrt{\frac1{100}+\frac1{100}}
    = 4.8\pm1.64,\]
    or
    \[(3.16, 6.44).\]
  \item Finding a $95$\% confidence interval is, in a way, equivalent
    to running a two-sided test with $\alpha=0.05$. The test will
    result in rejecting $H_0:\mu_1-\mu_2=0$ iff the confidence
    interval does not contain $0$, as is the case here. In other
    words, there is enough evidence to suggest that $\mu_1\neq\mu_2$.
  \end{enumerate}
\end{sol}

\newpage

\begin{problem*}[6.6.7]
\end{problem*}\begin{sol}\
  From the given data we know that $\smean_1 = 70.5$, $\smean_2 =
  76.3$, $s_1 = 24.3$, $s_2 = 21.6$, $n_1=n_2=25$.  We are assuming
  that population variances are unequal, so we use formulas from
  p. 247:
  \begin{eqnarray*}
    \smean_1-\smean_2
    \pm t_{1-\alpha/2}\sqrt{\frac{s_2^2}{n_1}+\frac{s_2^2}{n_2}},
  \end{eqnarray*}
  where \[\df=\frac{\Parens{\frac{s_1^2}{n_1} +
      \frac{s_2^2}{n_2}}^2}{\frac{(s_1^2/n_1)^2}{n_1-1}+\frac{(s_2^2/n_2)^2}{n_2-1}}
  \approx 48,\]
  and so the CI is
  \[70.5-76.3\pm 2.011\sqrt{\frac{24.3^2}{25}+\frac{21.6^2}{25}}
  = -5.8\pm 13.08\]
  or
  \[(-18.88, 7.28).\]
\end{sol}

\renewcommand{\labelenumi}{(\roman{enumi})}

\begin{problem*}[6.6.10]
\end{problem*}\begin{sol}
  From the given data we know that $\smean_1 = 5.88$, $\smean_2 =
  6.29$, $s_1 = 4.7$, $s_2 = 4.89$, $n_1=8$, $n_2=7$. We are assuming
  that population variances are unequal, so we use formulas from
  p. 247.
  \begin{enumerate}
  \item $H_0:\mu_1-\mu_2 = 0$, $H_1:\mu_1-\mu_2 \neq 0$, $\alpha=0.05$.
  \item \[t=\frac{\smean_1 - \smean_2}{\sqrt{\frac{s_2^2}{n_1}+\frac{s_2^2}{n_2}}}.\]
  \item Reject $H_0$ iff $|t|\geq t_{1-\alpha/2}$. Here we need to
    compute $\df$, of course (just as in the previous problem):
    \begin{eqnarray*}
      \df &=& 13,\\
      t_{1-\alpha/2} &=& 2.16.
    \end{eqnarray*}
  \item $\displaystyle |t| = \Pipes{\frac{5.88 - 6.29}{\sqrt{\frac{4.7^2}{8}
        + \frac{4.89^2}{7}}}} = |-0.16| < 2.16$,
    so we will fail to reject $H_0$.
  \item There is not enough evidence to reject $H_0$; $\alpha=0.05$.
  \end{enumerate}
\end{sol}

\newpage

\begin{problem*}[6.6.15]
\end{problem*}\begin{sol}
  From the given data we know that $\smean_1 = 390$ (males), $\smean_2
  = 425$ (females), $s_1 = 57$, $s_2 = 65$, $n_1=25$, $n_2=40$. We are
  assuming that population variances are equal, so we use formulas
  from p. 239. We will also use $Z$ statistic, although arguments can
  be made for using $t$ here.
  \begin{enumerate}
  \item $H_0:\mu_1-\mu_2 = 0$, $H_1:\mu_1-\mu_2 \neq 0$, $\alpha=0.05$.
  \item \[Z = \frac{\smean_1 - \smean_2}{S_p\sqrt{\frac1{n_1}+\frac1{n_2}}},\]
    where $S_p$ is defined just as in (\ref{S_p-def}).
  \item Reject $H_0$ iff $|Z|\geq Z_{1-\alpha/2} = 1.96$.
  \item $S_p = 62.07$,
    \[|Z| = \Pipes{\frac{390-425}{62.07\sqrt{\frac1{25}+\frac1{40}}}}=|-2.21|>1.96,\]
    so we will reject $H_0$.
  \item The data provides sufficient evidence to conclude that
    population means are significantly different; $\alpha=0.05$.
  \end{enumerate}
\end{sol}

\begin{problem*}[7.10.1]
\end{problem*}\begin{sol}
  From what is given,\\ $n_1 = 120$,\\ $n_2 = 150$,\\ $\hat p_1 =
  \frac{X_1}{n_1} = \frac{30}{120} = 0.25$ and\\ $\hat p_2 =
  \frac{62}{150} = 0.413.$

  The difference between population proportions can be estimated by
  \begin{eqnarray*}
    &&\hat p_1 - \hat p_2 \pm Z_{1-\alpha/2}
    \sqrt{\Parens{\frac{\hat p_1(1-\hat p_1)}{n_1}}
      +\Parens{\frac{\hat p_2(1-\hat p_2)}{n_2}}}\\
    &=& 0.25 - 0.413 \pm 1.96\sqrt{\frac{0.25\cdot0.75}{120}
      + \frac{0.413\cdot0.587}{150}}\\
    &=& -0.16\pm0.11
  \end{eqnarray*}
  or
  \[(-0.27, -0.05).\]
\end{sol}

\renewcommand{\labelenumi}{(\alph{enumi})}

\begin{problem*}[7.10.2]
\end{problem*}\begin{sol}
  It is given that $X=423$, $n=1200$, so...
  \begin{enumerate}
  \item $\hat p = 423/1200 = 0.3525$.
  \item The standard error is found from
    \[\mathrm{s.e.}(p)
    = \sqrt{\frac{\hat p(1-\hat p)}n} = \sqrt{\frac{0.3525(1-0.3525)}{1200}}
    = 0.014.\]
  \item A $95$\% confidence interval for $p$ is
    \[\hat p\pm Z_{1-\alpha/2}\cdot\mathrm{s.e.}(p)
    = 0.3525\pm 0.0274\]
    or
    \[(0.3251, 0.3799).\]
  \end{enumerate}
\end{sol}

\begin{problem*}[10.8.1]
\end{problem*}\begin{sol}
  From the given data,\\
  $\bar X = 6.25$, $s_X = 6.96$,\\
  $\bar Y = 40.38$, $s_Y = 31.2$,\\
  $\Cov(X,Y) = 197.89$, so
  \begin{enumerate}
  \item $\displaystyle r = \frac{\Cov(X,Y)}{\sqrt{\Var{X}\Var{Y}}}
    = \frac{\Cov(X,Y)}{s_X\cdot s_Y} = \frac{197.89}{6.96\cdot31.2} = 0.9113$.
  \item We run a two-sided test with $\alpha=0.05$:
    \begin{enumerate}
    \item $H_0:\rho=0$, $H_0:\rho\neq0$, $\alpha=0.05$.
    \item $\displaystyle t = r\sqrt{\frac{n-2}{1-r^2}}$, $\df = n-2$.
    \item Reject $H_0$ iff $|t| \geq t_{1-\alpha/2}$.
    \item $\displaystyle t = 0.9113\sqrt{\frac{8-2}{1-0.9113^2}} = 5.42$,
      while $\df = 6$ and $t_{1-\alpha/2} = 2.447.$
    \item There is sufficient evidence to reject $H_0$ and conclude
      that there is significant correlation between $X$ and $Y$.
    \end{enumerate}
  \item $\displaystyle \hat\beta_1 = r\sqrt{\frac{\Var Y}{\Var X}} =
    r\frac{s_X}{s_Y} = 0.9113\cdot\frac{31.2}{6.96} = 4.085$,\\
    $\hat\beta_0 = \bar Y - \hat\beta_1\bar X = 40.38 - 4.085\cdot6.25
    = 14.85$, so
    \[\hat Y = 14.85 + 4.085 \cdot X.\]
  \end{enumerate}
\end{sol}

\begin{problem*}[10.8.2]
\end{problem*}\begin{sol}
  From the given data,\\
  $\bar X = 9.67$, $s_X = 3.56$,\\
  $\bar Y = 7.25$, $s_Y = 1.56$,\\
  $\Cov(X,Y) = 4.12$, so
  \begin{enumerate}
  \item Chart omitted.
  \item $\displaystyle r = \frac{\Cov(X,Y)}{\sqrt{\Var{X}\Var{Y}}} = 0.742$.
  \item $\hat\beta_1 = r\sqrt{\frac{\Var Y}{\Var X}} = 0.33$,\\
    $\hat\beta_0 = \bar Y - \hat\beta_1\bar X = 4$, so\\
    \[\hat Y = 4 + 0.33 \cdot X.\]
  \item $\hat Y = 4 + 0.33\cdot11 = 7.63$.
  \item The difference is $3\cdot\beta_1 = 0.99$.
  \end{enumerate}
\end{sol}

\end{document}
