home.gif (1194 bytes)grades.gif (1215 bytes)assignments.gif (1284 bytes)feedback.gif (1254 bytes)discboard.gif (1264 bytes)

syllabus.gif (1124 bytes)terminology.gif (1142 bytes)lectures.gif (1112 bytes)resources.gif (1130 bytes)jmp.gif (1086 bytes)

 

title.gif (3960 bytes)

 

Two Sample T-Tests

  1. Two sample t-tests are used to compare population means of two populations. For instance, when comparing a treatment group to a control group.
     
  2. Hypotheses in two sample tests are also left-, right- or two-tailed. You must be more careful in two sample tests when determining which kind of hypothesis you are testing.
     
    For example, let mu1.gif (317 bytes) be the population mean change in cholesterol levels of adolescent boys who took Lovastatin. Also, let mu2.gif (319 bytes) be the population mean change in cholesterol levels of adolescent boys in a control group who took a placebo.
     
    1. The two-tailed hypothesis is

      Homu1.gif (317 bytes) = mu2.gif (319 bytes)
      Hamu1.gif (317 bytes) ne.gif (273 bytes) mu2.gif (319 bytes)
       
      We could re-write these hypotheses as
       
      Homu1.gif (317 bytes) - mu2.gif (319 bytes) = 0
      Hamu1.gif (317 bytes) - mu2.gif (319 bytes) ne.gif (273 bytes) 0
        
    2. Now consider the hypotheses
       
      Homu1.gif (317 bytes) ge.gif (272 bytes) mu2.gif (319 bytes)
      Hamu1.gif (317 bytes) < mu2.gif (319 bytes)
       
      which can be re-written as
       
      Homu1.gif (317 bytes) - mu2.gif (319 bytes) ge.gif (272 bytes) 0
      Hamu1.gif (317 bytes) - mu2.gif (319 bytes) < 0
        
      Written this way this hypothesis is left-tailed. We must write the hypothesis in the second form to decide if they are left- or right-tailed.
       
  3. The protocol for conducting two sample hypothesis tests are identical to those for one sample tests. The only real difference is the test statistic that should be used, which is:
     
    tstat2.gif (1303 bytes)

    where
     
    s2p.gif (1048 bytes) 
     
    This statistic has a t-distribution with n2 + n2 - 2 degrees of freedom
     
  4. As an example we'll look at the Lovastatin data again.
     
    Let mu1.gif (317 bytes) be the population mean change in cholesterol levels of adolescent boys who took Lovastatin. Let mu2.gif (319 bytes) be the population mean change in cholesterol levels of adolescent boys in a control group who took a placebo.
     
    For the treatment group the sample mean was xbar_1.gif (312 bytes) = -20, the sample sample variance was s2_1.gif (324 bytes) = 244 and the sample size was n1 = 61. For the control group xbar_2.gif (316 bytes) = -3, s2_2.gif (325 bytes) = 65 and n2 = 49.
     
    We'll test if the reduction in cholesterol levels in the treatment group is greater than the control group. In other words:
     
    Homu1.gif (317 bytes) ge.gif (272 bytes) mu2.gif (319 bytes)
    Hamu1.gif (317 bytes) < mu2.gif (319 bytes)
     
    or
     
    Homu1.gif (317 bytes) - mu2.gif (319 bytes) ge.gif (272 bytes) 0
    Hamu1.gif (317 bytes) - mu2.gif (319 bytes) < 0
     
    We'll use a significance level of alpha.gif (281 bytes) = 0.05
     
    Before we can calculate the test statistic we must calculate s2_p.gif (331 bytes) = [(61 - 1)*244 + (49 - 1)*65]/(61 + 49 - 2) = 164.44
     
    So, t = [(-20 - -3) - 0]/sqrt[164.44*(1/61 + 1/49)] = -6.91
     
    This t-statistic has 61 + 49 - 2 degrees of freedom (108 df). Since this is greater than 30 we'll use the z-tables to find p-values.
     
    Since this is a left-tailed test the p-value is P(T < -6.91). Since 6.91 is off the bottom of the z-table the p-value is zero.
     
    Since the p-value is less than alpha.gif (281 bytes) we reject the null hypothesis. We conclude that Lovastatin lowers cholesterol levels more than a placebo.
     

  5. Assumptions: The assumptions of this test are:
     
    1. Both parent populations are normally distributed
       
    2. Random samples were taken from each population
       
    3. The population variances of the two populations are equal

 

E-mail Mr. Callahan at stat110@edcallahan.com with questions or comments about this web site or about the class itself.

This page was last modified on November 15, 1999.