The POWER Procedure

Analyses in the ONESAMPLEFREQ Statement

Exact Test of a Binomial Proportion (TEST=EXACT)

Let X be distributed as normal upper B normal i normal n left-parenthesis upper N comma p right-parenthesis. The hypotheses for the test of the proportion p are as follows:

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p equals p 0 2nd Row 1st Column upper H 1 colon 2nd Column StartLayout Enlarged left-brace 1st Row 1st Column p not-equals p 0 comma 2nd Column two hyphen sided 2nd Row 1st Column p greater-than p 0 comma 2nd Column upper one hyphen sided 3rd Row 1st Column p less-than p 0 comma 2nd Column lower one hyphen sided EndLayout EndLayout

The exact test assumes binomially distributed data and requires upper N greater-than-or-equal-to 1 and 0 less-than p 0 less-than 1. The test statistic is

upper X equals number of successes tilde normal upper B normal i normal n left-parenthesis upper N comma p right-parenthesis

The significance probability alpha is split symmetrically for two-sided tests, in the sense that each tail is filled with as much as possible up to alpha slash 2.

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

upper P left-parenthesis upper X greater-than-or-equal-to upper C vertical-bar upper N comma p right-parenthesis equals upper P left-parenthesis upper F Subscript nu 1 comma nu 2 Baseline less-than-or-equal-to StartFraction nu 2 p Over nu 1 left-parenthesis 1 minus p right-parenthesis EndFraction right-parenthesis where nu 1 equals 2 upper C and nu 2 equals 2 left-parenthesis upper N minus upper C plus 1 right-parenthesis

Let upper C Subscript upper L and upper C Subscript upper U denote lower and upper critical values, respectively. Let alpha Subscript a denote the achieved (actual) significance level, which for two-sided tests is the sum of the favorable major tail (alpha Subscript upper M) and the opposite minor tail (alpha Subscript m).

For the upper one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper P left-parenthesis upper X greater-than-or-equal-to upper C vertical-bar p 0 right-parenthesis less-than-or-equal-to alpha right-brace 2nd Row 1st Column Reject upper H 0 2nd Column if upper X greater-than-or-equal-to upper C Subscript upper U Baseline 3rd Row 1st Column alpha Subscript a 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline vertical-bar p 0 right-parenthesis 4th Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline vertical-bar p right-parenthesis EndLayout

For the lower one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper P left-parenthesis upper X less-than-or-equal-to upper C vertical-bar p 0 right-parenthesis less-than-or-equal-to alpha right-brace 2nd Row 1st Column Reject upper H 0 2nd Column if upper X less-than-or-equal-to upper C Subscript upper L Baseline 3rd Row 1st Column alpha Subscript a 2nd Column equals upper P left-parenthesis upper X less-than-or-equal-to upper C Subscript upper L Baseline vertical-bar p 0 right-parenthesis 4th Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper X less-than-or-equal-to upper C Subscript upper L Baseline vertical-bar p right-parenthesis EndLayout

For the two-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper P left-parenthesis upper X less-than-or-equal-to upper C vertical-bar p 0 right-parenthesis less-than-or-equal-to StartFraction alpha Over 2 EndFraction right-brace 2nd Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper P left-parenthesis upper X greater-than-or-equal-to upper C vertical-bar p 0 right-parenthesis less-than-or-equal-to StartFraction alpha Over 2 EndFraction right-brace 3rd Row 1st Column Reject upper H 0 2nd Column if upper X less-than-or-equal-to upper C Subscript upper L Baseline or upper X greater-than-or-equal-to upper C Subscript upper U Baseline 4th Row 1st Column alpha Subscript a 2nd Column equals upper P left-parenthesis upper X less-than-or-equal-to upper C Subscript upper L Baseline or upper X greater-than-or-equal-to upper C Subscript upper U Baseline vertical-bar p 0 right-parenthesis 5th Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper X less-than-or-equal-to upper C Subscript upper L Baseline or upper X greater-than-or-equal-to upper C Subscript upper U Baseline vertical-bar p right-parenthesis EndLayout
z Test for Binomial Proportion Using Null Variance (TEST=Z VAREST=NULL)

For the normal approximation test, the test statistic is

upper Z left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N p 0 Over left-bracket upper N p 0 left-parenthesis 1 minus p 0 right-parenthesis right-bracket Superscript one-half Baseline EndFraction

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 one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus alpha Baseline right-brace EndLayout

For the lower one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript alpha Baseline right-brace EndLayout

For the two-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript StartFraction alpha Over 2 EndFraction Baseline right-brace 2nd Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline right-brace EndLayout

For the METHOD=NORMAL option, the test statistic upper Z left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus p 0 right-parenthesis Over left-bracket p 0 left-parenthesis 1 minus p 0 right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma StartFraction p left-parenthesis 1 minus p right-parenthesis Over p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction right-parenthesis

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis StartStartFraction z Subscript alpha Baseline plus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis StartStartFraction z Subscript alpha Baseline minus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis StartStartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline plus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis plus normal upper Phi left-parenthesis StartStartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline minus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over p 0 left-parenthesis 1 minus p 0 right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout EndLayout

The approximate sample size is computed in closed form for the one-sided cases by inverting the power equation,

upper N equals left-parenthesis StartFraction z Subscript normal p normal o normal w normal e normal r Baseline StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot plus z Subscript 1 minus alpha Baseline StartRoot p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot Over p minus p 0 EndFraction right-parenthesis squared

and by numerical inversion for the two-sided case.

z Test for Binomial Proportion Using Sample Variance (TEST=Z VAREST=SAMPLE)

For the normal approximation test using the sample variance, the test statistic is

upper Z Subscript s Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N p 0 Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

where ModifyingAbove p With caret equals upper X slash upper N.

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 one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript s Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus alpha Baseline right-brace EndLayout

