Calculate probability for A/B test results
Last updated: June 3, 2026
Quick Overview
Given the following scenario about revenue per session, calculate the the sample size needed.
Twitter/X
Statistics & Math
Data Scientist
Twitter/X
June 3, 2026Data Scientist
Onsite
Statistics & Math
Easy
3
15
2,169 solved
Given the following scenario about revenue per session, calculate the the sample size needed.
Statistics questions at Twitter/X test your ability to reason quantitatively and design rigorous experiments. This Onsite question evaluates your understanding of statistical inference and its application to business decisions.
What the Interviewer Expects
- State the correct formula or theorem with clear definitions
- Apply the concept to the given scenario step by step
- Interpret the result in plain language
- Identify assumptions and when they might be violated
Key Topics to Cover
Causal inference basics
Multiple testing correction (Bonferroni, FDR)
Probability distributions
Hypothesis testing (H0, H1, p-values)
Bayesian vs frequentist inference
Power analysis and sample size calculation
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- How would you handle multiple comparisons?
- What assumptions does this test make, and how would you validate them?
- What if the sample size is very small?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Problem formulation
To determine the sample size needed for an A/B test on revenue per session at Twitter/X, we need to define our parameters clearly. Let:
- p1 = baseline revenue per session (control group)
- **...
Solution approach
- Determine the baseline revenue per session (p1): Assume p1 = $10.
- Determine the expected revenue per session (p2): Assume we expect a 11.
- **Calculate the e...
Submit Your Answer
Markdown supported