\setcounter{ExampleCounter}{1}
We'll use the same four steps as every hypothesis test:
\paragraph{Step 1:} State the hypotheses.
\begin{center}
\begin{tabular}{c | c}
$H_0$ & $H_1$\\
\hline
& \\
$\mu_1 = \mu_2$ & $\mu_1 \neq \mu_2$\\
$\mu_1 \leq \mu_2$ & $\mu_1 > \mu_2$\\
$\mu_1 \geq \mu_2$ & $\mu_1 < \mu_2$
\end{tabular}
\end{center}

\paragraph{Step 2:} Calculate the test statistic.
\[t = \dfrac{(\overline{x_1}-\overline{x_2})-(\mu_1-\mu_2)}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}\]

\[df=\dfrac{\left(\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}\right)^2}{\left(\dfrac{1}{n_1-1}\right) \left(\dfrac{s_1^2}{n_1}\right)^2 + \left(\dfrac{1}{n_2-1}\right) \left(\dfrac{s_2^2}{n_2}\right)^2}\]

\paragraph{Step 3:} Calculate the p value.
\begin{center}
\texttt{tcdf(-1000000,t,df)} or similar
\end{center}

\paragraph{Step 4:} Draw a conclusion.
\begin{itemize}
\item If $p < \alpha$, reject $H_0$.
\item If $p > \alpha$, fail to reject $H_0$.
\end{itemize}

\subsection{Using Your Calculator}
Since the population standard deviation is \emph{unknown}, use the \texttt{2-SampTTest} in the \texttt{TESTS} menu.  You can either enter the raw data or the summary statistics.
\begin{center}
\begin{tabular}{c c}
\includegraphics[height=1in]{Calc2TTestData}
&
\includegraphics[height=1in]{Calc2TTestStats}
\end{tabular}
\end{center}

In either case, make sure to keep the two populations separate, enter the appropriate alternate hypothesis, and leave the \texttt{Pooled} option as \texttt{No}.

Press \texttt{Calculate} to see the t and p values, or press \texttt{Draw} to see a sketch of the distribution, with the appropriate area shaded.

\begin{example}{Comparing Diets}
Are low-fat diets or low-carb diets more effective for weight loss? A sample of 77 subjects went on a low-carbohydrate diet for six months. At the end of that time, the sample mean weight loss was 4.7 kilograms with a sample standard deviation of 7.16 kilograms. A second sample of 79 subjects went on a low-fat diet. Their sample mean weight loss was 2.6 kilograms with a standard deviation of 5.90 kilograms. Can you conclude that the mean weight loss differs between the two diets? Use the $\alpha=0.01$ level.

\paragraph{Step 1:} State the hypotheses.
\begin{align*}
H_0:\ &\mu_1 = \mu_2\\
H_1:\ &\mu_1 \neq \mu_2
\end{align*}

\paragraph{Step 2:} Calculate the test statistic.   (using the calculator)
\[t=1.9965\]

\begin{center}
\begin{tikzpicture}
\begin{axis}[
  no markers, domain=-4:4, samples=100,
  axis lines*=none, xlabel=$x$,
  hide y axis,
  every axis y label/.style={at=(current axis.above origin),anchor=south},
  every axis x label/.style={at=(current axis.right of origin),anchor=west},
  height=5cm, width=12cm,
  xtick={-2,0,2}, 
  ytick=\empty,
  xticklabel style={align=right},
  xticklabels={$t=-1.9965$,0,$t=1.9965$},
  enlargelimits=false, clip=false, %axis on top,
  %grid = major
  ]
  \addplot [fill=cyan!40, draw=none, domain=2:4] {gauss(0,1)} \closedcycle;
  \addplot [fill=cyan!40, draw=none, domain=-4:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=-2:-1] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=1:2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=-3:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=2:3] {gauss(0,1)} \closedcycle;
  \addplot [very thick,cyan!40!black] {gauss(0,1)};


\draw [yshift=-0.75cm, -latex](axis cs:2,0) -- node [fill=white] {$p/2$} (axis cs:4,0);
\draw [yshift=-0.75cm, -latex](axis cs:-2,0) -- node [fill=white] {$p/2$} (axis cs:-4,0);
\end{axis}

\end{tikzpicture}
\end{center}