For the lower one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript s Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript alpha Baseline right-brace EndLayout

For the two-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript s Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript StartFraction alpha Over 2 EndFraction Baseline right-brace 2nd Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript s Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline right-brace EndLayout

For the METHOD=NORMAL option, the test statistic upper Z Subscript s Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus p 0 right-parenthesis Over left-bracket p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma 1 right-parenthesis

(see Chow, Shao, and Wang (2003, p. 82)).

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis z Subscript alpha Baseline plus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis z Subscript alpha Baseline minus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis z Subscript StartFraction alpha Over 2 EndFraction Baseline plus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis plus normal upper Phi left-parenthesis z Subscript StartFraction alpha Over 2 EndFraction Baseline minus StartRoot upper N EndRoot StartFraction p minus p 0 Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout EndLayout

The approximate sample size is computed in closed form for the one-sided cases by inverting the power equation,

upper N equals p left-parenthesis 1 minus p right-parenthesis left-parenthesis StartFraction z Subscript normal p normal o normal w normal e normal r Baseline plus z Subscript 1 minus alpha Baseline Over p minus p 0 EndFraction right-parenthesis squared

and by numerical inversion for the two-sided case.

z Test for Binomial Proportion with Continuity Adjustment Using Null Variance (TEST=ADJZ VAREST=NULL)

For the normal approximation test with continuity adjustment, the test statistic is (Pagano and Gauvreau 1993, p. 295):

upper Z Subscript c Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N p 0 plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis Over left-bracket upper N p 0 left-parenthesis 1 minus p 0 right-parenthesis right-bracket Superscript one-half Baseline EndFraction

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 one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript c Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus alpha Baseline right-brace EndLayout

For the lower one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript c Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript alpha Baseline right-brace EndLayout

For the two-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript c Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript StartFraction alpha Over 2 EndFraction Baseline right-brace 2nd Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript c Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline right-brace EndLayout

For the METHOD=NORMAL option, the test statistic upper Z Subscript c Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu comma sigma squared right-parenthesis, where mu and sigma squared are derived as follows.

For convenience of notation, define

k equals StartFraction 1 Over 2 StartRoot upper N p 0 left-parenthesis 1 minus p 0 right-parenthesis EndRoot EndFraction

Then

upper E left-bracket upper Z Subscript c Baseline left-parenthesis upper X right-parenthesis right-bracket equals 2 k upper N p minus 2 k upper N p 0 plus k upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus k upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis

and

StartLayout 1st Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column equals 4 k squared upper N p left-parenthesis 1 minus p right-parenthesis plus k squared left-bracket 1 minus upper P left-parenthesis upper X equals upper N p 0 right-parenthesis right-bracket minus k squared left-bracket upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis right-bracket squared 2nd Row 1st Column Blank 2nd Column plus 4 k squared left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis right-bracket minus 4 k squared upper N p left-bracket upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis right-bracket EndLayout

The probabilities upper P left-parenthesis upper X equals upper N p 0 right-parenthesis, upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis, and upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis and the truncated expectations upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis and upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis are approximated by assuming the normal-approximate distribution of X, upper N left-parenthesis upper N p comma upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis. Letting phi left-parenthesis dot right-parenthesis and normal upper Phi left-parenthesis dot right-parenthesis denote the standard normal PDF and CDF, respectively, and defining d as

d equals StartFraction upper N p 0 minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction

the terms are computed as follows:

StartLayout 1st Row 1st Column upper P left-parenthesis upper X equals upper N p 0 right-parenthesis 2nd Column equals 0 2nd Row 1st Column upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d right-parenthesis 3rd Row 1st Column upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d right-parenthesis 4th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d right-parenthesis 5th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d right-parenthesis EndLayout

The mean and variance of upper Z Subscript c Baseline left-parenthesis upper X right-parenthesis are thus approximated by

mu equals k left-bracket 2 upper N p minus 2 upper N p 0 plus 2 normal upper Phi left-parenthesis d right-parenthesis minus 1 right-bracket

and

sigma squared equals 4 k squared left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d right-parenthesis right-bracket

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline plus mu Over sigma EndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline minus mu Over sigma EndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline plus mu Over sigma EndFraction right-parenthesis plus normal upper Phi left-parenthesis StartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline minus mu Over sigma EndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout EndLayout

The approximate sample size is computed by numerical inversion.

z Test for Binomial Proportion with Continuity Adjustment Using Sample Variance (TEST=ADJZ VAREST=SAMPLE)

For the normal approximation test with continuity adjustment using the sample variance, the test statistic is

upper Z Subscript c s Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N p 0 plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

where ModifyingAbove p With caret equals upper X slash upper N.

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 one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript c s Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus alpha Baseline right-brace EndLayout

For the lower one-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript c s Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript alpha Baseline right-brace EndLayout

For the two-sided case,

StartLayout 1st Row 1st Column upper C Subscript upper L 2nd Column equals max left-brace upper C colon upper Z Subscript c s Baseline left-parenthesis upper C right-parenthesis less-than-or-equal-to z Subscript StartFraction alpha Over 2 EndFraction Baseline right-brace 2nd Row 1st Column upper C Subscript upper U 2nd Column equals min left-brace upper C colon upper Z Subscript c s Baseline left-parenthesis upper C right-parenthesis greater-than-or-equal-to z Subscript 1 minus StartFraction alpha Over 2 EndFraction Baseline right-brace EndLayout

For the METHOD=NORMAL option, the test statistic upper Z Subscript c s Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu comma sigma squared right-parenthesis, where mu and sigma squared are derived as follows.

For convenience of notation, define

k equals StartFraction 1 Over 2 StartRoot upper N p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction

Then

