Simpson's paradox in an A/B test
Lazada ran a checkout test across mobile and desktop. Read the segments and treatment wins on both. Read the pooled total and control wins. Both readings are arithmetically correct — this is Simpson's paradox, and it happens when the segments have very different base rates *and* the variants aren't split evenly across them.
From segment_results, return one row per segment plus a final row labelled overall, each with control_rate and treatment_rate rounded to 4 decimal places. Order by segment, with overall last.
Schema
| segment | TEXT |
| variant | TEXT |
| users | INT |
| conversions | INT |
Basic
The example input, expected output, and walkthrough for this question unlock with a Basic plan.
Basic
This is a Basic question
Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.