\paragraph{Step 3:} Calculate the p value that corresponds to this area.  Use the calculator.
\[p=0.0477\]

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

Since $p > 0.01$, we fail to reject the null hypothesis, so we find no significant difference between the weight lost by these two groups.
\end{example}
\vfill
\pagebreak

\begin{example}{Birth Order and IQ}
In a study of birth order and intelligence, IQ tests were given to 18- and 19-year-old men to estimate the size of the difference, if any, between the mean IQs of firstborn sons and secondborn sons. The following data for 10 firstborn sons and 10 secondborn sons are consistent with the means and standard deviations reported in the article. It is reasonable to assume that the samples come from populations that are approximately normal.
\begin{center}
\begin{tabular}{l r}
\begin{tabular}{c c c c c}
\hline
\multicolumn{5}{c}{\cellcolor{gray!50}Firstborn}\\
\hline
104	& 82 & 102 & 96	& 129\\
89 & 114 & 107 & 89 & 103\\
\hline
\end{tabular}
&
\begin{tabular}{c c c c c}
\hline
\multicolumn{5}{c}{\cellcolor{gray!50}Secondborn}\\
\hline
103	& 103 & 91 & 113 & 102\\
103 & 92 & 90 & 114 & 113\\
\hline
\end{tabular}
\end{tabular}
\end{center}
Can you conclude that there is a difference in mean IQ between firstborn and secondborn sons? Use the $\alpha=0.01$ level.

\paragraph{Step 1:} State the hypotheses.
\begin{align*}
H_0:\ &\mu_1 = \mu_2\\
H_1:\ &\mu_1 \neq \mu_2
\end{align*}

\paragraph{Step 2:} Calculate the test statistic.  (using the calculator)
\[t=-0.1733\]

\begin{center}
\begin{tikzpicture}
\begin{axis}[
  no markers, domain=-4:4, samples=100,
  axis lines*=none, xlabel=$x$,
  hide y axis,
  every axis y label/.style={at=(current axis.above origin),anchor=south},
  every axis x label/.style={at=(current axis.right of origin),anchor=west},
  height=5cm, width=12cm,
  xtick={-0.5,0.5}, 
  ytick=\empty,
  xticklabel style={align=right},
  xticklabels={$t=-0.17$,$t=0.17$},
  enlargelimits=false, clip=false, %axis on top,
  %grid = major
  ]
  \addplot [fill=cyan!40, draw=none, domain=0.5:4] {gauss(0,1)} \closedcycle;
  \addplot [fill=cyan!40, draw=none, domain=-4:-0.5] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=-2:-1] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=1:2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=-3:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=2:3] {gauss(0,1)} \closedcycle;
  \addplot [very thick,cyan!40!black] {gauss(0,1)};


\draw [yshift=-0.75cm, -latex](axis cs:0.5,0) -- node [fill=white] {$p/2$} (axis cs:4,0);
\draw [yshift=-0.75cm, -latex](axis cs:-0.5,0) -- node [fill=white] {$p/2$} (axis cs:-4,0);
\end{axis}

\end{tikzpicture}
\end{center}

\paragraph{Step 3:} Calculate the p value that corresponds to this area.  Use the calculator.
\[p=0.8646\]

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

Since $p > 0.01$, we fail to reject the null hypothesis, so we find no significant difference between these groups.
\end{example}
\vfill
\pagebreak

\begin{example}{Postsurgical Treatment}
A new postsurgical treatment was compared with a standard treatment. Seven subjects received the new treatment, while seven others (the controls) received the standard treatment. The recovery times, in days, are given below.
\begin{center}
\begin{tabular}{l c c c c c c c}
\hline
Treatment: & 12 & 13 & 15 & 19 & 20 & 21 & 24\\
Control: & 18 & 23 & 24 & 30 & 32 & 35 & 39\\
\hline
\end{tabular}
\end{center}

Can you conclude that the mean recovery time for those receiving the new treatment is less than the mean for those receiving the standard treatment? Use the $\alpha=0.05$ level.

\paragraph{Step 1:} State the hypotheses.
\begin{align*}
H_0:\ &\mu_1 \geq \mu_2\\
H_1:\ &\mu_1 < \mu_2
\end{align*}

\paragraph{Step 2:} Calculate the test statistic.  
\[t=-3.3724\]