upper E left-bracket upper Z Subscript c s Baseline left-parenthesis upper X right-parenthesis right-bracket almost-equals 2 k upper N p minus 2 k upper N p 0 plus k upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus k upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis

and

StartLayout 1st Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c s Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 4 k squared upper N p left-parenthesis 1 minus p right-parenthesis plus k squared left-bracket 1 minus upper P left-parenthesis upper X equals upper N p 0 right-parenthesis right-bracket minus k squared left-bracket upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis right-bracket squared 2nd Row 1st Column Blank 2nd Column plus 4 k squared left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis right-bracket minus 4 k squared upper N p left-bracket upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis minus upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis right-bracket EndLayout

The probabilities upper P left-parenthesis upper X equals upper N p 0 right-parenthesis, upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis, and upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis and the truncated expectations upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis and upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis are approximated by assuming the normal-approximate distribution of X, upper N left-parenthesis upper N p comma upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis. Letting phi left-parenthesis dot right-parenthesis and normal upper Phi left-parenthesis dot right-parenthesis denote the standard normal PDF and CDF, respectively, and defining d as

d equals StartFraction upper N p 0 minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction

the terms are computed as follows:

StartLayout 1st Row 1st Column upper P left-parenthesis upper X equals upper N p 0 right-parenthesis 2nd Column equals 0 2nd Row 1st Column upper P left-parenthesis upper X less-than upper N p 0 right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d right-parenthesis 3rd Row 1st Column upper P left-parenthesis upper X greater-than upper N p 0 right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d right-parenthesis 4th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N p 0 EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d right-parenthesis 5th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N p 0 EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d right-parenthesis EndLayout

The mean and variance of upper Z Subscript c s Baseline left-parenthesis upper X right-parenthesis are thus approximated by

mu equals k left-bracket 2 upper N p minus 2 upper N p 0 plus 2 normal upper Phi left-parenthesis d right-parenthesis minus 1 right-bracket

and

sigma squared equals 4 k squared left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d right-parenthesis right-bracket

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline plus mu Over sigma EndFraction right-parenthesis comma 2nd Column upper one hyphen sided 2nd Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline minus mu Over sigma EndFraction right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column normal upper Phi left-parenthesis StartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline plus mu Over sigma EndFraction right-parenthesis plus normal upper Phi left-parenthesis StartFraction z Subscript StartFraction alpha Over 2 EndFraction Baseline minus mu Over sigma EndFraction right-parenthesis comma 2nd Column two hyphen sided EndLayout EndLayout

The approximate sample size is computed by numerical inversion.

Exact Equivalence Test of a Binomial Proportion (TEST=EQUIV_EXACT)

The hypotheses for the equivalence test are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p less-than theta Subscript upper L Baseline or p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H 1 colon 2nd Column theta Subscript upper L Baseline less-than-or-equal-to p less-than-or-equal-to theta Subscript upper U EndLayout

where theta Subscript upper L and theta Subscript upper U are the lower and upper equivalence bounds, respectively.

The analysis is the two one-sided 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 normal-based critical values.

Two different hypothesis tests are carried out:

StartLayout 1st Row 1st Column upper H Subscript a Baseline 0 Baseline colon 2nd Column p less-than theta Subscript upper L Baseline 2nd Row 1st Column upper H Subscript a Baseline 1 Baseline colon 2nd Column p greater-than-or-equal-to theta Subscript upper L EndLayout

and

StartLayout 1st Row 1st Column upper H Subscript b Baseline 0 Baseline colon 2nd Column p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H Subscript b Baseline 1 Baseline colon 2nd Column p less-than-or-equal-to theta Subscript upper U EndLayout

If upper H Subscript a Baseline 0 is rejected in favor of upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 is rejected in favor of upper H Subscript b Baseline 1, then upper H 0 is rejected in favor of upper H 1. Rejection of upper H 0 in favor of upper H 1 at significance level alpha occurs if and only if the 100(1 – 2 alpha)% confidence interval for p is contained completely within left parenthesis theta Subscript upper L Baseline comma theta Subscript upper U Baseline right parenthesis.

The test statistic for each of the two tests (upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1) is

upper X equals number of successes tilde normal upper B normal i normal n left-parenthesis upper N comma p right-parenthesis

Let upper C Subscript upper U denote the critical value of the exact upper one-sided test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1, and let upper C Subscript upper L denote the critical value of the exact lower one-sided test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1. 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 upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L. Thus, the exact power of the equivalence test is

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper L Baseline plus 1 right-parenthesis EndLayout

The probabilities are computed using Johnson and Kotz (1970, equation 3.20).

z Equivalence Test for Binomial Proportion Using Null Variance (TEST=EQUIV_Z VAREST=NULL)

The hypotheses for the equivalence test are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p less-than theta Subscript upper L Baseline or p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H 1 colon 2nd Column theta Subscript upper L Baseline less-than-or-equal-to p less-than-or-equal-to theta Subscript upper U EndLayout

where theta Subscript upper L and theta Subscript upper U are the lower and upper equivalence bounds, respectively.

The analysis is the two one-sided 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:

StartLayout 1st Row 1st Column upper H Subscript a Baseline 0 Baseline colon 2nd Column p less-than theta Subscript upper L Baseline 2nd Row 1st Column upper H Subscript a Baseline 1 Baseline colon 2nd Column p greater-than-or-equal-to theta Subscript upper L EndLayout

and

StartLayout 1st Row 1st Column upper H Subscript b Baseline 0 Baseline colon 2nd Column p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H Subscript b Baseline 1 Baseline colon 2nd Column p less-than-or-equal-to theta Subscript upper U EndLayout

If upper H Subscript a Baseline 0 is rejected in favor of upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 is rejected in favor of upper H Subscript b Baseline 1, then upper H 0 is rejected in favor of upper H 1. Rejection of upper H 0 in favor of upper H 1 at significance level alpha occurs if and only if the 100(1 – 2 alpha)% confidence interval for p is contained completely within left parenthesis theta Subscript upper L Baseline comma theta Subscript upper U Baseline right parenthesis.

