Dataplot Vol 1 Vol 2

# 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:

$$p_{\mbox{diff}} = p_1 - p_2$$

$$p_{\mbox{se}} = \sqrt{\frac{p_1(1 - p_1)} {n_1} + \frac{p_2(1 - p_2)}{n_2}}$$

$$p_{\mbox{diff}} \pm p_{se} \Phi^{-1}(1 - \alpha/2)$$

with $$\Phi^{-1}$$ denoting the percent point function of the standard normal distribution.

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
ANOP LIMITS 138 142
SET WRITE DECIMALS 5
DIFFERENCE OF PROPORTION CONFIDENCE LIMITS Y1 Y2

This command generates the following output.

Two-Sided Confidence Limits for
the Difference of Proportions

First Response Variable:  Y1
Second Response Variable: Y2

Sample 1:
Number of Observations:                    10
Number of Successes:                       5
Proportion of Successes:                   0.50000

Sample 2:
Number of Observations:                    10
Number of Successes:                       9
Proportion of Successes:                   0.90000

Difference Between Proportions:            -0.40000

Warning: if either sample size is less
than 20, the normal approximation
may not be accurate.

------------------------------------------
Confidence          Lower          Upper
Value (%)          Limit          Limit
------------------------------------------
50.000       -0.52437       -0.27563
75.000       -0.61211       -0.18789
90.000       -0.70330       -0.09670
95.000       -0.76140       -0.03860
99.000       -0.87496        0.07496
99.900       -1.00674        0.20674
99.990       -1.11739        0.31739
99.999       -1.21449        0.41449


NIST is an agency of the U.S. Commerce Department.

Date created: 6/5/2001
Last updated: 10/13/2015