I have a need to calculate statistical power (the chance of making a Type II error) within Excel for a 2 sample proportional Z test. Here's a example to better explain. Say I have two unequal samples n1 and n2. Within each sample, I have a number of individuals who have performed a specific conversion event. Lets call these converting individuals x1 and x2. n1=6500 n2=6000 x1=88 x2=50 From these numbers I can calculated two conversion rates (p1 and p2), and using an alpha of 5% on a two tailed unpooled test, get my Z-score and p value. Again, all within Excel. p1 = x1/n1 = 0.0135 p2 = x2/n2 = 0.0083 std error = SQRT(p1*(1-p1)/n1 + p2*(1-p2)/n2) = 0.0019 observed difference of means = p2-p1 = 0.0052 Z-score= observed difference of means/std error = 2.8097 p-value = 2*NORM.S.DIST(-ABS(Z-score),TRUE) = 0.005 As p is less that my alpha, I know my results are significant. Great! From there I can also calculate my Effect Size (the magnitude of difference between my two groups) using Cohen's H via the formula below. Cohen's H=2*(ASIN(SQRT(p1))-ASIN(SQRT(p2))) = 0.0504 And because my Cohen's H value is less than .2, I know I am detecting a very small difference between these two groups. Lastly, I need to demonstrate the chance of not making a Type II error (statistical power). This is where I am stuck . Using R (and the "pwr" package), this would be something like this with a result of 80.38%: if(!"pwr" %in% installed.packages()){install.packages("pwr")} library(pwr) pwr.2p2n.test(h…

Full article content could not be extracted automatically. Read the original below.