Sub topic 5
Picking the Randomization Unit and Who Is Eligible
Assume you know basic product metrics, proportions, and feature flags. You do not need programming experience. This chapter focuses on two design choices: which entity receives a variant and which entities can enter the experiment.
Choose the randomization unit
The randomization unit is the entity assigned to a control or treatment group. Common units include users, accounts, devices, sessions, stores, or teams. Choose the unit that matches how people experience the change and how the primary metric is measured.
For example, if a checkout change affects a logged-in person, randomize by user_id. The same person should see the same variant on every visit. If you randomize by session instead, one person might see both versions. That creates mixed experiences and makes the result harder to interpret.
| Situation | Suitable unit | Main reason |
|---|---|---|
| A user sees a new onboarding flow | User | The experience persists across visits |
| A company adopts a billing workflow | Account | Coworkers should share one experience |
| A delivery route changes for a store | Store | The operational decision belongs to the store |
The unit also affects the sample size. Ten thousand events from 1,000 users do not provide the same amount of independent evidence as 10,000 users. Repeated observations from one unit are usually correlated, meaning they are more alike than observations from different units.
Watch for interference
Interference occurs when one unit's assignment changes another unit's outcome. A social feature can create interference because treated users interact with control users. A team collaboration tool can have interference if teammates receive different variants.
In these cases, randomize at a higher level, such as team or account. This reduces contamination, where the control group is indirectly exposed to the treatment. The trade-off is that you will have fewer independent units, so the experiment may need more time.
Define eligibility before assignment
Eligibility is the rule that determines who may enter the experiment. Write it as observable conditions before launch. For example:
- Logged-in users on the web
- At least one saved address
- No active checkout error
- First eligible visit during the experiment period
Eligibility should describe who could reasonably experience the feature. Do not include users who cannot reach the relevant part of the product, because they add little information about the hypothesis.
Apply eligibility before randomization. Then assign every eligible unit according to the planned split, such as 50% control and 50% treatment. Record both eligibility and assignment. This lets data partners distinguish users who were eligible but never exposed from users who actually saw the feature.
Avoid removing users after seeing their outcomes. Excluding people because they left quickly, converted unusually fast, or encountered an unexpected state can introduce selection bias. If a technical failure prevents exposure, record it as a data-quality issue and define the handling rule in advance.
A practical decision
Ask these questions before implementation:
- Who owns the experience?
- Should the assignment persist across visits?
- Can assigned units affect one another?
- Can the metric be calculated reliably at this unit?
- What exact conditions make a unit eligible?
Exercise
A team randomizes each page view for a new dashboard. The primary metric is weekly active users. What is the main design problem, and what unit is usually better?
Show answer
The same user can receive both variants, while the metric is measured across a week. Randomize by user and persist the assignment.