SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Contacts SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Auxiliary Chapter

DIFFERENCE OF MEANS CONFIDENCE INTERVAL

Name:
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL
Type:
    Analysis Command
Purpose:
    Generates a confidence interval for the difference between two means.
Description:
    The confidence interval for the difference between tow means is defined by:

      (Ybar1 - Ybar2) +/- SQRT[s1**2/n1 + s2**2/n2]*t(1-alpha/2,df)

    where

      Ybar1 = mean of first sample
      Ybar2 = mean of second sample
      s1 = standard deviation of sample 1
      s2 = standard deviation of sample 2
      alpha = the desired significance level
      df = the degrees of freedom

            = (s1**2/n1 + s2**2/n2)**2/[(s1**2/n1)**2*(n1-1) + (s2**2/n2)**2*(n2-1)]

Syntax:
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL <y1> <y2>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable,
                <y2> is the second response variable,
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2 SUBSET TAG > 2
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2 SUBSET Y1 > 0
Note:
    A table of confidence intervals is printed for alpha levels of 50.0, 75.0, 90.0, 95.0, 99.0, 99.9, 99.99, and 99.999. The sample sizes, sample means, sample standard deviations, and the standard error are also printed. The t-value and t-value X standard error are printed in the table.
Default:
    None
Synonyms:
    None
Related Commands:
    CONFIDENCE LIMITS = Generate a confidence interval for the mean.
    T-TEST = Perform a two sample t-test.
    BIHISTOGRAM = Generate a bihistogram.
    QUANTILE-QUANTILE PLOT = Generate a quantile-quantile plot.
    KOLMOGOROV-SMIRNOV TWO SAMPLE TEST = Generate a Kolmogorov- Smirnov two sample test.
Reference:
    Confidence intervals for the difference of two means are covered in most introductory statistics books.
Applications:
    Confirmatory Data Analysis
Implementation Date:
    3/1999
Program:
    SKIP 25
    READ AUTO83B.DAT Y1 Y2
    RETAIN Y2 SUBSET Y2 >= 0
    DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2
        
    Dataplot generates the following output:
     
      
           ***************************************************
           **  DIFFERENCE OF MEANS CONFIDENCE LIMITS Y1 Y2  **
           ***************************************************
      
      
             CONFIDENCE LIMITS FOR DIFFERENCE BETWEEN MEANS
             (2-SIDED)
      
               NUMBER OF OBSERVATIONS FOR SAMPLE 1    =      249
               MEAN FOR SAMPLE 1                      =    20.14458
               STANDARD DEVIATION FOR SAMPLE 1        =    6.414700
               NUMBER OF OBSERVATIONS FOR SAMPLE 2    =       79
               MEAN FOR SAMPLE 2                      =    30.48101
               STANDARD DEVIATION FOR SAMPLE 2        =    6.107710
               DIFFERENCE BETWEEN 2 SAMPLE MEANS      =   -10.33643
               STANDARD ERROR                         =   0.5613111
      
        CONFIDENCE   T     T X STDERR       LOWER         UPPER
        VALUE (%)  VALUE                    LIMIT         LIMIT
     ---------------------------------------------------------------
          50.000   0.675  0.379150      -10.7156      -9.95728
          75.000   1.153  0.647208      -10.9836      -9.68923
          90.000   1.651  0.926709      -11.2631      -9.40973
          95.000   1.969   1.10550      -11.4419      -9.23093
          99.000   2.596   1.45696      -11.7934      -8.87947
          99.900   3.330   1.86910      -12.2055      -8.46733
          99.990   3.954   2.21956      -12.5560      -8.11687
          99.999   4.509   2.53102      -12.8675      -7.80541
      
        

Date created: 2/25/2003
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.