You are on page 1of 11

CONFIDENCE INTERVAL CALCULATOR (last updated 24 March 2011)

This spreadsheet can be used to calculate confidence intervals for a mean, the difference betweeen two means, a proportion o
comparisons of two proportions (the absolute risk reduction, number needed to treat, relative risk, relative risk reduction and o
sensitivity, specificity and two-level likelihood ratios.

To use the calculator, click on the tabs at the bottom of this screen to choose the appropriate worksheet. Enter the required da
result will be returned under the Result heading. Note that the cells in the Results section contain formulas, even though these
initially appear blank. Be careful not to delete or overwrite the formulas in these cells.

The confidence interval for the difference between two means uses the method that assumes equal variances for the two popu
(see Armitage P and Berry G (1994): Statistical Methods in Medical Research (3rd ed.). London: Blackwell, pp 108-109).

The method used to calculate a confidence interval for a proportion is the Wilson score method without continuity correction (s
Newcombe RG (1998). Two-sided confidence intervals for the single proportion: Comparison of seven methods. Statistics in M
17, 857-872).

The confidence limits for the odds were obtained by taking the confidence limits for the proportion and converting those propor
odds.

The method used to calculate a confidence interval for the difference between two proportions is the Newcombe-Wilson metho
continuity correction (see Newcombe RG (1998). Interval estimation for the difference between independent proportions: Com
eleven methods. Statistics in Medicine, 17, 873-890). The confidence limits for the number needed to treat are the inverse of
for the absolute risk reduction. Confidence intervals for the relative risk and odds ratios are calculated using the methods desc
Armitage and Berry (Armitage P and Berry G (1994): Statistical Methods in Medical Research (3rd ed.). London: Blackwell, p 1
relative risk reduction and its confidence limits are 1 minus the relative risk and its confidence limits.

Confidence intervals for sensitivity and specificity are produced with the Wilson score method (see above for reference). Confi
intervals for positive and negative likelihood ratios are calculated with the method described by Simel and colleagues (Simel D
GP, Matchar DB (1991). Likelihood ratios with confidence: sample size estimation for diagnostic test studies. Journal of Clinica
Epidemiology, 44, 763-70). The confidence interval for the diagnostic odds ratio is calculated as described by Armitage and Be
above for reference).
The results have been checked against worked examples in the sources cited above. Nonetheless there may still be errors. If
identify errors please contact the author, Rob Herbert, email: r.herbert@neura.edu.au.

TO ESTIMATE A CONFIDENCE INTERVAL FOR A MEAN:


Enter the sample mean here:
Enter the estimated population standard deviation here:
Enter the sample size (eg, number of subjects) here:
Enter the required confidence interval (eg, 95%) here:
RESULT
The estimated population mean is:
The estimated CI is:

95

difference of 2 means

TO ESTIMATE A CONFIDENCE INTERVAL FOR THE DIFFERENCE


BETWEEN TWO MEANS:
Enter the mean of the control group here:
Enter the estimated population standard deviation for the control group here:
Enter the sample size (eg, number of subjects) for the control group here:
Enter the mean of the experimental group here:
Enter the estimated population standard deviation for the experimental group here:
Enter the sample size (eg, number of subjects) for the experimental group here:
Enter the required confidence interval (eg, 95%) here:
RESULT
The estimated difference between the two population means is:
The estimated CI is:

Page 4

95

difference of 2 means

Page 5

a proportion or odds

TO ESTIMATE A CONFIDENCE INTERVAL FOR A PROPORTION:


Enter the number of "events" in the sample here:
Enter the sample size (eg, number of subjects) here:
Enter the required confidence interval (eg, 95%) here:
RESULT
The estimated population proportion is:
The estimated population odds are:

Page 6

95

a proportion or odds

Page 7

compare 2 proportions or odds

TO ESTIMATE CONFIDENCE INTERVAL FOR THE COMPARISON OF


TWO PROPORTIONS:
Enter the number of "events" in the control group here:
Enter the sample size (eg, number of subjects) of the control group here:
Enter the number of "events" in the experimental group here:
Enter the sample size (eg, number of subjects) of the experimental group here:
Enter the required confidence interval (eg, 95%) here:
RESULT:
Absolute Risk Reduction:
Number Needed to Treat:
Relative Risk:
Relative Risk Reduction:
Odds ratio:

Page 8

95

compare 2 proportions or odds

#NAME?

#NAME?

#NAME?

Page 9

TO ESTIMATE CONFIDENCE INTERVALS FOR SENSITIVITY,


SPECIFICITY AND TWO-LEVEL LIKELIHOOD RATIOS:
Enter the data into this table:
Test is positive
Test is negative
Enter the required confidence interval (eg, 95%) here:
RESULT:
Sensitivity:
Specificity:
Positive likelihood ratio:
Negative likelihood ratio:
Diagnostic odds ratio:

95

Reference standard Reference standard


is positive
is negative

You might also like