\documentclass[11pt, oneside]{article}   	% use "amsart" instead of "article" for AMSLaTeX format
\usepackage[top=1in,bottom=0.5in]{geometry}                		% See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   		% ... or a4paper or a5paper or ... 
%\geometry{landscape}                		% Activate for rotated page geometry
%\usepackage[parfill]{parskip}    		% Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}				% Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
								% TeX will automatically convert eps --> pdf in pdflatex		
\usepackage{amssymb, amsmath}
\usepackage{hyperref}
\usepackage{color}
%SetFonts

%SetFonts
%0.77652974 -0.94089785 -0.66666491 -0.04677145

\title{Stat 185 - In class problems \\
\large Wednesday, November 8}
\date{}							% Activate to display a given date or no date
\author{}

\begin{document}
\maketitle
\thispagestyle{empty}
\pagestyle{empty}
\vspace{-0.5in}

\begin{enumerate}		
	\item I've got two CSV files on my webspace that you can read into R as follows:
	\begin{verbatim}
	df1 = read.csv("http://www.marksmath.org/data/book_prices_arts.csv")
	df2 = read.csv("http://www.marksmath.org/data/book_prices_sciences.csv")
	\end{verbatim}
	\begin{enumerate}
		\item Use the \texttt{head} or \texttt{tail} command to examine the first few rows of these data files. Can you conjecture what these files contain?
		\item Use the \texttt{t.test} command to examine whether the Amazon price of one of these classes of books is, on average, different from the other.
	\end{enumerate}
	\textit{Note}: Don't forget that we did something similar when we compared race times between older and younger runners.
	
	\item In a sample of 12 Republicans, 8 were for issue 1 and 4 against. In a sample of 19 Democrats, 7 were for issue 1 and 12 against.
	Let's use this data to explore whether there is a genuine difference in the views of Democrats and Republicans on issue 1 to a 95\% level of confidence.
	\begin{enumerate}
		\item Compute the observed proportions $\hat{p}_R$ and $\hat{p}_D$, as well as the difference $$\hat{p} = \hat{p}_D-\hat{p}_R.$$
		\item Compute the standard error.
		\item Compute the test statistic.
		\item Use a command that looks something like \texttt{2*pt(-1.2,3)} to compute the $p$-value.
		\item State the conclusion of the test.
	\end{enumerate}
	\textit{Note}: You can find relevant formulae in our class notes on relating data sets and it might be convenient to do the computations on the computer!
\end{enumerate}


\end{document}  
