[英]power.prop.test function not interchangeable
I am using the power.prop.test
function in R.我在 R 中使用
power.prop.test
函数。
I am doing an A/B Test where I am determining the lift from a minimum amount of impressions per group in order for the A/B Test to be significant.我正在做一个 A/B 测试,我正在确定每个组的最小展示量的提升,以使 A/B 测试显着。
When I run the function like below, I get the second proportion (p2) to be 0.0001870215 with n being 2,571,429 per group:当我运行如下函数时,我得到第二个比例 (p2) 为 0.0001870215,每组 n 为 2,571,429:
original_conversion_rate<-0.00009
power.prop.test(n=2571429,
p1=original_conversion_rate,
power=0.8,
sig.level=0.05)
My answer is this:我的回答是这样的:
Two-sample comparison of proportions power calculation
n = 2571429
p1 = 9e-05
p2 = 0.0001870215
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
When I rerun this with my answer for p2 (0.0001870215) to solve for n, a different n comes up (230,952.6):当我用 p2 (0.0001870215) 的答案重新运行它来求解 n 时,会出现一个不同的 n (230,952.6):
original_conversion_rate<-0.00009
power.prop.test(
p1=original_conversion_rate,
p2=0.0001870215,
power=0.8,
sig.level=0.05)
My n changes to this:我的 n 更改为:
Two-sample comparison of proportions power calculation
n = 230952.6
p1 = 9e-05
p2 = 0.0001870215
sig.level = 0.05
power = 0.8
alternative = two.sided
Why would n change in this case?为什么在这种情况下 n 会改变?
Your frequencies are so small that miniscule changes will have a huge impact - especially with the default tolerance level used in power.prop.test
.您的频率是如此之小,以至于微小的变化都会产生巨大的影响——尤其是在
power.prop.test
使用的默认容差级别。
If you take one iteration more you get如果你再进行一次迭代,你会得到
power.prop.test(n=230952.5,
p1=original_conversion_rate,
power=0.8,
sig.level=0.05)
Two-sample comparison of proportions power calculation
n = 230952.5
p1 = 9e-05
p2 = 0.0001870215
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
which is the same value for p2
as before.这与之前的
p2
值相同。 Now, if we go back to your first calculation and lower the tolerance we get现在,如果我们回到你的第一个计算并降低我们得到的容差
power.prop.test(n=2571429,
p1=original_conversion_rate,
power=0.8,
sig.level=0.05, tol=.Machine$double.eps^.8)
Two-sample comparison of proportions power calculation
n = 2571429
p1 = 9e-05
p2 = 0.0001150142
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
You can see that p2
changed.您可以看到
p2
发生了变化。 If we insert the updated value for p2
and solve for n
we get如果我们插入
p2
的更新值并求解n
我们得到
power.prop.test(
p1=original_conversion_rate,
p2=0.0001150142,
power=0.8,
sig.level=0.05)
Two-sample comparison of proportions power calculation
n = 2571429
p1 = 9e-05
p2 = 0.0001150142
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
and you get the same n
.你得到相同的
n
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.