Power Analysis for a 2 x 2 Contingency Table
I received this email in September of 2009:
I'm an orthopaedic surgeon and I'm looking for someone that can help me with a power analysis I'm doing for a study.
We want to know if there is any increased risk of infection in giving steroid injections before a total hip arthroplasty.
It is generally accepted that the risk of infection after a hip arthroplasty is 1%. A recent paper has demonstrated an infection rate of 10% (4 of 40) in patients that had a hip replacement after they had a steroid injection. Another paper cites an infection rate of 1.34% in the injected group (3 of 224) versus 0.45% in the non-injected group (1 of 224)
We want to match two groups of patients (one with and one without steroid injection) and look at the difference in infection rate. Who can I calculate how many patients we have to include to get 80% power (p 0.05)?
Here is my response:
As always, the power is critically dependent on how large the effect is. I shall first assume that the papers highlighted in yellow, above, provides a good estimate of the actual effect of the steroid injection. I shall also assume that the overall risk of infection is 1%. I shall also assume that half of patients are injected and half are not.
Under the null hypothesis, the cell proportions are:
Injected?Infected? / No / Yes
No / .495 / .495
Yes / .005 / .005
Marginal / .500 / .500
Under the alternative hypothesis, the cell proportions are:
Injected?Infected? / No / Yes
No / .4978 / .493
Yes / .0022 / .007
These were entered into G*Power, as shown below.
Notice that the effect size statistic has a value of about 0.049. In the behavioral sciences the conventional definition of a small but not trivial value of this statistic is 0.1, but this may not apply for the proposed research.
G*Power next computes the required number of cases to have an 80% chance of detecting an effect of this size, employing the traditional .05 criterion of statistical significance.
As you can see, 3,282 cases would be needed. I suspect the surgeon to be disappointed with this news.
What if the actual effect is larger than assumed above? Suppose the rate of infection is 10% in injected patients and 1% in non-injected patients. The contingency table under the alternative hypothesis is now
Injected?Infected? / No / Yes
No / .495 / .45
Yes / .005 / .05
Now the effect size statistic is about .64. By convention, in the behavioral sciences, .5 is the benchmark for a large effect.
χ² tests - Goodness-of-fit tests: Contingency tables
Analysis: A priori: Compute required sample size
Input: Effect size w = 0.6396021
α err prob = 0.05
Power (1-β err prob) = 0.80
Df = 1
Output: Noncentrality parameter λ = 8.1818169
Critical χ² = 3.8414588
Total sample size = 20
Actual power = 0.8160533
As you can see, now only 20 cases are necessary to have an 80% chance of detecting this large effect.
Return to Wuensch’s Power Analysis Lessons