In the test of the difference of two means, we expect that *x̄*_{1} – *x̄*_{2} would be close to *μ*_{1} – *μ*_{2}. Therefore, the null hypothesis (which tests the status quo of *no difference*), is simply *H*_{0}: *μ*_{1} = *μ*_{2}. The alternative hypothesis is one of the three conditions of non-equality: *H*_{0}: *μ*_{1} ≠ *μ*_{2} (a two-tail test), *H*_{0}: *μ*_{1} > *μ*_{2} (a one-tail test), or *H*_{0}: *μ*_{1} < *μ*_{2} (also a one-tail test).

The test statistic, denoted *t*_{0}, for determining how different our sample results are from what is expected *provided the null hypothesis is correct*, is given by the formula:

You still interpret the test statistic as an overall measurement of the difference, in terms of standard deviations, of our sample mean difference and the claimed difference in population means.

To determine a *P*-value, you still need to rely on technology or a table of *t*-values. The only thing to think about is that we now have two sample sizes, *n*_{1} and *n*_{2}, not just one. So how do we identify the degrees of freedom for this problem? There is a mathematically correct formula for calculating a value for the degrees of freedom for two populations, but in some sense it is unnecessarily complicated for most statistical studies. Here’s an easier way to compute a value for the degrees of freedom: remember that in all cases, we make decisions that are as conservative as possible. The degrees of freedom is simply the smallest of the two values *n*_{1} – 1 and *n*_{2} – 1. In other words, our results and conclusions are limited by the sample size that is the smallest. All other parts of the hypothesis test remain the same.

### Hypothesis Testing with the TI-83/84

All of these test can be found by hitting the [STAT] button and arrowing over to the TESTS menu.

**Calculator Example 1: Comparing two population proportions.**

A software company is testing possible code errors for two types of software. For the first type out of 40 in the sample 14 have errors. For the second type 17out of 50 sampled have errors. Test the claim that the first type has a higher error proportion than the second, that is H_{ο}:p_{1} = p_{2}, H_{α}:p_{1} > p_{2}, with α = 0.1.

**Solution:**

We then choose [6: 2-PropZ-test]. Enter the information in screen 10 below, highlight [Calculate] and then hit ENTER to get screen 11 or choose [Draw] to get screen 12.

The p-value of 0.4605> α, se we Fail to reject the null hypothesis and will need to write a conclusion that reflects this decision.

**NOTE**: x and n must be integers to use this test.

**Calculator Example 2:Testing for two population means.**

The following samples were taken from two normal distributions. Test the claim that the two differ on average, that is, H_{ο}:μ_{1} = μ_{2}, H_{α}:μ_{1} ≠ μ_{2}, with α=0.05.

**Solution:**

Select [3:2-SampZTest] and enter the information shown in screen 13, highlight [Calculate] and press ENTER to get the results shown in screen 14 or [Draw] to get the screen shown in screen 15.

The p-value of 0.2162> α, se we Fail to reject the null hypothesis and will need to write a conclusion that reflects this decision.

**NOTE**: Your screen will not show as much as Screen 1 image you will need to arrow down to see it all.