Compute an A/B test p-value by hand
AmazonData Scientist · Technical ScreenLast updated
This question evaluates understanding of hypothesis testing for proportions, specifically the two-proportion z-test, p-value computation and interpretation of statistical significance in an A/B test with binary outcomes.
In an A/B test on a game feature, you measure conversion rate (binary outcome).
- Control: n₁ = 1000 users, x₁ = 120 conversions
- Treatment: n₂ = 980 users, x₂ = 145 conversions
Tasks:
- Compute the two-sided p-value for the null hypothesis H₀: p₁ = p₂ using a two-proportion z-test (show formulas and intermediate values).
- State whether the result is significant at α = 0.05.
- (Implementation) Describe how you would compute this p-value in Python without using SciPy (you may use
mathonly).
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.