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 PORPORTION CONFIDENCE LIMITS

Name:
    DIFFERENCE OF PROPORTION CONFIDENCE LIMITS
Type:
    Analysis Command
Purpose:
    Generates a confidence interval for the difference between two proportions.
Description:
    Given a set of N1 observations in a variable X1 and a set of N2 observations in a variable X2, we can compute the proportion of successes in each sample as p1 and p2. We can then compute the difference of the proportions as P1 - P2. In addition, the DIFFERENCE OF PROPORTION CONFIDENCE LIMITS command computes a confidence interval for the difference between the two proportions of successes.

    In Dataplot, you define a success by entering the command

      ANOP LIMITS <lower limit> <upper limit>

    before entering the DIFFERENCE OF PROPORTION CONFIDENCE LIMITS command. That is, you specify the lower and upper values that define a success. Then the estimate for the proportion of successes in each sample is simply the number of points in the success region divided by the total number of points. The difference of proportions is then the difference between these two sample proportions. Note that in many programs you would simply enter your data as a series of 0's and 1's where one of these defines a success and the other defines a failure. If your data is already in this format, simply define appropiate limits (e.g., ANOP LIMITS 0.5 1.5).

    If there are P1 successes in N1 observations for sample 1 and P2 successes in N2 observations for sample 2, and the significance level is alpha (e.g., 0.05), then the 2-sided confidence interval for the difference of proportions of successes is computed as:

      PDIFF = P1 - P2
      PSE = SQRT(P1*(1.0-P1)/N + P2*(1.0-P2)/N2)
      (PDIFF - PSE*NORPPF(ALPHA/2), PDIFF + PSE*NORPPF(1-ALPHA/2))

    where NORCDF is the normal cumulative distribution function.

    Dataplot computes this inverval for a number of different probability levels.

Syntax:
    DIFFERENCE OF PROPORTION CONFIDENCE LIMITS <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:
    ANOP LIMITS 0.80 1.0
    DIFFERENCE OF PROPORTION CONFIDENCE LIMITS Y1 Y2

      ANOP LIMITS 0.80 1.0
      DIFFERENCE OF PROPORTION CONFIDENCE LIMITS Y1 Y2 SUBSET TAG > 2
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 size, sample number of successes, and sample proportion of successes are also printed.
Default:
    None
Synonyms:
    None
Related Commands:
    ANOP LIMITS = Specify success region for proportions.
    PROPORTION CONFIDENCE LIMITS = Compute a proportions confidence interval.
    ANOP PLOT = Generate an analysis of proportions plot.
    CONFIDENCE LIMITS = Generate the confidence limits for the mean.
Reference:
    "Statistical Methods", Eigth Edition, Snedecor and Cochran, 1989, Iowa State University Press, pp. 125-128.
Applications:
    Confirmatory Data Analysis
Implementation Date:
    1999/5
Program:
    SKIP 25
    READ NATR332.DAT Y1 Y2
    ANOP LIMITS 138 142
    DIFFERENCE OF PROPORTION CONFIDENCE LIMITS Y1 Y2

    This command generates the following output.

     
               CONFIDENCE LIMITS FOR DIFFERENCE OF PROPORTIONS
                                (2-SIDED)
      
               NUMBER OF OBSERVATIONS FOR SAMPLE 1  =       10
               NUMBER OF SUCCESSES FOR SAMPLE 1     =        5
               PORPORTION OF SUCCESS FOR SAMPLE 1   =    .5000000
               NUMBER OF OBSERVATIONS FOR SAMPLE 2  =       10
               NUMBER OF SUCCESSES FOR SAMPLE 2     =        9
               PORPORTION OF SUCCESS FOR SAMPLE 2   =    .9000000
               DIFFERENCE BETWEEN PROPORTIONS      =   -.4000000
               WARNING: IF EITHER OF THE SAMPLE SIZES
               IS LESS THAN 30, THE NORMAL APPROXIMATION
               MAY NOT BE ACCURATE.
      
        CONFIDENCE   LOWER         UPPER
        VALUE (%)    LIMIT         LIMIT
     ------------------------------------
          50.000  -.524370      -.275630
          75.000  -.612114      -.187886
          90.000  -.703296      -.967040E-01
          95.000  -.761400      -.386004E-01
          99.000  -.874960       .749596E-01
          99.900  -1.00675       .206747
          99.990  -1.11738       .317382
          99.999  -1.21443       .414432
        

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