Recently, I took a test in statistics. The test stated something like this (I can't recall exactly the words).
You realized 5 experiments with 100000 users each to evaluate a enhancement after some interface changes. The first one (the control group) received a 10% return. The other 4 experiments had the following returns 7%, 8.5%, 12% and 14%. Is possible to draw any conclusion with 95% of confidence in any of the 4 experiments when compared with control group?
My approach to this was to make a simple z-test over a Bernoulli distribution using $\alpha = 0.05$. I used the two tailed test, with the null hypothesis as difference between control group probability and the given experiment probability is not significant. It means for example comparing the control group (10%) with the 7% experiment group that
$H_0 = p_{control} - p_{exp7} = 0$
For that I took the following approach
- Computed the probability of event occur
$\hat{p} = (10000 + 7000)/(100000+100000) = 0.085$
- Computed the standard error
$SE = \sqrt{0.085 * (1 - 0.085) * (\frac{1}{100000} + \frac{1}{100000})}$
- Computed the test statistics
$t = (0.1 - 0.07)/ SE \approx 24.054$
- Check $z_{\alpha}$ for 95% in two-sided Z-distribution $\approx 1.96$
Since the $t$ is outside the interval $[-z_{\alpha}, z_{\alpha}]$, I assume that I can reject the null-hypothesis that the difference is non-significant, hence I conclude that experiment 7% significantly worse than the control experiment.
Is that correct? Is there better tests or approaches to that? Should I use one-tailed and the null hypothesis to $\bar{X} \le \bar{Y}$? Is there any functions in Python or R that can be used to this kind of experiments, as we have for t-tests with samples**?
** In Python we can use scipy.stats.t.ttest_ind
and in R we have t.test()