\documentclass[10pt,a4paper]{exam}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{pgfplots}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx,ragged2e}
\usepackage{hyperref}
\usepackage{color}
\usepackage{tabularx,ragged2e}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\newcommand{\dd}{\mathrm{d}}
\renewcommand*{\arraystretch}{2}
\begin{document}

\begin{coverpages}
\begin{center}{\huge MATH 1550 - EXAM 3 FALL 2018 \\
SOLUTION
%\vspace*{0.4in}
%\large Name: \makebox[3in]{\hrulefill}\\
}
\end{center}

\begin{flushleft}\vspace{0.5in}
Friday, 16 November 2018 \\
Instructor: Tom Cuchta
\end{flushleft}

\textbf{Instructions:}
\begin{itemize}
	\item  Show all work, clearly and in order, if you want to get full
	credit. If you claim something is true \textbf{you must show work backing up your claim}. I reserve the right to take off points if I cannot see how you arrived at your answer (even if your final answer is correct).
	\item Justify your answers algebraically whenever possible to ensure full credit. 	
	\item  Circle or otherwise indicate your final answers.
	\item  Please keep your written answers brief; be clear and to the point.
	\item  Good luck!
\end{itemize}
%\vspace*{5pt}
\begin{minipage}{0.55\textwidth}
\begin{tabular}{|l|}
\hline
$z=\dfrac{\bar{x}-\mu}{\sigma_{\bar{x}}}; \sigma_{\bar{x}}=\dfrac{\sigma}{\sqrt{n}}$ \\
\hline
$t=\dfrac{\bar{x}-\mu}{s_{\bar{x}}}; s_{\bar{x}}=\dfrac{s}{\sqrt{n}}$\\
\hline
$z=\dfrac{\hat{p}-p}{\sigma_{\hat{p}}}; \sigma_{\hat{p}}=\sqrt{\dfrac{pq}{n}}$ \\
\hline
$\chi^2 = \dfrac{(n-1)s^2}{\sigma^2}$ \\
\hline
$z=\dfrac{(\bar{x}_1-\bar{x}_2)-(\mu_1-\mu_2)}{\sigma_{\bar{x}_1,\bar{x}_2}}; \sigma_{\bar{x}_1,\bar{x}_2}=\sqrt{\dfrac{\sigma_1^2}{n_1} + \dfrac{\sigma_2^2}{n_2}} $ \\
\hline
$t=\dfrac{(\bar{x}_1-\bar{x}_2)-(\mu_1-\mu_2)}{s_{\bar{x}_1,\bar{x}_2}}$: \\
\underline{Case I (variances equal)}: \\
$s_{\bar{x}_1,\bar{x}_2}=\hat{\sigma}\sqrt{\dfrac{1}{n_1}+\dfrac{1}{n_2}}; \hat{\sigma}=\sqrt{\dfrac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}}$; \\
d.f. $= n_1+n_2-2$ \\
\underline{Case II (variances not equal)}: \\
$s_{\bar{x}_1,\bar{x}_2}=\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}$\\
d.f. $=$ smaller of $n_1-1$ and $n_2-1$\\
\hline
$z = \dfrac{(\hat{p_1}-\hat{p}_2)-(p_1-p_2)}{\sqrt{\overline{p} \hspace{2pt}\overline{q}\left( \frac{1}{n_1} + \frac{1}{n_2} \right)}}$, $\overline{p}=\dfrac{x_1+x_2}{n_1+n_2}$, $\overline{q}=1-\overline{p}$\\
$x_1=\hat{p}_1n_1$ and $x_2=\hat{p}_2n_2$ \\
\hline
\end{tabular}
\end{minipage}
\begin{minipage}{0.5\textwidth}
When computing $\chi_R^2$ and $\chi_L^2$: in the $\chi^2$ table, \\
\begin{itemize}
\item for a right-tailed test use d.f. and $\alpha$
\item for a left-tailed test, use d.f. and $1-\alpha$
\item for a two-tailed test, use both d.f. and $\dfrac{1}{2}\alpha$ AND d.f. and $1-\dfrac{1}{2}\alpha$ (the larger is $\chi_R^2$ and the smaller is $\chi_L^2$
\end{itemize}
\hrule 
\vspace{10pt}
Multiple regression equation: $y=b+c_1x_1 + c_2x_2$
\end{minipage}
\end{coverpages}

\begin{questions}
\question[13] The table shows that the total square footages of retailing space at shopping centers, the numbers of shopping centers, and the sales for shopping centers for eight years. \\
\begin{tabular}{|l|l|l|}
\hline
Sales, $y$ & Total square footage, $x_1$ & Number of shopping centers, $x_2$ \\
\hline
1032.4 & 5.7 & 85.5 \\
1105.3 & 5.8 & 87.1 \\
1181.1 & 6.0 & 88.9 \\
1221.7 & 6.1 & 90.5 \\ 
1277.2 & 6.2 & 91.9 \\
1339.2 & 6.4 & 93.7 \\
1432.6 & 6.5 & 96.0 \\
1530.4 & 6.7 & 98.9  \\
\hline 
\end{tabular}\\
The data was plugged into the regression package in Excel and the following table was generated: \\
\includegraphics[scale=0.76]{regression.png} \\
\begin{parts}
\part[3] What is the multiple regression equation for the data set?\\
\textit{Solution}: $y=-2075.22702 + 20.8958107x_1 + 35.0709394x_2$
\part[5] Use your model to predict the sales if the total square footage is $6.6$ and the number of shopping centers is $89.1$.\\
\textit{Solution}: Here $x_1=6.6$ and $x_2=89.1$, so plugging them in yields
\[ y = -2075.22702 + 20.8958107(6.6) + 35.0709394(89.1) = 1187.506.\]
\vfill
\part[5] Use your model to predict the sales if the total square footage is $6.2$ and the number of shopping centers is $86$.\\
\textit{Solution}: Here $x_1=6.2$ and $x_2=86$, so plugging them in yields
\[ y = -2075.22702 + 20.8958107(6.2) + 35.0709394(86) = 1070.427. \]
\vfill
\end{parts}
\vfill
\newpage
\question[8] Identify each data set as strongly positively linearly correlated, strongly negatively linearly correlated, nonlinearly correlated, or uncorrelated. \\
\begin{parts}
\part[2] \includegraphics[scale=0.75]{uncorrelated.png} \\
\textit{Solution}: Uncorrelated 
\part[2] \includegraphics[scale=0.75]{stronglynegativelycorrelated.png} \\
\textit{Solution}: Strongly negatively linearly correlated
\part[2] \includegraphics[scale=0.75]{nonlinearcorrelation.png} \\
\textit{Solution}: Nonlinearly correlated
\part[2] \includegraphics[scale=0.75]{stronglypositivelycorrelated.png} \\
\textit{Solution}: Strongly positively linearly correlated

\end{parts}
\newpage
\question[18] Let $\alpha=0.10$. An environmentalist estimates that the mean amount of waste recycled by adults in the United States is more than 1 pound per person per day. You want to test this claim. You find that the mean waste recycled per person per day for a random sample of 13 adults in the United States is 1.51 pounds and the standard deviation is 0.28 pounds.
\begin{parts}
\part[5] Write the hypotheses \textbf{and identify which is the claim}:
\[ \left\{ \begin{array}{ll}
H_0 \colon & \mathbf{\mu \leq 1} \\
H_a \colon & \mathbf{\mu > 1 (\text{\textbf{claim}}) }
\end{array} \right. \]
\part[2] Based on your answer to (a), is this a left-tailed, a right-tailed, or a two-tailed test? \\
\textit{Solution}: Right-tailed test. The rejection region is ``$t>1.356$". 
\part[6] Compute the test statistic. \\
\textit{Solution}: Here $n=13$, $\bar{x}=1.51$ and $s=0.28$. Compute the test statistic: 
\[ t = \dfrac{\bar{x}-\mu}{\frac{s}{\sqrt{n}}} = \dfrac{1.5-1}{\frac{0.28}{\sqrt{13}}} = 6.43\]
\part[3] Circle one: \hspace{20pt} \circled{reject $H_0$} \hspace{20pt} OR \hspace{20pt} fail to reject $H_0$
\part[2] Write a sentence to respond to the claim. \\
\textit{Solution}: There is evidence in support of the claim that the mean amount of waste recycled by adults in the United States is more than 1 pound per person per day.
\end{parts}
\newpage
\question[18] Let $\alpha=0.05$. A medical researcher claims that $5\%$ of children under 18 years of age have asthma. In a random sample of 250 children under 18 years of age, $9.6\%$ say they have asthma. 
\begin{parts}
\part[5] Write the hypotheses \textbf{and identify which is the claim}:
\[ \left\{ \begin{array}{ll}
H_0 \colon & \mathbf{p=0.05} (\text{\textbf{claim}}) \\
H_a \colon & \mathbf{p\neq 0.05}
\end{array} \right. \]
\part[2] Based on your answer to (a), is this a left-tailed, a right-tailed, or a two-tailed test? \\
\textit{Solution}: Two-tailed test. The rejection region is found by reverse lookup in the standard normal table corresponding to area $\dfrac{\alpha}{2} = 0.025$: $z<-1.96$ and $z>1.96$.
\part[6] Compute the test statistic. \\
\textit{Solution}: First compute $q=1-p=1-0.5=0.5$ and hence
\[ \sigma_{\hat{p}} = \sqrt{\dfrac{pq}{n}} = \sqrt{\dfrac{0.05(0.95)}{250}} = 0.0137,\]

and so
\[ z = \dfrac{\hat{p}-p}{\sigma_{\hat{p}}} = \dfrac{0.09-0.005}{0.0137} = 2.919\]

\part[3] Circle one: \hspace{20pt} \circled{reject $H_0$} \hspace{20pt} OR \hspace{20pt} fail to reject $H_0$
\part[2] Write a sentence to respond to the claim. \\
\textit{Solution}: There is sufficient evidence to reject the claim that $5\%$ of children under 18 years of age have asthma.
\end{parts}
\newpage

\question[18] Let $\alpha=0.01$. A school administrator claims that the standard deviation for eighth-grade students on a U.S. history assessment test is greater than 30 points. A random sample of 18 eighth-grade students has a standard deviation of 30.6 points.
\begin{parts}
\part[5] Write the hypotheses \textbf{and identify which is the claim}:
\[ \left\{ \begin{array}{ll}
H_0 \colon & \mathbf{\sigma\leq 30} \\
H_a \colon & \mathbf{\sigma>30} (\text{\textbf{claim}}) 
\end{array} \right. \]
\part[2] Based on your answer to (a), is this a left-tailed, a right-tailed, or a two-tailed test? \\
\textit{Solution}: Right-tailed test. From the $\chi^2$ table, we see that $\chi_R^2=33.409$. 
\part[6] Compute the test statistic. \\
\textit{Solution}: $\chi^2 = \dfrac{17(30.6)^2}{30^2} = 17.68$
\part[3] Circle one: \hspace{20pt} reject $H_0$ \hspace{20pt} OR \hspace{20pt} \circled{fail to reject $H_0$}
\part[2] Write a sentence to respond to the claim. \\
\textit{Solution}: There is not enough evidence to support the claim that the standard deviation for eight-grade students on a U.S. history assessment test is greater than 30.6 points.
\end{parts}
\newpage
\begin{center}{\huge Do ONE of the following two problems (\#6 or \#7). Cross out the one you do \underline{\textbf{NOT}} want me to grade!!}\end{center}
\question[25] Let $\alpha=0.01$ and assume the population variances are equal. A marine biologist claims that the mean length of mature female pink seaperch is different in fall and winter. A sample of 27 mature female pink seaperch collected in \textbf{fall} has a mean length of 127 millimeters and a standard deviation of 14 millimeters. A sample of 25 mature female pink seaperch collected in \textbf{winter} has a mean length of 117 millimeters and a standard deviation of 9 millimeters. 
\begin{parts}
\part[6] Write the hypotheses \textbf{and identify which is the claim}: \\
\textit{Solution}: First let us summarize the data: \\
\begin{minipage}{0.49\textwidth}
\underline{Fall} \\
$n_1=27$ \\
$\bar{x}_1=1274$ \\
$s_1=14$
\end{minipage}
\begin{minipage}{0.49\textwidth}
\underline{Winter} \\
$n_2=25$ \\
$\bar{x}_2=117$ \\
$s_2=9$
\end{minipage}

\[ \left\{ \begin{array}{ll}
H_0 \colon & \mathbf{\mu_1=\mu_2} \\
H_a \colon & \mathbf{\mu_1 \neq \mu_2} \text{\textbf{(claim)}} 
\end{array} \right. \]
\part[3] Based on your answer to (a), is this a left-tailed, a right-tailed, or a two-tailed test? \\
\textit{Solution}: Two-tailed test. Note that here the degree of freedom is $n_1+n_2-2=27+25-2=50$. From the $t$-distribution, we see that the rejection region is given by $t>2.750$ or $t<-2.750$.
\part[8] Compute the test statistic. \\
\textit{Solution}: First compute
\[ \hat{\sigma} = \sqrt{\dfrac{(26)(14^2)+(24(9^2))}{27+25-2}} = 11.86. \]
Now compute
\[ s_{\bar{x}_1,\bar{x}_2} = \hat{\sigma} \sqrt{ \dfrac{1}{27} + \dfrac{1}{25}} =  3.29 \]
\vfill
Therefore
\[ t = \dfrac{\bar{x}_1-\bar{x}_2}{s_{\bar{x}_1,\bar{x}_2}} = \dfrac{127-117}{3.29} = 3.03\]


\part[5] Circle one: \hspace{20pt} reject $H_0$ \hspace{20pt} OR \hspace{20pt} \circled{fail to reject $H_0$}
\part[3] Write a sentence to respond to the claim. \\

\textit{Solution}: There is sufficient evidence to support the claim that the mean length of mature female seaperch is different in fall and winter.
\vfill
\end{parts}

\newpage 

\question[25] Let $\alpha=0.05$. A researcher claims that the proportion of males 18 to 24 who enrolled in college is less than the proportion of females ages 18 to 24 who enrolled in college. In a survey of 200 males ages 18 to 24, $39\%$ were enrolled in college. In a survey of 220 females ages 18 to 24, $45\%$ were enrolled in college.
\begin{parts}
\part[6] Write the hypotheses \textbf{and identify which is the claim}:\\
\textit{Solution}: \\
\begin{tabular}{l|l}
Male & Female \\
\hline
$n_1=200$ & $n_2=220$ \\
$\hat{p}_1=0.39$ & $\hat{p}_2=0.45$
\end{tabular}
\[ \left\{ \begin{array}{ll}
H_0 \colon & \mathbf{p_1} \geq \mathbf{p_2} \\
H_a \colon & \mathbf{p_1} < \mathbf{p_2} (\text{\textbf{claim}})
\end{array} \right. \]
\part[3] Based on your answer to (a), is this a left-tailed, a right-tailed, or a two-tailed test? \\
\textit{Solution}: Left-tailed with critical value $z_0=-1.64$.
\part[8] Compute the test statistic. \\
\textit{Solution}: First find $x_1$ and $x_2$: $x_1= \hat{p}_1n_1=(0.39)(200)=78$ and $x_2=\hat{p}_2n_2=(0.45)(220)=99$. Using these, we may compute
\[ \bar{p} = \dfrac{x_1+x_2}{n_1+n_2} = \dfrac{78+99}{200+220} = \dfrac{177}{420} = 0.4214,\]
hence
\[ \bar{q} = 1-\bar{p} = 0.5786.\]
Now we may calculate the test statistic:
\[ z = \dfrac{\hat{p}_1-\hat{p}_2}{\sqrt{\bar{p}\bar{q}\Big( \frac{1}{n_1} + \frac{1}{n-2} \Big)}} = \dfrac{0.39-0.45}{\sqrt{0.4214(0.5786)\Big( \frac{1}{200} + \frac{1}{220} \Big)}} = -1.243.\]
\part[5] Circle one: \hspace{20pt} reject $H_0$ \hspace{20pt} OR \hspace{20pt} \circled{fail to reject $H_0$}
\part[3] Write a sentence to respond to the claim. \\
\textit{Solution}: There is not sufficient evidence to support the claim that the proportion of males 18 to 24 who enrolled in college is less than the proportion of females ages 18 to 24 who enrolled in college.
\vfill
\end{parts}
\newpage 


\end{questions}
\end{document}