The test statistic for the test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 is

upper Z Subscript upper L Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper L Baseline Over left-bracket upper N theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis right-bracket Superscript one-half Baseline EndFraction

The test statistic for the test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 is

upper Z Subscript upper U Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper U Baseline Over left-bracket upper N theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis right-bracket Superscript one-half Baseline EndFraction

For the METHOD=EXACT option, let upper C Subscript upper U denote the critical value of the exact upper one-sided test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 using upper Z Subscript upper L Baseline left-parenthesis upper X right-parenthesis. This critical value is computed in the section z Test for Binomial Proportion Using Null Variance (TEST=Z VAREST=NULL). Similarly, let upper C Subscript upper L denote the critical value of the exact lower one-sided test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 using upper Z Subscript upper U Baseline left-parenthesis upper X right-parenthesis. Both of these tests are rejected if and only if upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L. Thus, the exact power of the equivalence test is

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper L Baseline plus 1 right-parenthesis EndLayout

The probabilities are computed using Johnson and Kotz (1970, equation 3.20).

For the METHOD=NORMAL option, the test statistic upper Z Subscript upper L Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus theta Subscript upper L Baseline right-parenthesis Over left-bracket theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma StartFraction p left-parenthesis 1 minus p right-parenthesis Over theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis EndFraction right-parenthesis

and the test statistic upper Z Subscript upper U Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus theta Subscript upper U Baseline right-parenthesis Over left-bracket theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma StartFraction p left-parenthesis 1 minus p right-parenthesis Over theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis EndFraction right-parenthesis

(see Chow, Shao, and Wang (2003, p. 84)). The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals normal upper Phi left-parenthesis StartStartFraction z Subscript alpha Baseline minus StartRoot upper N EndRoot StartFraction p minus theta Subscript upper U Baseline Over StartRoot theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis plus normal upper Phi left-parenthesis StartStartFraction z Subscript alpha Baseline plus StartRoot upper N EndRoot StartFraction p minus theta Subscript upper L Baseline Over StartRoot theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis EndRoot EndFraction OverOver StartRoot StartFraction p left-parenthesis 1 minus p right-parenthesis Over theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis EndFraction EndRoot EndEndFraction right-parenthesis minus 1 EndLayout

The approximate sample size is computed by numerically inverting the power formula, using the sample size estimate upper N 0 of Chow, Shao, and Wang (2003, p. 85) as an initial guess:

upper N 0 equals p left-parenthesis 1 minus p right-parenthesis left-parenthesis StartFraction z Subscript 1 minus alpha Baseline plus z Subscript left-parenthesis 1 plus normal p normal o normal w normal e normal r right-parenthesis slash 2 Baseline Over 0.5 left-parenthesis theta Subscript upper U Baseline minus theta Subscript upper L Baseline right-parenthesis minus bar p minus 0.5 left-parenthesis theta Subscript upper L Baseline plus theta Subscript upper U Baseline right-parenthesis bar EndFraction right-parenthesis squared
z Equivalence Test for Binomial Proportion Using Sample Variance (TEST=EQUIV_Z VAREST=SAMPLE)

The hypotheses for the equivalence test are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p less-than theta Subscript upper L Baseline or p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H 1 colon 2nd Column theta Subscript upper L Baseline less-than-or-equal-to p less-than-or-equal-to theta Subscript upper U EndLayout

where theta Subscript upper L and theta Subscript upper U are the lower and upper equivalence bounds, respectively.

The analysis is the two one-sided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84.

Two different hypothesis tests are carried out:

StartLayout 1st Row 1st Column upper H Subscript a Baseline 0 Baseline colon 2nd Column p less-than theta Subscript upper L Baseline 2nd Row 1st Column upper H Subscript a Baseline 1 Baseline colon 2nd Column p greater-than-or-equal-to theta Subscript upper L EndLayout

and

StartLayout 1st Row 1st Column upper H Subscript b Baseline 0 Baseline colon 2nd Column p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H Subscript b Baseline 1 Baseline colon 2nd Column p less-than-or-equal-to theta Subscript upper U EndLayout

If upper H Subscript a Baseline 0 is rejected in favor of upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 is rejected in favor of upper H Subscript b Baseline 1, then upper H 0 is rejected in favor of upper H 1. Rejection of upper H 0 in favor of upper H 1 at significance level alpha occurs if and only if the 100(1 – 2 alpha)% confidence interval for p is contained completely within left parenthesis theta Subscript upper L Baseline comma theta Subscript upper U Baseline right parenthesis.

The test statistic for the test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 is

upper Z Subscript s upper L Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper L Baseline Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

where ModifyingAbove p With caret equals upper X slash upper N.

The test statistic for the test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 is

upper Z Subscript s upper U Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper U Baseline Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

For the METHOD=EXACT option, let upper C Subscript upper U denote the critical value of the exact upper one-sided test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 using upper Z Subscript s upper L Baseline left-parenthesis upper X right-parenthesis. This critical value is computed in the section z Test for Binomial Proportion Using Sample Variance (TEST=Z VAREST=SAMPLE). Similarly, let upper C Subscript upper L denote the critical value of the exact lower one-sided test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 using upper Z Subscript s upper U Baseline left-parenthesis upper X right-parenthesis. Both of these tests are rejected if and only if upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L. Thus, the exact power of the equivalence test is

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper L Baseline plus 1 right-parenthesis EndLayout

The probabilities are computed using Johnson and Kotz (1970, equation 3.20).

For the METHOD=NORMAL option, the test statistic upper Z Subscript s upper L Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus theta Subscript upper L Baseline right-parenthesis Over left-bracket p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma 1 right-parenthesis

