Comparison of two proportions

Contents


Introduction

The material covered in the probability and confidence interval pages should be understood or at least be familiar to you before proceeding.

A Randomised Controlled Trial (RCT) can be considered the most transparent and effective research model to compare the outcomes of two or more interventions.  The design is randomised because suitable research subjects recruited into the trial are randomly allocated to interventions (usually according to a series of computer generated random numbers).  Consequently, subjects in each group should not be different other than the interventions allocated.  Therefore, the difference between groups will reflect the difference between interventions.

There are other outcome measures and model variations, but this page will only consider differences in proportions (binary outcome) between two groups.  Four commonly used algorithms will be covered along with risk difference and Numbers Needed to Treat.

Back to Top

Nomenclature

The following nomenclature is commonly used when comparing binary outcomes in two groups.

The 2 by 2 table: The two columns represent the two groups and the two rows represent the outcome (e.g., positive or negative).  Group 1 (first column) is usually assigned as the intervention group and group 2 (second column) the control group.  Row 1 contains the outcome of interest and row 2, the absence of that outcome.  Cells are labelled either as A, B, C, D, or p1, p2, n1, n2 (e.g., p1 = positive outcome for group 1) and represent the number of events.  Differences between groups are usually calculated as group 1 - group 2, and ratios as group 1 / group 2.

 

Group 1

Group 2

Outcome positive

A (p1)

B (p2)

Outcome negative

C (n1)

D (n2)

Proportion, incidence, prevalence and risk:  All these terms refer to the same mathematical concept; the proportion of outcome positives in a group. The notation is a number between 0 and 1, so that 25% is presented as 0.25.

Proportion is the generic mathematical term, and for group 1 is p1 / (p1 + n1), and for group 2 is p2 / (p2 + n2).   Prevalence is used if the proportion referred to that exists in a population.  Incidence is used in epidemiology if the disease or condition is new in a previously disease free population.  Risk is a concept of probability and the term is used if the proportion represents the probability of having outcome positive.  Risk is the term usually used in statistical calculation.

Odds:  The ratio of numbers with outcome positive and outcome negative.  The odds in group 1 are p1 / n1, and group 2 p2 / n2.

Back to Top

Risk difference and the numbers needed to treat

Risk difference and its 95% confidence interval together is the standard statistical model for comparing two proportions (risks) in a randomised controlled trial.

Another expression of risk difference is the numbers needed to treat, which is the inverse of the risk difference, rounded to the nearest whole number, NNT = round(1 / RD).  This represents the additional number of people needed to be given the intervention to affect an additional case with a different outcome.  This indicator is intuitively easier to understand by clinicians, so is often presented.  However, it provides no additional information.

A program to calculate risk difference and NNT is available in the Programs and Exercises section.

Back to Top

Relative Risks

Relative Risk is sometimes also called Risk Ratio and is the ratio of the risks in two groups.  Relative Risks were initially developed in epidemiological models to examine the effects of exposure to an influence on an outcome, but results of controlled trials are sometimes also presented as Relative Risks.

A particular advantage of Relative Risk is when a number of influences and outcomes that have different prevalence are compared.  An example of this could be a study on the effect of introducing a new screening test on both the detection and death rate of a cancer.  If the new test detected 80% of cases compared with 40% by the old test, the risk difference is 40%, and the Relative Risk is 2.  The death rate when using the new test is 5% instead of 10% using the old test.  Here, the risk difference is 5%, but the Relative Risk is 0.5 or 1/2.  In other words, using Relative Risks provides a logical conclusion that the new test is twice as good in detecting cancer and halved the death rate.  Using risk difference, the difference is 40% in detection, and 5% in death rate, and the two cannot be compared.

Relative Risk is a ratio and as such, has an exponential distribution. The variance of Relative Risk has shown to increase with the ratio.  Therefore, the logarithm of the ratio is used in statistical calculations and results are converted back to the natural scale at the end of calculations.  As a result, the mean value does not lie in the middle of the 95% confidence interval.

 

A program to calculate Relative Risks is available in the Programs and Exercises section

Back to Top

Odds Ratio

Odds are different to risk in that it is the ratio between numbers with an index attribute to numbers without.  In a two group comparison, the odds for group 1 is O1 = p1/n1, and for group 2 is O2 = p2/n2. The Odds Ratio (OR) = O1 / O2.

Unlike risks, odds do not presume a causal sequence, so they represent an association or correlation between two binary variables.  This advantage allows it to be used in a multivariate model such as logistic regression or in retrospective control studies where case selections are based not on causal factors but on outcomes.

Odds Ratio is a ratio and as such, has an exponential distribution.  The variance of the odds ratio increases as the ratio increase.  Therefore, the logarithm of the ratio is used in statistical calculations and the results are converted back to the natural scale at the end of calculations.  As a result, the mean value does not lie in the middle of the 95% confidence interval.

A program to calculate Odds Ratio is available in the Programs and Exercises section

Back to Top

Fisher's Exact Probability

The conversion of risk differences, risk ratios and odds ratios into normally distributed measurements is based on the theory of large samples, as the binomial distribution is approximated by the normal distribution when the number of measurements is large.  When numbers are small, the assumptions of the normal distribution becomes increasingly unrealistic and if any of the cells (p1,p2,n1 or n2) has no case in it then risk and odds ratios cannot be calculated at all.  When this happens, an alternative calculation based on the binomial distribution is used.  Fisher's exact test (two-sided) tests the probability that the two proportions are the same.  The smaller the probability (i.e., p-value), the less likely they are the same.

The formula for Fisher's exact probability will not be described here.  For those interested in developing the calculations, an algorithm can be found in the text book, Practical Statistics for Medical Research, (1994) F.Altman, Chapman Hall, London, ISBN 0 412 276205 p.233

 

A program to calculate Fisher's exact probability is available in the Programs and Exercises section.

Back to Top

Programs and Exercises

Back to Top

Suggested Reading

Practical Statistics for medical Research. (1994) Altman D. Chapman Hall, London. ISBN 0 412 276205 (First Ed. 1991)

Statistics with confidence. Second Edition. (2002) Altman DG, Machin D, Bryant TN and Gardiner MJ. BMJ Books ISBN 0 7279 1375 1

Back to Top

Version 1.1  Last change 10th July 2006