\setcounter{ExampleCounter}{1}
We can use confidence intervals and hypothesis tests to determine whether a linear model is a good fit.  More specifically, we can tell which of many factors are good predictors.

We'll do three things in this section:
\begin{enumerate}
\item \text{}
\vspace{0.5in}

\item \text{}
\vspace{0.5in}

\item \text{}
\vspace{0.5in}

\end{enumerate}

We'll find out that the last two of these three are really the same process, so there are really just two distinct things that we'll do.\\

When the points that we plot in a scatter plot form a sample from a larger population, we assume that the regression line we draw is an estimate of the regression line for the population.  We want to use the sample regression line to draw inferences about the population regression line.

\subsection{Confidence Intervals for Slope}
The population regression line is 
\vspace{0.6in}

The sample slope $a$ is a point estimate for the population slope $\alpha$.

Remember, a confidence interval looks like
\vspace{0.6in}

and the margin of error is a $z$ or $t$ value multiplied by a standard error.

\begin{formula}{Confidence Interval for Slope}
\vspace*{3in}
\end{formula}

\paragraph{Using Your Calculator} Press \includegraphics[height=0.3in]{CalcStatButton} and scroll over to the \texttt{TESTS} menu.  Almost at the bottom of the menu is \texttt{G:LinRegTInt}
\begin{center}
\begin{tabular}{c c c}
\includegraphics[height=1in]{CalcLinRegTInt}
&
\includegraphics[height=1in]{CalcLinRegTInt2}
&
\includegraphics[height=1in]{CalcLinRegTInt3}
\end{tabular}
\end{center}

\paragraph{Interpreting the Interval} What does this confidence interval tell us?
\begin{itemize}
\item \text{}
\vspace{0.5in}

\begin{center}
\begin{tikzpicture}
\begin{axis}[
    xmin=100, xmax=1100,
    ymin=100, ymax=500,
    axis lines=center,
    axis on top=false,
    domain=0:1,
    x=0.01cm,
    y=0.015cm,
    xtick={100,300,...,1100},
    xticklabels={},
    ytick={100,200,...,500},
    yticklabels={},
    axis lines=middle,
    axis line style={->},
    x label style={at={(axis description cs:0.5,-0.1)},anchor=north},
    y label style={at={(axis description cs:-0.11,.5)},rotate=90,anchor=south},
    %xlabel={Size (sq. ft.)},
    %ylabel={Price (\$1000s)},
    grid=none
    ]
	
\end{axis}
\end{tikzpicture}
\end{center}
\vfill
\pagebreak

\item \text{}
\vspace{0.5in}

\item \text{}
\vspace{0.5in}

\item \text{}
\vspace{0.5in}

\end{itemize}

\subsection{Hypothesis Testing with Slope}
The most common test is the same as the confidence interval:\\ testing whether or not the population slope $\alpha$ is 0.

\begin{formula}{Hypothesis Testing with Slope}
\paragraph{Step 1:} State the Hypotheses
\begin{center}
\begin{tabular}{c c}
$H_0$ & $H_1$\\
\hline
\\
$\alpha = 0$ & $\alpha \neq 0$\\
$\alpha \geq 0$ & $\alpha < 0$\\
$\alpha \leq 0$ & $\alpha > 0$
\end{tabular}
\end{center}

\paragraph{Step 2:} Compute the Test Statistic
\[t_{\alpha/2} = \dfrac{a}{s_a} \hspace*{0.5in} df = n-2\]

\paragraph{Step 3:} Calculate $p$, using the appropriate tail(s) of Student's $t$ distribution.

\paragraph{Step 4:} Draw a conclusion.
\end{formula}

\paragraph{Using Your Calculator} Use \texttt{LinRegTTest}
\vfill
\pagebreak

\begin{example}{Hypothesis Testing with Slope}
The following table displays the number of grams of fat per 100 grams of product and number of calories for a sample of 18 fast food products.
\begin{center}
\begin{tabular}{l c c}
Product & Fat ($x$) & Calories ($y$)\\
\hline
\\
Burger King Chicken Tenders & 16.67 & 289\\
Burger King Croissan'wich & 25.45 & 376\\
Domino's Cheese Pizza, Thin Crust & 16.82 & 315\\
Kentucky Fried Chicken Xtra Crispy & 16.55 & 268\\
Kentucky Fried Chicken Original Recipe & 12.03 & 221\\
Little Caesar's Cheese Pizza Thin Crust & 16.99 & 309\\
McDonald's Big and Tasty & 13.68 & 226\\
McDonald's Biscuit & 16.01 & 344\\
McDonald's Chocolate Triple Shake & 4.51 & 163\\
McDonald's Deluxe Cinnamon Roll & 16.24 & 367\\
McDonald's Hot Caramel Sundae & 4.89 & 188\\
Papa John's Pepperoni Pizza Original Crust & 11.86 & 275\\
Popeye's Biscuit & 24.53 & 408\\
Popeye's Fried Chicken & 35.39 & 460\\
Taco Bell Burrito Supreme with Beef & 8.05 & 189\\
Taco Bell Nachos & 22.17 & 366\\
Wendy's Chicken Nuggets & 23.17 & 334\\
Wendy's Classic Double & 14.20 & 241
\end{tabular}
\end{center}

Test the claim that the slope is greater than 0.\\

\paragraph{Hypotheses:} \text{}
\begin{align*}
H_0:\ &\alpha \leq 0\\
H_1:\ &\alpha > 0
\end{align*}

\begin{center}
\begin{tabular}{c c c}
\includegraphics[height=1in]{CalcLinRegTTest}
&
\includegraphics[height=1in]{CalcLinRegTTest2}
&
\includegraphics[height=1in]{CalcLinRegTTest3}
\end{tabular}
\end{center}

Since $p$ is small, we reject the null hypothesis and conclude that the slope is significantly larger than 0.
\end{example}

\paragraph{The point:} finding which factors are important in explaining some outcome.
\vfill
\pagebreak

\subsection{Hypothesis Testing with the Correlation Coefficient}
This one's a freebie:
\begin{itemize}
\item \text{}
\vspace{0.75in}

\item \text{}
\vspace{0.75in}

\item \text{}
\vspace{0.75in}

\item \text{}
\vspace{0.75in}

\end{itemize}

\vfill
\pagebreak