Let X be distributed as . The hypotheses for the test of the proportion p are as follows:




The exact test assumes binomially distributed data and requires and . The test statistic is
The significance probability is split symmetrically for twosided tests, in the sense that each tail is filled with as much as possible up to .
Exact power computations are based on the binomial distribution and computing formulas such as the following from Johnson, Kotz, and Kemp (1992, equation 3.20):
Let and denote lower and upper critical values, respectively. Let denote the achieved (actual) significance level, which for twosided tests is the sum of the favorable major tail () and the opposite minor tail ().
For the upper onesided case,








For the lower onesided case,








For the twosided case,










For the normal approximation test, the test statistic is
For the METHOD=EXACT option, the computations are the same as described in the section Exact Test of a Binomial Proportion (TEST=EXACT) except for the definitions of the critical values.
For the upper onesided case,


For the lower onesided case,


For the twosided case,




For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution
The approximate power is computed as


The approximate sample size is computed in closed form for the onesided cases by inverting the power equation,
and by numerical inversion for the twosided case.
For the normal approximation test using the sample variance, the test statistic is
where .
For the METHOD=EXACT option, the computations are the same as described in the section Exact Test of a Binomial Proportion (TEST=EXACT) except for the definitions of the critical values.
For the upper onesided case,


For the lower onesided case,


For the twosided case,




For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution
(see Chow, Shao, and Wang (2003, p. 82)).
The approximate power is computed as


The approximate sample size is computed in closed form for the onesided cases by inverting the power equation,
and by numerical inversion for the twosided case.
For the normal approximation test with continuity adjustment, the test statistic is (Pagano and Gauvreau, 1993, p. 295):
For the METHOD=EXACT option, the computations are the same as described in the section Exact Test of a Binomial Proportion (TEST=EXACT) except for the definitions of the critical values.
For the upper onesided case,


For the lower onesided case,


For the twosided case,




For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution , where and are derived as follows.
For convenience of notation, define
Then
and




The probabilities , , and and the truncated expectations and are approximated by assuming the normalapproximate distribution of X, . Letting and denote the standard normal PDF and CDF, respectively, and defining d as
the terms are computed as follows:










The mean and variance of are thus approximated by
and
The approximate power is computed as


The approximate sample size is computed by numerical inversion.
For the normal approximation test with continuity adjustment using the sample variance, the test statistic is
where .
For the METHOD=EXACT option, the computations are the same as described in the section Exact Test of a Binomial Proportion (TEST=EXACT) except for the definitions of the critical values.
For the upper onesided case,


For the lower onesided case,


For the twosided case,




For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution , where and are derived as follows.
For convenience of notation, define
Then
and




The probabilities , , and and the truncated expectations and are approximated by assuming the normalapproximate distribution of X, . Letting and denote the standard normal PDF and CDF, respectively, and defining d as
the terms are computed as follows:










The mean and variance of are thus approximated by
and
The approximate power is computed as


The approximate sample size is computed by numerical inversion.
The hypotheses for the equivalence test are




where and are the lower and upper equivalence bounds, respectively.
The analysis is the two onesided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84, but using exact critical values as on p. 116 instead of normalbased critical values.
Two different hypothesis tests are carried out:




and




If is rejected in favor of and is rejected in favor of , then is rejected in favor of .
The test statistic for each of the two tests ( versus and versus ) is
Let denote the critical value of the exact upper onesided test of versus , and let denote the critical value of the exact lower onesided test of versus . These critical values are computed in the section Exact Test of a Binomial Proportion (TEST=EXACT). Both of these tests are rejected if and only if . Thus, the exact power of the equivalence test is




The probabilities are computed using Johnson and Kotz (1970, equation 3.20).
The hypotheses for the equivalence test are




where and are the lower and upper equivalence bounds, respectively.
The analysis is the two onesided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84, but using the null variance instead of the sample variance.
Two different hypothesis tests are carried out:




and




If is rejected in favor of and is rejected in favor of , then is rejected in favor of .
The test statistic for the test of versus is
The test statistic for the test of versus is
For the METHOD=EXACT option, let denote the critical value of the exact upper onesided test of versus using . This critical value is computed in the section z Test for Binomial Proportion Using Null Variance (TEST=Z VAREST=NULL). Similarly, let denote the critical value of the exact lower onesided test of versus using . Both of these tests are rejected if and only if . Thus, the exact power of the equivalence test is




The probabilities are computed using Johnson and Kotz (1970, equation 3.20).
For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution
and the test statistic is assumed to have the normal distribution
(see Chow, Shao, and Wang (2003, p. 84)). The approximate power is computed as


