Math 225 Course Notes


Section 7.3: Hypothesis Testing: The Difference Between Two Population Means


Key Concepts

The basic procedure of hypothesis testing remains the same. State hypotheses, find a test statistic and a sampling distribution with which to compare it, and compute a p-value to measure the consistency of the data with the null hypothesis.

The test statistic to consider in these problems is

  t = (() - (0) ) / 
If the population standard deviations are known, this statistic could be called z and compared to the standard normal distribution.

If both populations are quite large, it can also be compared to a standard normal distribution.

For moderate to small populations, the statistic is best compared to a t distribution with

   
This is best implemented by computer, instead of by hand.

Example

A method to assess the effectiveness of a drug is to measure its concentration in the urine after a period of time. Twenty people are given the first brand and twenty-five are given the second brand. Suppose that it is known that the population standard deviations for concentration are 8.6 and 7.8 (mg%) respectively. For the two samples, the mean concentrations are 19.2 and 15.6 (mg%) one hour after ingestion.

How strong is the evidence against the hypothesis that the two drugs are equally effective?

The hypotheses are

H0:  = 0
HA:  is not 0
The estimate for the difference in population means is the difference in sample means, 19.2 - 15.5 = 3.7. The exact standard error is
   SE = sqrt( (8.6^2 / 20) + (7.8^2 / 25) ) = 2.476
Since we know the standard error for the population, and do not need to estimate it from sample data, we can compare the test statistic to the standard normal curve.
  z = (3.7 - 0) / 2.476 = 1.49
With a two-sided alternative hypothesis, the p-value is the area to the right of 1.49 plus the area to the left of -1.49, which is twice the area to the right of 1.49, or p-value = .1362.

We expect to see results at least this extreme about once every seven times, which is not strong evidence. If the mean difference (3.7) is of practical importance (but not statistical significance) it may well be worth the effort to conduct a larger experiment with a better chance of detecting a true difference.

Example 2 (unknown population SDs)

A method to assess the effectiveness of a drug is to measure its concentration in the urine after a period of time. Twenty people are given the first brand and twenty-five are given the second brand. For the two samples, the mean concentrations are 19.2 and 15.6 (mg%) with standard deviations of 8.6 and 7.8 (mg%) respectively, one hour after ingestion. How strong is the evidence against the hypothesis that the two drugs are equally effective?

The hypotheses are

H0:  = 0
HA:  is not 0
As in the previous example, the test statistic is t = 1.49. The estimated number of degrees of freedom is
   df = 2.476^4 / ( (1/19)(8.6^2 / 20)^2 + (1/24)(7.8^2 / 25)^2 ) = 38.9
With a table, we'll round down to 35 degrees of freedom.

The p-value is twice the area outside of 1.49 under a t-distribution with 38.9 (or 35) degrees of freedom. Since 1.49 lies in between 1.3062 and 1.6896, we can conclude that the p-value is between 2(.05) and 2(.1), or between .1 and .2. (With statistical software, the p-value is computed to be .144.)

This data is fairly consistent with the null hypothesis.



Last modified: Mar 25, 1996

Bret Larget, larget@mathcs.duq.edu