← Microsoft Interview Insights
This was a single question that kept going.
Start by clearly stating the formulas and assumptions for the sample size calculation, then walk through each adjustment step-by-step. For the analysis, compute the test statistic and confidence interval, apply the alpha-spending correction, check SRM, and interpret results in context of practical significance and error risks.
Pro tip: Always sanity-check your calculations with a quick simulation or known benchmarks, and remember that statistical significance does not guarantee practical significance—consider the business impact and potential errors.
Use the normal approximation formula for two proportions: n = 2*(z_{α/2}+z_β)^2 * p(1-p) / δ^2, where p is baseline conversion, δ is absolute lift. Plug in p=0.05, δ=0.003 (6% relative lift), z_{0.025}=1.96, z_{0.10}=1.28, and compute n per variant.
Divide the required sample size by (1 - bot rate) to account for 10% bot traffic. Then, since the experiment ramps over 7 days with daily independence, multiply by 7 to get the total users needed per variant over the ramp period.
Compute the difference in conversion rates (p_B - p_A), the pooled standard error, and the z-statistic. Calculate the two-sided p-value and the 95% confidence interval for the difference. Apply a multiple-testing correction (e.g., Bonferroni or alpha-spending) for the interim look at day 3.
Check for sample ratio mismatch (SRM) using a chi-square test on the user counts (50k vs 49.5k). If no SRM and the corrected p-value < 0.05, consider shipping, but also assess practical significance and error risks.
Discuss Type S (sign) and Type M (magnitude) errors: the risk of getting the direction wrong or overestimating the effect. Also, analyze how a wrong baseline assumption would affect power and sample size, potentially leading to underpowered or overpowered experiments.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.