One-Sample Test for Proportions

The first step is to calculate a Cohen effect size, h, given the alternative and null proportions you expect in your study. Suppose you have a sample proportion of 0.2 and a hypothetical proportion of 0.15. The result of the power analysis tells us that we need a sample size of at least 452 random, independent events to detect a difference 80% of the time.

Two-Sample Test for Proportions

Suppose we want to estimate the sample size needed for a two-sample proportion test design to compare a control group to a treatment group, with a proportion of 0.2 and 0.15 respectively. The result tells us that we need a sample size at least 906 random, independent events for 80% power between a control proportion of 0.2 to a treatment proportion of 0.15.


     Two-sample comparison of proportions power calculation 

              n = 905.3658
             p1 = 0.15
             p2 = 0.2
      sig.level = 0.05
          power = 0.8
    alternative = two.sided

NOTE: n is number in *each* group

Chi-squared (χ2) Tests

A χ2 test compares two sets of proportions. Suppose a casino wants to ensure there is no small bias in the dice purchased that could be used by a player to gain an advantage against the house. You observe a set of rolls of dice (300 rolls) and suspect that the die may be biased. How many times would you have to roll the dice to be confident it was fair? The first step is to compute the effect size and then plug the numbers into a power analysis calculation. The result suggests that for a die with a bias that you observed, you’d need at least 554 rolls to detect the bias 80% of the time.