and the test statistic upper Z Subscript s upper U Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution

normal upper N left-parenthesis StartFraction upper N Superscript one-half Baseline left-parenthesis p minus theta Subscript upper U Baseline right-parenthesis Over left-bracket p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction comma 1 right-parenthesis

(see Chow, Shao, and Wang (2003), p. 84).

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals normal upper Phi left-parenthesis z Subscript alpha Baseline minus StartRoot upper N EndRoot StartFraction p minus theta Subscript upper U Baseline Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis plus normal upper Phi left-parenthesis z Subscript alpha Baseline plus StartRoot upper N EndRoot StartFraction p minus theta Subscript upper L Baseline Over StartRoot p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction right-parenthesis minus 1 EndLayout

The approximate sample size is computed by numerically inverting the power formula, using the sample size estimate upper N 0 of Chow, Shao, and Wang (2003, p. 85) as an initial guess:

upper N 0 equals p left-parenthesis 1 minus p right-parenthesis left-parenthesis StartFraction z Subscript 1 minus alpha Baseline plus z Subscript left-parenthesis 1 plus normal p normal o normal w normal e normal r right-parenthesis slash 2 Baseline Over 0.5 left-parenthesis theta Subscript upper U Baseline minus theta Subscript upper L Baseline right-parenthesis minus bar p minus 0.5 left-parenthesis theta Subscript upper L Baseline plus theta Subscript upper U Baseline right-parenthesis bar EndFraction right-parenthesis squared
z Equivalence Test for Binomial Proportion with Continuity Adjustment Using Null Variance (TEST=EQUIV_ADJZ VAREST=NULL)

The hypotheses for the equivalence test are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p less-than theta Subscript upper L Baseline or p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H 1 colon 2nd Column theta Subscript upper L Baseline less-than-or-equal-to p less-than-or-equal-to theta Subscript upper U EndLayout

where theta Subscript upper L and theta Subscript upper U are the lower and upper equivalence bounds, respectively.

The analysis is the two one-sided 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:

StartLayout 1st Row 1st Column upper H Subscript a Baseline 0 Baseline colon 2nd Column p less-than theta Subscript upper L Baseline 2nd Row 1st Column upper H Subscript a Baseline 1 Baseline colon 2nd Column p greater-than-or-equal-to theta Subscript upper L EndLayout

and

StartLayout 1st Row 1st Column upper H Subscript b Baseline 0 Baseline colon 2nd Column p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H Subscript b Baseline 1 Baseline colon 2nd Column p less-than-or-equal-to theta Subscript upper U EndLayout

If upper H Subscript a Baseline 0 is rejected in favor of upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 is rejected in favor of upper H Subscript b Baseline 1, then upper H 0 is rejected in favor of upper H 1. Rejection of upper H 0 in favor of upper H 1 at significance level alpha occurs if and only if the 100(1 – 2 alpha)% confidence interval for p is contained completely within left parenthesis theta Subscript upper L Baseline comma theta Subscript upper U Baseline right parenthesis.

The test statistic for the test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 is

upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper L Baseline plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis Over left-bracket upper N ModifyingAbove theta Subscript upper L Baseline With caret left-parenthesis 1 minus ModifyingAbove theta Subscript upper L Baseline With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

where ModifyingAbove p With caret equals upper X slash upper N.

The test statistic for the test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 is

upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper U Baseline plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis Over left-bracket upper N ModifyingAbove theta Subscript upper U Baseline With caret left-parenthesis 1 minus ModifyingAbove theta Subscript upper U Baseline With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

For the METHOD=EXACT option, let upper C Subscript upper U denote the critical value of the exact upper one-sided test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 using upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis. 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 upper C Subscript upper L denote the critical value of the exact lower one-sided test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 using upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis. Both of these tests are rejected if and only if upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L. Thus, the exact power of the equivalence test is

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper L Baseline plus 1 right-parenthesis EndLayout

The probabilities are computed using Johnson and Kotz (1970, equation 3.20).

For the METHOD=NORMAL option, the test statistic upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu Subscript upper L Baseline comma sigma Subscript upper L Superscript 2 Baseline right-parenthesis, and upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu Subscript upper U Baseline comma sigma Subscript upper U Superscript 2 Baseline right-parenthesis, where mu Subscript upper L, mu Subscript upper U, sigma Subscript upper L Superscript 2, and sigma Subscript upper U Superscript 2 are derived as follows.

For convenience of notation, define

StartLayout 1st Row 1st Column k Subscript upper L 2nd Column equals StartFraction 1 Over 2 StartRoot upper N theta Subscript upper L Baseline left-parenthesis 1 minus theta Subscript upper L Baseline right-parenthesis EndRoot EndFraction 2nd Row 1st Column k Subscript upper U 2nd Column equals StartFraction 1 Over 2 StartRoot upper N theta Subscript upper U Baseline left-parenthesis 1 minus theta Subscript upper U Baseline right-parenthesis EndRoot EndFraction EndLayout

Then

StartLayout 1st Row 1st Column upper E left-bracket upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 2 k Subscript upper L Baseline upper N p minus 2 k Subscript upper L Baseline upper N theta Subscript upper L Baseline plus k Subscript upper L Baseline upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus k Subscript upper L Baseline upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Row 1st Column upper E left-bracket upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 2 k Subscript upper U Baseline upper N p minus 2 k Subscript upper U Baseline upper N theta Subscript upper U Baseline plus k Subscript upper U Baseline upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus k Subscript upper U Baseline upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis EndLayout

and

