## 8.4 Statistical Test for Difference of Population Means

Our last (!) test applies to differences of means. Such tests are very common when you conduct a study involving two groups. In many medical trials, for example, subjects are randomly divided into two groups. One group receives a new drug, the second receives a placebo (sugar pill). Then the researcher measures any differences between the two groups.

Fortunately, we know how to do Hypothesis testing, and in this case we will exclusively use Excel to perform the caluclations for us. Here is the setup for this test:

- Null Hypothesis: two means M
_{1}and M_{2}differ by a fixed amount c, i.e. M_{1}- M_{2}= c- Alternative Hypothesis: the two means M
_{1}and M_{2}do not differ by the amount c, i.e. M_{1}- M_{2}not equal to c (2-tail)

- Test Statistics: as computed by Excel
- Rejection Region: probability as computed by Excel

Example 1: Two procedures to determine the amylase in human body fluids were studied. The "original" method is considered to be an acceptable standard method, while the "new" method uses a smaller volume of water, making it more convenient as well as more economical. It is claimed that the amylase values obtained by the new method average at least 10 units greater than the orresponding values from the orignal method. A test using the original method was conducted on 14 subjects, the test with the new method on 15 subjects, giving the data displayed in the table below. Test the claim at the 1% level.

We need to be careful as to which variable is the first and which is the second one. In our example we want to test whether the average for the new method is 10 units larger than the old average. Since our procedure always tests M

Original New 38 46 48 57 58 73 53 60 75 86 58 67 59 65 46 58 69 85 59 74 81 96 44 55 56 71 50 63

74 _{1}- M_{2 }we have to pick as M_{1}the "new method" data and as M_{2 }the "original method" data. With those choices for M_{1}and M_{2 }the statistical test corresponding to our example is setup as follows:

To continue, start Excel and enter the above data. Note that you do not really need to enter the first column, only the data for the original and new method is relevant.

- Null Hypothesis: M
_{1}- M_{2 }= 10

- Alternative Hypothesis: M
_{1}- M_{2 }not equal to 10

Select Tools | Data Analysis ... then select t-Test: Two Sample, Assuming Unequal Variance

There are several two-sample tests available, for specific situations. A t-test assuming unequal variance is the most general one so select that. You should see a dialog window similar to the following:

Since we picked the "new method" data as variable 1 we need to put the data for the second column in the "variable 1" range and the first column data in the "variable 2" range:

Excel will produce output similar to the following:

- In the Variable 1 Range: enter the range for the data from the "New" method (column B)

- In the Variable 2 Range: enter the range for the data from the "Original" method (column A)

- In the Hypothesized Mean Difference: enter the number 10
- For the Alpha value: enter the number 0.01
- Make sure to check the Labels box and click on Okay.

This output computes the mean and
standard deviations of both variables, but most importantly computes
the numbers needed to complete our test:

Comments:

To test whether there is a difference we simply set the hypothesized difference to 0 (in which case it actually does not matter which variable is the first and which the second). Therefore we repeat the above test, but this time we enter 0 as hypothesized difference instead of 10 and 0.05 as our Alpha level. Excel will produce the following values as output (make sure to check it yourself):

Example 3: The data file employeenumeric-split.xls contains the salaries for the Acme Widget Company, separated by sex. Use that data to test the hypothesis that women make at least $10,000 less on average than men.

First we determine which salary should be variable 1 and which variable 2:

That's all, folks -:)

- Test Statistics: as computed by Excel, t = 0.4169

- Rejection Region: probability as computed by Excel: p = 0.68 (2-tail)

Comments:

- Excel requires that the hypothesized difference is not negative.
If you want to test for a negative difference, switch the variables
around and the difference will be positive.

- The actual difference, for this data, is 68.66 - 56.71 = 11.95. That difference is different from 10, but not significantly different, according to our test.

To test whether there is a difference we simply set the hypothesized difference to 0 (in which case it actually does not matter which variable is the first and which the second). Therefore we repeat the above test, but this time we enter 0 as hypothesized difference instead of 10 and 0.05 as our Alpha level. Excel will produce the following values as output (make sure to check it yourself):

- Null Hypothesis: M
_{1}- M_{2 }= 0

- Alternative Hypothesis: M
_{1}- M_{2 }not equal to 0

- Test Statistics: as computed by Excel, t = 2.55242

- Rejection Region: probability as computed by Excel: p = 0.016668 (2-tail)

Example 3: The data file employeenumeric-split.xls contains the salaries for the Acme Widget Company, separated by sex. Use that data to test the hypothesis that women make at least $10,000 less on average than men.

First we determine which salary should be variable 1 and which variable 2:

- if women are variable 1 and men are variable 2, then women making $10,000 less than men means M
_{1}- M_{2}= -10000 - if men are variable 1 and women are variable 2, then women making $10,000 less than men means M
_{1}- M_{2}= 10000

- Null Hypothesis: M
_{1}- M_{2 }= 10000

- Alternative Hypothesis: M
_{1}- M_{2 }not equal to 10000

- Test Statistics: as computed by Excel, t = 4.10335

- Rejection Region: probability as computed by Excel: p = 5.089E-05 (2-tail)

That's all, folks -:)