\begin{center}
\begin{tikzpicture}
\begin{axis}[
  no markers, domain=-4:4, samples=100,
  axis lines*=none, xlabel=$x$,
  hide y axis,
  every axis y label/.style={at=(current axis.above origin),anchor=south},
  every axis x label/.style={at=(current axis.right of origin),anchor=west},
  height=5cm, width=12cm,
  xtick={-2,0}, 
  ytick=\empty,
  xticklabel style={align=right},
  xticklabels={$t=-3.37$,0},
  enlargelimits=false, clip=false, %axis on top,
  %grid = major
  ]
  %\addplot [fill=cyan!40, draw=none, domain=2:4] {gauss(0,1)} \closedcycle;
  \addplot [fill=cyan!40, draw=none, domain=-4:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=-2:-1] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=1:2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=-3:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=2:3] {gauss(0,1)} \closedcycle;
  \addplot [very thick,cyan!40!black] {gauss(0,1)};


%\draw [yshift=-0.75cm, -latex](axis cs:2,0) -- node [fill=white] {$p$} (axis cs:4,0);
\draw [yshift=-0.75cm, -latex](axis cs:-2,0) -- node [fill=white] {$p$} (axis cs:-4,0);
\end{axis}

\end{tikzpicture}
\end{center}

\paragraph{Step 3:} Calculate the p value that corresponds to this area.  Use the calculator.
\[p=0.0036\]

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

Since $p < 0.05$, we reject the null hypothesis, so we believe that the new treatment leads to shorter recovery times.
\end{example}
\vfill
\pagebreak

\begin{example}{King Tut's Curse}
King Tut was an ancient Egyptian ruler whose tomb was discovered and opened in 1923. Legend has it that the archaeologists who opened the tomb were subject to a ``mummy's curse,'' which would shorten their life spans. A team of scientists conducted an investigation of the mummy's curse. They reported that the 25 people exposed to the curse had a mean life span of 70.0 years with a standard deviation of 12.4 years, while a sample of 11 Westerners in Egypt at the time who were not exposed to the curse had a mean life span of 75.0 years with a standard deviation of 13.6 years. Assume that the populations are approximately normal. Can you conclude that the mean life span of those exposed to the mummy's curse is less than the mean of those not exposed? Use the $\alpha=0.05$ level.

\paragraph{Step 1:} State the hypotheses.
\begin{align*}
H_0:\ &\mu_1 \geq \mu_2\\
H_1:\ &\mu_1 < \mu_2
\end{align*}

\paragraph{Step 2:} Calculate the test statistic.  
\[t=-1.0434\]

\begin{center}
\begin{tikzpicture}
\begin{axis}[
  no markers, domain=-4:4, samples=100,
  axis lines*=none, xlabel=$x$,
  hide y axis,
  every axis y label/.style={at=(current axis.above origin),anchor=south},
  every axis x label/.style={at=(current axis.right of origin),anchor=west},
  height=5cm, width=12cm,
  xtick={-1,0}, 
  ytick=\empty,
  xticklabel style={align=right},
  xticklabels={$t=-1.0434$,0},
  enlargelimits=false, clip=false, %axis on top,
  %grid = major
  ]
  %\addplot [fill=cyan!40, draw=none, domain=2:4] {gauss(0,1)} \closedcycle;
  \addplot [fill=cyan!40, draw=none, domain=-4:-1] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=-2:-1] {gauss(0,1)} \closedcycle;
  %\addplot [fill=yellow!20, draw=none, domain=1:2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=-3:-2] {gauss(0,1)} \closedcycle;
  %\addplot [fill=green!20, draw=none, domain=2:3] {gauss(0,1)} \closedcycle;
  \addplot [very thick,cyan!40!black] {gauss(0,1)};


%\draw [yshift=-0.75cm, -latex](axis cs:2,0) -- node [fill=white] {$p$} (axis cs:4,0);
\draw [yshift=-0.75cm, -latex](axis cs:-1,0) -- node [fill=white] {$p$} (axis cs:-4,0);
\end{axis}

\end{tikzpicture}
\end{center}

\paragraph{Step 3:} Calculate the p value that corresponds to this area.  Use the calculator.
\[p=0.1554\]

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

Since $p > 0.05$, we fail reject the null hypothesis, so we find no significant difference between the two groups.
\end{example}
\vfill
\pagebreak