Difference Between Means

Hypothesis Testing of the Difference Between Two Means

Do employees perform better at work with music playing.  The music was turned on during the working hours of a business with 45 employees.  There productivity level averaged 5.2 with a standard deviation of 2.4.  On a different day the music was turned off and there were 40 workers.  The workers' productivity level averaged 4.8 with a standard deviation of 1.2.  What can we conclude at the .05 level?

Solution

We first develop the hypotheses

        H0m1 - m2  =  0       

        H1m1 - m2  >  0

Next we need to find the standard deviation.  Recall from before, we had that the mean of the difference is 

        mx  =  m1 - m2 

and the standard deviation is 

        sx  = 

We can substitute the sample means and sample standard deviations for a point estimate of the population means and standard deviations.  We have

       

and 

       

Now we can calculate the z-score.  We have

                    0.4
        z  =                       =  0.988
                   0.405

Since this is a one tailed test, the critical value is 1.645 and 0.988 does not lie in the critical region.  We fail to reject the null hypothesis and conclude that there is insufficient evidence to conclude that workers perform better at work when the music is on.  Using the P-Value technique, we see that the P-value associated with 0.988 is

        P  =  1 - 0.8389 =  0.1611

which is larger than 0.05.  Yet another way of seeing that we fail to reject the null hypothesis.

Note:  It would have been slightly more accurate had we used the t-table instead of the z-table.  To calculate the degrees of freedom, we can take the smaller of the two numbers n1 - 1 and n2 - 1.  So in this example, a better estimate would use 39 degrees of freedom.  The t-table gives a value of 1.690 for the t.95 value.  Notice that 0.988 is still smaller than 1.690 and the result is the same.  This is an example that demonstrates that using the t-table and z-table for large samples results in practically the same results.



 Hypothesis Testing For a Difference Between Means for Small Samples Using Pooled Standard Deviations  (Optional)

Recall that for small samples we need to make the following assumptions:

 

  1. Random unbiased sample.

  2. Both population distributions are normal.

  3. The two standard deviations are equal.  

 

 If we know s, then the sampling standard deviation is:

 

       

If we do not know s then we use the pooled standard deviation.


       

Putting this together with hypothesis testing we can find the t-statistic.


 

 and use n1 + n2 - 2 degrees of freedom.  

 

 

Example

Nine dogs and ten cats were tested to determine if there is a difference in the average number of days that the animal can survive without food.  The dogs averaged 11 days with a standard deviation of 2 days while the cats averaged 12 days with a standard deviation of 3 days.  What can be concluded? (Use a = .05)

 

Solution

We write:

        H0:   mdog - mcat = 0

        H1:   mdog - mcat  0

We have:  

        n =  9,         n2  = 10

       x1  =  11,      x2  =  12

        s1  =  2,         s2  =  3

so that 

       

and 

       

The t-critical value corresponding to a = .05 with 10 + 9 - 2 = 17 degrees of freedom is 2.11 which is greater than .84.  Hence we fail to reject the null hypothesis and conclude that there is not sufficient evidence to suggest that there is a difference between the mean starvation time for cats and dogs.

   


Hypothesis Testing for a Difference Between Proportions

Inferences on the Difference Between  Population Proportions

If two samples are counted independently of each other we use the test statistic:


          

         
where

                    r1 + r2 
          p  =               
                    n1 + n2        

and 

          q = 1 - p

 

 

Example

Is the severity of the drug problem in high school the same for boys and girls?  85 boys and 70 girls were questioned and 34 of the boys and 14 of the girls admitted to having tried some sort of drug.  What can be concluded at the .05 level?

Solution

The hypotheses are 

        H0:  p1 - p2  =  0        

        H1:    p1 - p2    0    

We have

        p1  =  34/85  =  0.4       p2  =  14/70  =  0.2

        p  =  48/155  =  0.31        q  =  0.69

 

Now compute the z-score

       

Since we are using a significance level of .05 and it is a two tailed test, the critical value is 1.96.  Clearly 2.68 is in the critical region, hence we can reject the null hypothesis and accept the alternative hypothesis and conclude that gender does make a difference for drug use.  Notice that the P-Value is

        P  =  1 - .9963  =  0.0037

is less than .05.  Yet another way to see that we reject the null hypothesis.


Back to the Hypothesis Testing Home Page

Back to the Elementary Statistics (Math 201) Home Page

Back to the Math Department Home Page

e-mail Questions and Suggestions

 

This site has had Hit Counter visitors since February 26, 2001