StartLayout 1st Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 4 k Subscript upper L Superscript 2 Baseline upper N p left-parenthesis 1 minus p right-parenthesis plus k Subscript upper L Superscript 2 Baseline left-bracket 1 minus upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis right-bracket minus k Subscript upper L Superscript 2 Baseline left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis right-bracket squared 2nd Row 1st Column Blank 2nd Column plus 4 k Subscript upper L Superscript 2 Baseline left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis right-bracket minus 4 k Subscript upper L Superscript 2 Baseline upper N p left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis right-bracket 3rd Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 4 k Subscript upper U Superscript 2 Baseline upper N p left-parenthesis 1 minus p right-parenthesis plus k Subscript upper U Superscript 2 Baseline left-bracket 1 minus upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis right-bracket minus k Subscript upper U Superscript 2 Baseline left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis right-bracket squared 4th Row 1st Column Blank 2nd Column plus 4 k Subscript upper U Superscript 2 Baseline left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis right-bracket minus 4 k Subscript upper U Superscript 2 Baseline upper N p left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis right-bracket EndLayout

The probabilities upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis, upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis, and upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis and the truncated expectations upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, and upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis are approximated by assuming the normal-approximate distribution of X, upper N left-parenthesis upper N p comma upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis. Letting phi left-parenthesis dot right-parenthesis and normal upper Phi left-parenthesis dot right-parenthesis denote the standard normal PDF and CDF, respectively, and defining d Subscript upper L and d Subscript upper U as

StartLayout 1st Row  d Subscript upper L Baseline equals StartFraction upper N theta Subscript upper L Baseline minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction 2nd Row  d Subscript upper U Baseline equals StartFraction upper N theta Subscript upper U Baseline minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction EndLayout

the terms are computed as follows:

StartLayout 1st Row 1st Column upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals 0 2nd Row 1st Column upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals 0 3rd Row 1st Column upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis 4th Row 1st Column upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis 5th Row 1st Column upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis 6th Row 1st Column upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis 7th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis 8th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis 9th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis 10th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis EndLayout

The mean and variance of upper Z Subscript c upper L Baseline left-parenthesis upper X right-parenthesis and upper Z Subscript c upper U Baseline left-parenthesis upper X right-parenthesis are thus approximated by

StartLayout 1st Row 1st Column mu Subscript upper L 2nd Column equals k Subscript upper L Baseline left-bracket 2 upper N p minus 2 upper N theta Subscript upper L Baseline plus 2 normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis minus 1 right-bracket 2nd Row 1st Column mu Subscript upper U 2nd Column equals k Subscript upper U Baseline left-bracket 2 upper N p minus 2 upper N theta Subscript upper U Baseline plus 2 normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis minus 1 right-bracket EndLayout

and

StartLayout 1st Row 1st Column sigma Subscript upper L Superscript 2 2nd Column equals 4 k Subscript upper L Superscript 2 Baseline left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-bracket 2nd Row 1st Column sigma Subscript upper U Superscript 2 2nd Column equals 4 k Subscript upper U Superscript 2 Baseline left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-bracket EndLayout

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline minus mu Subscript upper U Baseline Over sigma Subscript upper U Baseline EndFraction right-parenthesis plus normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline plus mu Subscript upper L Baseline Over sigma Subscript upper L Baseline EndFraction right-parenthesis minus 1 EndLayout

The approximate sample size is computed by numerically inverting the power formula.

z Equivalence Test for Binomial Proportion with Continuity Adjustment Using Sample Variance (TEST=EQUIV_ADJZ VAREST=SAMPLE)

The hypotheses for the equivalence test are

StartLayout 1st Row 1st Column upper H 0 colon 2nd Column p less-than theta Subscript upper L Baseline or p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H 1 colon 2nd Column theta Subscript upper L Baseline less-than-or-equal-to p less-than-or-equal-to theta Subscript upper U EndLayout

where theta Subscript upper L and theta Subscript upper U are the lower and upper equivalence bounds, respectively.

The analysis is the two one-sided tests (TOST) procedure as described in Chow, Shao, and Wang (2003) on p. 84.

Two different hypothesis tests are carried out:

StartLayout 1st Row 1st Column upper H Subscript a Baseline 0 Baseline colon 2nd Column p less-than theta Subscript upper L Baseline 2nd Row 1st Column upper H Subscript a Baseline 1 Baseline colon 2nd Column p greater-than-or-equal-to theta Subscript upper L EndLayout

and

StartLayout 1st Row 1st Column upper H Subscript b Baseline 0 Baseline colon 2nd Column p greater-than theta Subscript upper U Baseline 2nd Row 1st Column upper H Subscript b Baseline 1 Baseline colon 2nd Column p less-than-or-equal-to theta Subscript upper U EndLayout

If upper H Subscript a Baseline 0 is rejected in favor of upper H Subscript a Baseline 1 and upper H Subscript b Baseline 0 is rejected in favor of upper H Subscript b Baseline 1, then upper H 0 is rejected in favor of upper H 1. Rejection of upper H 0 in favor of upper H 1 at significance level alpha occurs if and only if the 100(1 – 2 alpha)% confidence interval for p is contained completely within left parenthesis theta Subscript upper L Baseline comma theta Subscript upper U Baseline right parenthesis.

The test statistic for the test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 is

upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper L Baseline plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

where ModifyingAbove p With caret equals upper X slash upper N.

The test statistic for the test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 is

upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis equals StartFraction upper X minus upper N theta Subscript upper U Baseline plus 0.5 left-parenthesis 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis minus 0.5 left-parenthesis 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis Over left-bracket upper N ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis right-bracket Superscript one-half Baseline EndFraction

