Created
September 20, 2011 18:47
-
-
Save xnzac/1229941 to your computer and use it in GitHub Desktop.
R function for calculating A/B testing sample size from Ian Clarke(of 37signals)'s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: http://37signals.com/svn/posts/3004-ab-testing-tech-note-determining-sample-size | |
# | |
# p1 = Variable A results. e.g. conversion rate from test A | |
# p2 = Variable B results | |
# power = chance of false negative (A power of 0.80 means that there is an 80% chance that if there was an effect, we would detect it ) | |
# sig.level = chance of false positive (0.05 = 5%) | |
power.prop.test(p1=0.1, p2=0.11, power=0.8, alternative='two.sided', sig.level=0.05) | |
# Output will be a number signifying minimal sample size that meets the above criteria |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for uploading this Zach!