11. Hypothesis Testing for the Difference of Two Independent Means

In the test of the difference of two means, we expect that 12 would be close to μ1μ2. Therefore, the null hypothesis (which tests the status quo of no difference), is simply H0: μ1 = μ2. The alternative hypothesis is one of the three conditions of non-equality: H0: μ1μ2 (a two-tail test), H0: μ1 > μ2 (a one-tail test), or H0: μ1 < μ2 (also a one-tail test).

The test statistic, denoted t0, 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, n1 and n2, 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 n1 – 1 and n2 – 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ο:p1 = p2, Hα:p1 > p2, with α = 0.1.


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.


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.