Sub topic 1
What an Experiment Is and When to Run One
Prerequisites
This chapter assumes you know basic product vocabulary such as features, funnels, and KPIs. You should be comfortable with averages and percentages, and you should know that a feature flag is a switch that turns a feature on or off for some users. No programming is required.
What an Experiment Is
An experiment is a controlled comparison. You randomly split eligible users into two groups. The control group keeps the current experience, and the treatment group gets the change. You then measure the difference in a chosen metric. Because random assignment makes the groups alike, a gap between them is likely caused by the change.
When to Run One
Run an experiment when you need a causal answer, the change can be reversed, and you have enough traffic to detect a realistic effect. Other methods fit better in some cases.
| Situation | Better method |
|---|---|
| Traffic is too low to detect the effect | User interviews or a usability test |
| The change is required by law | Ship it and monitor |
| The decision is already final | Skip testing and track outcomes |
| You need to know why users behave a way | Qualitative research |
Who Does What
- Product owns the question, the hypothesis, the primary metric, and the ship decision.
- Engineering builds the variants, the feature flag, and the event logging.
- Data defines the metrics, estimates sample size, checks data quality, and analyzes results.
Writing a Testable Hypothesis
A testable hypothesis states a change, a predicted result, and a reason. It must be falsifiable, meaning the data could show it is wrong. Use this form:
> If we [change], then [metric] will [direction] by [amount], because [reason].
Avoid the form in the quote block above in your own documents if your tool renders quotes poorly. In plain text, the form is: If we change X, then metric Y will move by Z, because reason R.
Example: If we autofill saved addresses at checkout, then checkout completion rate will rise by 1 percentage point, because fewer form fields reduce friction.
Choosing Primary, Guardrail and Secondary Metrics
- Primary metric: The single metric that decides the outcome, such as checkout completion rate.
- Guardrail metrics: Measures that must not get worse, such as payment error rate.
- Secondary metrics: Measures that help explain why the primary metric moved. Do not decide on them alone.
> Note: Fix the primary metric before launch. Picking a metric after seeing results inflates the chance of a false positive.
Exercise
Exercise
A team wants to test a larger "Buy now" button. Which metric should be the primary metric, and which should be a guardrail?
Show answer
The primary metric should be checkout completion rate, because it measures the goal of the change. A guardrail should be payment error rate, because the bigger button must not cause more failed payments.