For the METHOD=EXACT option, let upper C Subscript upper U denote the critical value of the exact upper one-sided test of upper H Subscript a Baseline 0 versus upper H Subscript a Baseline 1 using upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis. 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 upper C Subscript upper L denote the critical value of the exact lower one-sided test of upper H Subscript b Baseline 0 versus upper H Subscript b Baseline 1 using upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis. Both of these tests are rejected if and only if upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L. Thus, the exact power of the equivalence test is

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals upper P left-parenthesis upper C Subscript upper U Baseline less-than-or-equal-to upper X less-than-or-equal-to upper C Subscript upper L Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than-or-equal-to upper C Subscript upper L Baseline plus 1 right-parenthesis EndLayout

The probabilities are computed using Johnson and Kotz (1970, equation 3.20).

For the METHOD=NORMAL option, the test statistic upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu Subscript upper L Baseline comma sigma Subscript upper L Superscript 2 Baseline right-parenthesis, and upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis is assumed to have the normal distribution upper N left-parenthesis mu Subscript upper U Baseline comma sigma Subscript upper U Superscript 2 Baseline right-parenthesis, where mu Subscript upper L, mu Subscript upper U, sigma Subscript upper L Superscript 2 and sigma Subscript upper U Superscript 2 are derived as follows.

For convenience of notation, define

k equals StartFraction 1 Over 2 StartRoot upper N p left-parenthesis 1 minus p right-parenthesis EndRoot EndFraction

Then

StartLayout 1st Row 1st Column upper E left-bracket upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 2 k upper N p minus 2 k upper N theta Subscript upper L Baseline plus k upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus k upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Row 1st Column upper E left-bracket upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 2 k upper N p minus 2 k upper N theta Subscript upper U Baseline plus k upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus k upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis EndLayout

and

StartLayout 1st Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 4 k squared upper N p left-parenthesis 1 minus p right-parenthesis plus k squared left-bracket 1 minus upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis right-bracket minus k squared left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis right-bracket squared 2nd Row 1st Column Blank 2nd Column plus 4 k squared left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis right-bracket minus 4 k squared upper N p left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis right-bracket 3rd Row 1st Column normal upper V normal a normal r left-bracket upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis right-bracket 2nd Column almost-equals 4 k squared upper N p left-parenthesis 1 minus p right-parenthesis plus k squared left-bracket 1 minus upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis right-bracket minus k squared left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis right-bracket squared 4th Row 1st Column Blank 2nd Column plus 4 k squared left-bracket upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis minus upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis right-bracket minus 4 k squared upper N p left-bracket upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis minus upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis right-bracket EndLayout

The probabilities upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis, upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis, upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis, and upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis and the truncated expectations upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis, and upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis are approximated by assuming the normal-approximate distribution of X, upper N left-parenthesis upper N p comma upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis. Letting phi left-parenthesis dot right-parenthesis and normal upper Phi left-parenthesis dot right-parenthesis denote the standard normal PDF and CDF, respectively, and defining d Subscript upper L and d Subscript upper U as

StartLayout 1st Row  d Subscript upper L Baseline equals StartFraction upper N theta Subscript upper L Baseline minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction 2nd Row  d Subscript upper U Baseline equals StartFraction upper N theta Subscript upper U Baseline minus upper N p Over left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline EndFraction EndLayout

the terms are computed as follows:

StartLayout 1st Row 1st Column upper P left-parenthesis upper X equals upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals 0 2nd Row 1st Column upper P left-parenthesis upper X equals upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals 0 3rd Row 1st Column upper P left-parenthesis upper X less-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis 4th Row 1st Column upper P left-parenthesis upper X less-than upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis 5th Row 1st Column upper P left-parenthesis upper X greater-than upper N theta Subscript upper L Baseline right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis 6th Row 1st Column upper P left-parenthesis upper X greater-than upper N theta Subscript upper U Baseline right-parenthesis 2nd Column equals 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis 7th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis 8th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X less-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis minus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis 9th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper L Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis 10th Row 1st Column upper E left-parenthesis upper X 1 Subscript StartSet upper X greater-than upper N theta Sub Subscript upper U Subscript EndSet Baseline right-parenthesis 2nd Column equals upper N p left-bracket 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-bracket plus left-bracket upper N p left-parenthesis 1 minus p right-parenthesis right-bracket Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis EndLayout

The mean and variance of upper Z Subscript c s upper L Baseline left-parenthesis upper X right-parenthesis and upper Z Subscript c s upper U Baseline left-parenthesis upper X right-parenthesis are thus approximated by

StartLayout 1st Row 1st Column mu Subscript upper L 2nd Column equals k left-bracket 2 upper N p minus 2 upper N theta Subscript upper L Baseline plus 2 normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis minus 1 right-bracket 2nd Row 1st Column mu Subscript upper U 2nd Column equals k left-bracket 2 upper N p minus 2 upper N theta Subscript upper U Baseline plus 2 normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis minus 1 right-bracket EndLayout

and

StartLayout 1st Row 1st Column sigma Subscript upper L Superscript 2 2nd Column equals 4 k squared left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d Subscript upper L Baseline right-parenthesis right-bracket 2nd Row 1st Column sigma Subscript upper U Superscript 2 2nd Column equals 4 k squared left-bracket upper N p left-parenthesis 1 minus p right-parenthesis plus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis left-parenthesis 1 minus normal upper Phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-parenthesis minus 2 left-parenthesis upper N p left-parenthesis 1 minus p right-parenthesis right-parenthesis Superscript one-half Baseline phi left-parenthesis d Subscript upper U Baseline right-parenthesis right-bracket EndLayout

The approximate power is computed as

StartLayout 1st Row 1st Column normal p normal o normal w normal e normal r 2nd Column equals normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline minus mu Subscript upper U Baseline Over sigma Subscript upper U Baseline EndFraction right-parenthesis plus normal upper Phi left-parenthesis StartFraction z Subscript alpha Baseline plus mu Subscript upper L Baseline Over sigma Subscript upper L Baseline EndFraction right-parenthesis minus 1 EndLayout

