Compare proportion with a dichotomous outcome between two samples using the Chi-squared statistic (or z test).
Your study includes Group 1 (exposed) and Group 0 (unexposed). You know P (the prevalence of the outcome in the population) and Q1 (the proportion of exposed individuals in the population), and you can estimate the risk ratio (RR). The calculator uses these to derive P1 (outcome proportion in exposed) and P0 (outcome proportion in unexposed) and, from there, the sample sizes. Note the distinction between Q1 (proportion of exposed individuals in the population) and q1 (proportion of exposed subjects in your study).
If you already know P0 (outcome proportion in the unexposed group), use this standard calculator for comparing proportions. Note the distinction between Q1 (proportion of exposed individuals in the population) and q1 (proportion of exposed subjects in your study).
Instructions: Enter parameters in the green cells. Answers will appear in the blue box below.
α (two-tailed) =
Threshold probability for rejecting the null hypothesis. Type I error rate.
β =
Probability of failing to reject the null hypothesis under the alternative hypothesis. Type II error rate.
q1 =
Proportion of subjects that are in Group 1 (exposed)
q0 =
0.50
Proportion of subjects that are in Group 0 (unexposed); 1-q1
Q1 =
Proportion of individuals in the population who are exposed.
P =
Prevalence of the outcome in the population.
RR =
Estimated risk ratio, (P1/P0). For the parameters currently entered, this value must be greater than 0. See calculations below.
Q0 = Proportion of individuals in the population who are unexposed = 1 - Q1 = .
Limits on the risk ratio RR:
Lower limit: Use (P-Q0)/(100-Q0) = 0.00 if it is positive, otherwise use 0. Lower limit: 0.00
Upper limit: If P > Q1, use (100-Q1)/(P-Q1) = 0.00, otherwise no upper limit. Upper limit: None
The standard normal deviate for α = Zα =
The standard normal deviate for β = Zβ =
P1 = The probability of the outcome in exposed people = P * RR / (1 + Q1 * (RR - 1)) =
P0 = The probability of the outcome in unexposed people = P / (RR - Q0 * (RR - 1)) =
Pooled proportion = PP = (q1*P1) + (q0*P0) =
A = Zα√PP(1-PP)(1/q1 + 1/q0) =
B = Zβ√P1(1-P1)(1/q1) + P0(1-P0)(1/q0) =
C = P1-P0 =
Total group size = N = (A+B)2/C2 =
Continuity correction (added to N for Group 0) = CC = 1/(q1 * |P1-P0|) =
Sample size (with continuity correction)
N
Outcome+
Outcome-
Group 1:
Group 0:
Total:
Sample size (without continuity correction)
N
Outcome+
Outcome-
Group 1:
Group 0:
Total:
Note: This calculator uses the normal distribution (with and without the continuity correction) as an approximation to the binomial distribution.
References:
Hulley SB, Cummings SR, Browner WS, Grady D, Newman TB. Designing clinical research : an epidemiologic approach. 4th ed. Philadelphia, PA: Lippincott Williams & Wilkins; 2013. Appendix 6B, page 75.
(Continuity Correction) Fleiss JL, Tytun A, Ury HK. A simple approximation for calculating sample sizes for comparing independent proportions. Biometrics 1980;36:343-46.