VBA code and formulae allowing statistical analysis in MS Excel without add-ons.
- If test conditions* are met, do a pooled Z test comparing 2 proportions.
- If test conditions are met and significant difference is found, return the proportion difference.
- If test conditions are not met, or there is no significant difference, do not return anything.
=ABTest_Proportions(n1,y1,n2,y2)
- n1*p1 > 5
- n1*(1 - p1) > 5
- n2 * p2 > 5
- n2(1 - p2) > 5
Where:
- n1 - sample size of group 1
- n2 - sample size of group 2
- y1 - count of instances of success in group 1
- y2 - count of instances of success in group 2
- p1 - proportion of group 1: y1/n1
- p2 - proportion of group 2: y2/n2