The approximate sample size is computed by numerically inverting the power formula.

Wilson Score Confidence Interval for Binomial Proportion (CI=WILSON)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction plus-or-minus StartFraction z Subscript 1 minus alpha slash 2 Baseline upper N Superscript one-half Baseline Over upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndFraction left-parenthesis ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 4 upper N EndFraction right-parenthesis Superscript one-half

So the half-width for the two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is

half hyphen width equals StartFraction z Subscript 1 minus alpha slash 2 Baseline upper N Superscript one-half Baseline Over upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndFraction left-parenthesis ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 4 upper N EndFraction right-parenthesis Superscript one-half

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h

For references and more details about this and all other confidence intervals associated with the CI= option, see Binomial Proportion in Chapter 47, The FREQ Procedure.

Agresti-Coull "Add k Successes and Failures" Confidence Interval for Binomial Proportion (CI=AGRESTICOULL)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction plus-or-minus z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartStartStartFraction StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction left-parenthesis 1 minus StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction right-parenthesis OverOverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndEndFraction right-parenthesis Superscript one-half

So the half-width for the two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is

half hyphen width equals z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartStartStartFraction StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction left-parenthesis 1 minus StartStartFraction upper X plus StartFraction z Subscript 1 minus alpha slash 2 Superscript 2 Baseline Over 2 EndFraction OverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndFraction right-parenthesis OverOverOver upper N plus z Subscript 1 minus alpha slash 2 Superscript 2 Baseline EndEndEndFraction right-parenthesis Superscript one-half

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h
Jeffreys Confidence Interval for Binomial Proportion (CI=JEFFREYS)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

left-bracket upper L Subscript upper J Baseline left-parenthesis upper X right-parenthesis comma upper U Subscript upper J Baseline left-parenthesis upper X right-parenthesis right-bracket

where

upper L Subscript upper J Baseline left-parenthesis upper X right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column 0 comma 2nd Column upper X equals 0 2nd Row 1st Column normal upper B normal e normal t normal a Subscript alpha slash 2 semicolon upper X plus 1 slash 2 comma upper N minus upper X plus 1 slash 2 Baseline comma 2nd Column upper X greater-than 0 EndLayout

and

upper U Subscript upper J Baseline left-parenthesis upper X right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper B normal e normal t normal a Subscript 1 minus alpha slash 2 semicolon upper X plus 1 slash 2 comma upper N minus upper X plus 1 slash 2 Baseline comma 2nd Column upper X less-than upper N 2nd Row 1st Column 1 comma 2nd Column upper X equals upper N EndLayout

The half-width of this two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is defined as half the width of the full interval:

half hyphen width equals one-half left-parenthesis upper U Subscript upper J Baseline left-parenthesis upper X right-parenthesis minus upper L Subscript upper J Baseline left-parenthesis upper X right-parenthesis right-parenthesis

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h
Exact Clopper-Pearson Confidence Interval for Binomial Proportion (CI=EXACT)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

left-bracket upper L Subscript upper E Baseline left-parenthesis upper X right-parenthesis comma upper U Subscript upper E Baseline left-parenthesis upper X right-parenthesis right-bracket

where

upper L Subscript upper E Baseline left-parenthesis upper X right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column 0 comma 2nd Column upper X equals 0 2nd Row 1st Column normal upper B normal e normal t normal a Subscript alpha slash 2 semicolon upper X comma upper N minus upper X plus 1 Baseline comma 2nd Column upper X greater-than 0 EndLayout

and

upper U Subscript upper E Baseline left-parenthesis upper X right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column normal upper B normal e normal t normal a Subscript 1 minus alpha slash 2 semicolon upper X plus 1 comma upper N minus upper X Baseline comma 2nd Column upper X less-than upper N 2nd Row 1st Column 1 comma 2nd Column upper X equals upper N EndLayout

The half-width of this two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is defined as half the width of the full interval:

half hyphen width equals one-half left-parenthesis upper U Subscript upper E Baseline left-parenthesis upper X right-parenthesis minus upper L Subscript upper E Baseline left-parenthesis upper X right-parenthesis right-parenthesis

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h
Wald Confidence Interval for Binomial Proportion (CI=WALD)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

ModifyingAbove p With caret plus-or-minus z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartFraction ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis Over upper N EndFraction right-parenthesis Superscript one-half

So the half-width for the two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is

half hyphen width equals z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartFraction ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis Over upper N EndFraction right-parenthesis Superscript one-half

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h
Continuity-Corrected Wald Confidence Interval for Binomial Proportion (CI=WALD_CORRECT)

The two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval for p is

ModifyingAbove p With caret plus-or-minus left-bracket z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartFraction ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis Over upper N EndFraction right-parenthesis Superscript one-half Baseline plus StartFraction 1 Over 2 upper N EndFraction right-bracket

So the half-width for the two-sided 100 left-parenthesis 1 minus alpha right-parenthesis% confidence interval is

half hyphen width equals z Subscript 1 minus alpha slash 2 Baseline left-parenthesis StartFraction ModifyingAbove p With caret left-parenthesis 1 minus ModifyingAbove p With caret right-parenthesis Over upper N EndFraction right-parenthesis Superscript one-half Baseline plus StartFraction 1 Over 2 upper N EndFraction

Prob(Width) is calculated exactly by adding up the probabilities of observing each upper X element-of StartSet 1 comma ellipsis comma upper N EndSet that produces a confidence interval whose half-width is at most a target value h:

normal upper P normal r normal o normal b left-parenthesis normal upper W normal i normal d normal t normal h right-parenthesis equals sigma-summation Underscript i equals 0 Overscript upper N Endscripts upper P left-parenthesis upper X equals i right-parenthesis 1 Subscript half hyphen width less-than h
Last updated: December 09, 2022