The approximate sample size is computed by numerically inverting the power formula, using the sample size estimate of Chow, Shao, and Wang (2003, p. 85) as an initial guess:
The hypotheses for the equivalence test are




where and are the lower and upper equivalence bounds, respectively.
The analysis is the two onesided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84.
Two different hypothesis tests are carried out:




and




If is rejected in favor of and is rejected in favor of , then is rejected in favor of .
The test statistic for the test of versus is
where .
The test statistic for the test of versus is
For the METHOD=EXACT option, let denote the critical value of the exact upper onesided test of versus using . This critical value is computed in the section z Test for Binomial Proportion Using Sample Variance (TEST=Z VAREST=SAMPLE). Similarly, let denote the critical value of the exact lower onesided test of versus using . Both of these tests are rejected if and only if . Thus, the exact power of the equivalence test is




The probabilities are computed using Johnson and Kotz (1970, equation 3.20).
For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution
and the test statistic is assumed to have the normal distribution
(see Chow, Shao, and Wang (2003), p. 84).
The approximate power is computed as


The approximate sample size is computed by numerically inverting the power formula, using the sample size estimate of Chow, Shao, and Wang (2003, p. 85) as an initial guess:
The hypotheses for the equivalence test are




where and are the lower and upper equivalence bounds, respectively.
The analysis is the two onesided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84, but using the null variance instead of the sample variance.
Two different hypothesis tests are carried out:




and




If is rejected in favor of and is rejected in favor of , then is rejected in favor of .
The test statistic for the test of versus is
where .
The test statistic for the test of versus is
For the METHOD=EXACT option, let denote the critical value of the exact upper onesided test of versus using . This critical value is computed in the section z Test for Binomial Proportion with Continuity Adjustment Using Null Variance (TEST=ADJZ VAREST=NULL). Similarly, let denote the critical value of the exact lower onesided test of versus using . Both of these tests are rejected if and only if . Thus, the exact power of the equivalence test is




The probabilities are computed using Johnson and Kotz (1970, equation 3.20).
For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution , and is assumed to have the normal distribution , where , , , and are derived as follows.
For convenience of notation, define




Then




and








The probabilities , , , , , and and the truncated expectations , , , and are approximated by assuming the normalapproximate distribution of X, . Letting and denote the standard normal PDF and CDF, respectively, and defining and as


the terms are computed as follows:




















The mean and variance of and are thus approximated by




and




The approximate power is computed as


The approximate sample size is computed by numerically inverting the power formula.
The hypotheses for the equivalence test are




where and are the lower and upper equivalence bounds, respectively.
The analysis is the two onesided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84.
Two different hypothesis tests are carried out:




and




If is rejected in favor of and is rejected in favor of , then is rejected in favor of .
The test statistic for the test of versus is
where .
The test statistic for the test of versus is
For the METHOD=EXACT option, let denote the critical value of the exact upper onesided test of versus using . This critical value is computed in the section z Test for Binomial Proportion with Continuity Adjustment Using Sample Variance (TEST=ADJZ VAREST=SAMPLE). Similarly, let denote the critical value of the exact lower onesided test of versus using . Both of these tests are rejected if and only if . Thus, the exact power of the equivalence test is




The probabilities are computed using Johnson and Kotz (1970, equation 3.20).
For the METHOD=NORMAL option, the test statistic is assumed to have the normal distribution , and is assumed to have the normal distribution , where , , and are derived as follows.
For convenience of notation, define
Then




and








The probabilities , , , , , and and the truncated expectations , , , and are approximated by assuming the normalapproximate distribution of X, . Letting and denote the standard normal PDF and CDF, respectively, and defining and as


the terms are computed as follows:




















The mean and variance of and are thus approximated by




and




The approximate power is computed as


The approximate sample size is computed by numerically inverting the power formula.
The twosided % confidence interval for p is
So the halfwidth for the twosided % confidence interval is
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h:
For references and more details about this and all other confidence intervals associated with the CI= option, see Binomial Proportion of Chapter 38: The FREQ Procedure.
The twosided % confidence interval for p is
So the halfwidth for the twosided % confidence interval is
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h:
The twosided % confidence interval for p is
where
and
The halfwidth of this twosided % confidence interval is defined as half the width of the full interval:
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h:
The twosided % confidence interval for p is
where
and
The halfwidth of this twosided % confidence interval is defined as half the width of the full interval:
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h:
The twosided % confidence interval for p is
So the halfwidth for the twosided % confidence interval is
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h:
The twosided % confidence interval for p is
So the halfwidth for the twosided % confidence interval is
Prob(Width) is calculated exactly by adding up the probabilities of observing each that produces a confidence interval whose halfwidth is at most a target value h: