Sub topic 1
What an experiment is and when to run one
This chapter defines a product experiment, explains why randomization lets you claim a cause, and gives you criteria for deciding whether an experiment is the right tool. Later chapters cover hypotheses, metrics, sample size and the brief.
Prerequisites
This chapter assumes you already know:
- Basic product management vocabulary: features, funnels and KPIs.
- How to read averages, proportions and percentages.
- What a feature flag is: a switch in code that turns a behavior on or off for chosen users.
You do not need to program. The short Python and YAML snippets in this tutorial are there to make ideas concrete.
What an experiment is
A product experiment is a controlled comparison. You split eligible users at random into groups. One group, the control, keeps the current experience. The other group, the treatment, gets the change. You then compare a pre-chosen metric between the groups.
Randomization is the key ingredient. Because chance alone decides who sees what, the groups are alike in every way on average, including the ways you cannot measure: motivation, device, season, and how much they like your product. The only systematic difference is the change you made. That is why a difference in outcomes can be read as an effect of the change and not merely as a correlation.
An A/B test is the most common form. It has one control and one treatment. Variants with more than one treatment are often called A/B/n tests.
Why not just ship and compare before and after?
A before/after comparison is the most common alternative, and it is often wrong. Anything else that changed at the same time gets mixed into your result.
| Approach | What it compares | Main weakness |
|---|---|---|
| Before/after | The same users at different times | Seasonality, marketing campaigns, and other releases are mixed in |
| Observational comparison | Users who chose the feature vs. users who did not | People who opt in differ from people who do not (selection bias) |
| Randomized experiment | Randomly assigned groups at the same time | Needs traffic, time and engineering support |
Here is an example. A retailer launches a new checkout on the first of December and conversion rises. Holiday shopping also begins on the first of December. A before/after view cannot separate the two. An experiment can, because control and treatment both experience the holiday.
The observational case has a similar trap. Users who try a new "saved lists" feature usually buy more. They were probably the more engaged users to begin with, so the feature may have caused none of the difference.
What an experiment can and cannot tell you
An experiment answers a narrow question well: "Does this change move this metric, for these users, over this period?"
It does not tell you:
- Why the change worked. You need a hypothesis and often qualitative research for that.
- Whether the result generalizes to other users, markets or seasons.
- Whether the metric you picked is what the business actually cares about.
- Anything about effects that take longer than the test to appear.
When to run an experiment
Run an experiment when most of these are true:
- The decision is uncertain. Reasonable people on the team disagree about whether the change helps.
- The outcome is measurable. A metric exists that reflects the goal and can be logged reliably.
- You can randomize. You can control who sees which variant, usually with a feature flag.
- There is enough traffic. The expected effect can be detected in a tolerable time. Chapter 6 shows how to estimate this.
- The decision is reversible and worth the cost. The cost of being wrong, or the value of being right, justifies the setup effort.
- The result will change what you do. If you would ship regardless, an experiment adds delay and no information.
The last point is easy to overlook. Before starting, ask the team: "If treatment wins, what do we do? If it loses, what do we do?" If both answers are "ship it", you do not need an experiment. You may still want a staged rollout to protect against bugs, which is a different purpose.
When not to run an experiment
Some situations call for another method.
| Situation | Why an experiment fits poorly | Better option |
|---|---|---|
| Very low traffic | The test would take months to detect a realistic effect | Qualitative research, user interviews, or a larger bet with a bigger expected effect |
| Obvious bug fix or legal requirement | The decision is not uncertain | Ship, then monitor |
| Exploring what to build | You do not yet have a testable hypothesis | Interviews, usability tests, surveys |
| Network effects or shared resources | Users in different variants affect each other, so the groups are not independent | Cluster or geo-level experiments, or a switchback design |
| One-off launches such as a rebrand | You cannot hold back a control group | Pre/post analysis with careful caveats, or a holdout in selected markets |
| Long-term outcomes such as annual retention | The test would outlast the decision window | A short-term proxy metric validated against the long-term one, or a long-running holdout |
| Ethical or trust concerns | Withholding or degrading an experience could harm users | Do not experiment, or apply safeguards and review |
A marketplace shows the network-effect case. If a treatment makes buyers more aggressive at claiming limited inventory, control buyers lose out, and the control group is no longer a clean picture of life without the change. Standard user-level A/B tests then overstate the effect.
Experiments versus other evidence
Experiments are one tool among several. A strong product team matches the method to the question.
- Interviews and usability tests tell you why users struggle. They use few people and cannot size an effect.
- Surveys capture stated preferences, which can differ from behavior.
- Funnel analysis shows where users drop off. It points you to a place to test but does not tell you what to change.
- Experiments measure the effect of a specific change on a specific metric.
A common sequence is: funnel analysis finds a drop-off, interviews explain it, the team designs a fix, and an experiment measures whether the fix works.
Anatomy of a simple experiment
The pieces below recur in every experiment in this tutorial.
- Hypothesis: the belief you are testing, stated so it can be proven wrong.
- Randomization unit: the thing that is randomized, such as a user, a session or a store.
- Metrics: one primary metric that drives the decision, plus guardrails that protect against harm.
- Sample size and duration: how many units, and how long, you need to detect a meaningful effect.
- Decision rule: what you will do for each possible result, written before launch.
A worked example
Suppose a product manager at an online store sees that many users abandon checkout at the address form. Interviews suggest typing addresses on a phone is painful. The team proposes autofilling a saved address.
Walk through the screening questions:
- Uncertain? Engineering thinks it will help. Support worries autofilled wrong addresses will cause failed deliveries. Yes, uncertain.
- Measurable? Checkout completion is already logged. Yes.
- Randomizable? Logged-in users can be assigned by user ID behind a flag. Yes.
- Enough traffic? About 30,000 eligible users a week. A rough check, using the method in Chapter 6, suggests two weeks is enough for a one-point lift on a 10% baseline.
- Worth the cost? Checkout is a core flow, so yes.
- Will the result change the action? If completion does not improve, the team will not build the more complex address-validation follow-up. Yes.
All six hold, so the team runs an experiment. They record the plan in a brief. This excerpt shows how little is needed to start:
experiment: checkout_address_autofill
owner: product
hypothesis: >
If we autofill saved addresses at checkout, then more users will
complete purchase, because fewer form fields reduce friction.
randomization_unit: user_id
primary_metric:
name: checkout_completion_rate
baseline: 0.10
guardrail_metrics:
- payment_error_rate
- page_load_time_p95Chapter 7 expands this into a full brief with sample size, decision rule and roles.
Common mistakes at this stage
- Testing to confirm a decision already made. If the outcome cannot change the plan, the test only consumes traffic and time.
- Treating every change as a test candidate. Experiment capacity is limited. Overlapping tests compete for the same users and slow other teams.
- Starting without a metric. If you cannot say how you will measure success, you cannot design the test.
- Confusing a rollout with an experiment. A gradual rollout limits risk. An experiment needs a randomized control group and a plan for analysis.
- Ignoring the cost of setup. Instrumentation, QA, monitoring and analysis all take engineering and data time. Include them when you judge whether the test is worth it.
Key takeaways
An experiment is a randomized comparison that supports a causal claim about one change and one metric. It is the right tool when the decision is uncertain, measurable, randomizable, adequately powered by your traffic, worth the cost, and able to change what you do. When those conditions fail, use interviews, funnel analysis, staged rollouts or quasi-experimental methods instead.
Exercise
A team wants to ship a redesigned settings page. A usability study found the old page confusing, and leadership has already decided to ship the redesign next sprint no matter what. Traffic to the page is high. Should the team run an A/B test, and why or why not?
Show answer
Probably not as a decision-making experiment. The test would not change the action, because the redesign ships either way, so criterion 6 fails. The team can still use a staged rollout with monitoring to catch bugs and regressions. If someone wants to know the size of the effect for learning purposes, a holdout could be justified, but that is a separate goal and should be named as such.
Exercise
A ride-sharing app tests a new driver-matching algorithm by randomizing individual riders to control or treatment. Why might the result be misleading, and what design could help?
Show answer
Riders in both groups compete for the same pool of drivers, so treatment riders getting faster matches can leave fewer drivers for control riders. The groups are no longer independent, and the measured difference can overstate the true effect. Randomizing by geographic region or by time block (a switchback design) keeps interference within each group.
Exercise
A product manager says, "Signups went up 12% after we launched the new landing page, so the page works." Name two reasons this claim is weak and one way to get stronger evidence.
Show answer
Other things may have changed over the same period, such as seasonality, a marketing campaign or a competitor's outage. Also, a before/after view has no control group, so these effects cannot be separated from the page. Stronger evidence comes from randomly splitting visitors between the old and new landing pages at the same time and comparing signup rates.