Data Analyst Course · Statistics lesson
Statistics and A/B Tests for Data Analyst Interviews
Interpret randomization, confidence intervals and sample ratio mismatch through a synthetic experiment case.
Learn the concept, work through an example, and check your answer.
Core idea
Check assignment integrity before treating a result as causal.
Estimate → uncertainty
Decision → caveat
The direct answer
Start experiment interpretation with data and design checks.
An A/B test can support causal inference when assignment, measurement and analysis follow a sound design. A positive difference alone is not enough. This lesson uses a fictional experiment to explain sample ratio mismatch, uncertainty and practical decision-making without turning a confidence interval into a guarantee.
The Microsoft Research paper on sample ratio mismatch is a primary source for the data-quality issue. The course pricing block follows this introduction.
Course access
Choose your next step in Data Analyst preparation.
Review the current course options and access details here.
Heycademy Courses · Coming Soon
Master Data Analyst with Heycademy
We’re preparing an interactive learning experience with practical exercises, skill assessments and personalized learning to help you build confidence and master new skills.
We’re putting the finishing touches on this course. Please check back for updates.
Working vocabulary
Separate assignment from observed outcomes.
| Term | Meaning | Question |
|---|---|---|
| Randomization | Eligibility units assigned by a chance mechanism. | Was assignment stable? |
| Treatment effect estimate | Observed difference between defined groups. | Are groups comparable? |
| Confidence interval | Range from a procedure with stated coverage assumptions. | How precise is the estimate? |
| Sample ratio mismatch | Observed allocation differs from planned allocation. | Was assignment or logging broken? |
| Practical significance | Whether the possible effect matters to the decision. | What are cost and risk? |
Always identify the assignment unit, the analyzed unit and the outcome denominator. User-level assignment with session-level counting can create a mismatch between design and analysis.
Worked sample ratio mismatch
The split is not close to the planned half.
| Variant | Planned share | Observed users | Expected at 2,000 |
|---|---|---|---|
| A | 50% | 1,080 | 1,000 |
| B | 50% | 920 | 1,000 |
The groups differ by 160 users. A simple chi-square discrepancy statistic is (80²/1,000) + (80²/1,000) = 12.8 for this two-cell comparison. That is a strong reason to investigate the split under the intended assignment model; it is not a diagnosis by itself. Possible causes include enrollment rules, logging loss, filtering or exposure differences. Check those before comparing conversion.
Do not “fix” the mismatch by deleting users until the counts look 50/50. That could introduce more bias. Trace eligibility, assignment and measurement by date, platform and treatment path.
Interpret an outcome carefully
Estimate is not a causal story by itself.
Suppose A has 108 purchases from 1,080 users (10%) and B has 110 from 920 users (about 12.0%). The observed difference is about 2 percentage points. With the unexplained allocation mismatch, it would be premature to ship B solely on that comparison. First confirm the randomization and measurement system, then compute uncertainty using the planned analysis and check guardrail metrics.
A confidence interval depends on the statistical method and assumptions. It does not give a 95% probability that a fixed unknown effect lies inside this one realized interval under a standard frequentist interpretation. In an interview, explain it as uncertainty around an estimate and focus on what decision is supported.
Keep building this skill
Turn the example into a skill you can use.
Return to the course options whenever you are ready.
Decision checklist
Inspect validity before uplift.
| Check | Why it matters |
|---|---|
| Assignment unit and planned ratio | Defines comparable groups. |
| Eligibility and exclusions | May remove users unevenly. |
| Instrumentation | Missing events can bias outcomes. |
| Sample size and duration | Affects precision and representativeness. |
| Primary and guardrail metrics | Prevents choosing only favorable outcomes. |
| Segment analyses | Useful for diagnosis, risky for cherry-picking. |
The metric-mistakes lesson covers weighted rates and selection bias.
Changed split
What if assignment is balanced?
Now suppose 1,000 users enter each group, with 100 purchases in A and 120 in B. The observed rates are 10% and 12%, a 2-point difference. The ratio check no longer flags the same issue, but you still need outcome logging, uncertainty, predeclared metrics and a practical decision threshold.
Can a balanced split prove randomization worked perfectly?
No. It removes one warning sign. Check the actual assignment process, eligibility and event measurement as well.
Do not claim the interface caused a 2-point improvement from an observational before/after comparison that lacked randomized assignment.
FAQ
Questions about this skill.
Does SRM prove which system failed?
No. It is a warning that prompts diagnosis.
Does a p-value fix biased assignment?
No. Design and measurement validity come first.
Should every experiment segment be reported as a discovery?
No. Treat exploratory segments cautiously and avoid cherry-picking.
Continue with the course
Build reliable data analyst skills.
Review the course options and choose your next learning step.