Sub topic 2
Who does what: product, engineering and data
This chapter assumes you know basic product vocabulary (features, funnels, KPIs), understand proportions and percentages, and know what a feature flag is. It describes who owns which decisions and tasks in an experiment, so the work does not stall or get done twice. It also covers the handoffs where experiments most often fail.
Why roles matter in experiments
An experiment is a small joint project. Product decides what to learn. Engineering builds the variants and records what happens. Data makes sure the numbers can support a conclusion.
Most failed experiments do not fail on the statistics. They fail because nobody owned a decision. A metric was never defined precisely. Assignment was never checked. The decision rule was written after the results arrived.
Clear ownership prevents this. It also gives each function a veto over the part of the plan it understands best.
The three roles at a glance
| Function | Owns | Typical outputs |
|---|---|---|
| Product | The question, the hypothesis, the decision | Experiment brief, decision rule, decision memo |
| Engineering | Variants, assignment, event logging, safe rollout | Feature flag, instrumented events, ramp plan, kill switch |
| Data | Design validity, sample size, metric computation, analysis | Power calculation, data quality checks, analysis, interval estimates |
Ownership means one function has the final say on a decision. The others advise. In some companies a single person holds more than one role. A small team may have no dedicated data scientist, so the PM and an engineer share that work. The responsibilities still exist, so name who covers each one.
What product owns
Product is accountable for why the experiment exists and what happens afterward.
- The question and hypothesis. Product states what the team believes and why. The next chapter covers how to write a testable hypothesis.
- The primary metric. Product chooses the one number that defines success, because it reflects the business goal.
- The minimum detectable effect (MDE). This is the smallest change worth detecting. Only product can say what lift justifies the cost of building and maintaining the feature. Data then turns it into a sample size.
- The decision rule. Product writes down in advance what result leads to shipping, iterating or stopping.
- The final call. Product decides, and accepts the trade-offs, including when the data is ambiguous.
Product should not choose the sample size alone, redefine a metric after launch, or pick the winning variant by looking at many metrics.
What engineering owns
Engineering is accountable for making the experiment real and safe.
- Building the variants. Control must be the current experience, unchanged. Treatment should differ only in what the hypothesis names. If treatment also changes page speed or error behavior, you can no longer attribute the effect to the idea.
- Variant assignment. Engineering implements how each unit (a user, for example) is assigned and keeps it stable across visits.
- Event instrumentation. Engineering emits the events that metrics depend on, with the agreed names and properties.
- Exposure logging. Engineering records when a user actually saw the variant, not only when they were assigned.
- Safe rollout. Engineering controls the flag, the ramp schedule and the kill switch.
Engineering should be asked for feasibility early. Some randomization units or metrics are expensive or impossible to support. Learning this after the brief is signed wastes the whole planning effort.
What data owns
Data is accountable for whether the evidence can be trusted.
- Design validity. Data checks that the randomization unit matches how the metric is measured, and that the eligible population is well defined.
- Sample size and duration. Data calculates how many users each variant needs from the baseline, the MDE, the significance level and the power.
- Metric definitions in queries. Data turns each metric into an exact computation, including edge cases such as bots, refunds or users with no activity.
- Data quality checks. Data runs the sample ratio mismatch test and other health checks before anyone reads results.
- Analysis. Data reports the estimate and confidence interval, and states the limits of what they show.
Data should not decide whether the result is worth shipping. That depends on cost, strategy and risk, which belong to product.
Shared decisions
Some decisions need agreement from all three functions. Each is easier to settle before launch.
- Metric definitions. Product names the intent, data writes the computation, and engineering confirms the events exist to feed it.
- Eligibility. Product knows who the feature is for. Engineering knows who can receive it. Data knows how that choice affects the analysis.
- Guardrail metrics. These protect against harm. Engineering often knows the technical risks, such as latency and errors, and product knows the business ones.
- Stopping conditions. The team agrees on what triggers an early stop for harm and who can pull the switch.
How the work flows
The work moves in a loop, with product and data starting it and engineering in the middle.
Two points in this flow are easy to skip. The first is the feasibility review of the draft brief, which catches unsupported metrics early. The second is the pre-launch check, in which data confirms that events fire and assignment looks right before real traffic arrives.
A worked example
Suppose a PM wants to autofill saved addresses at checkout. The current completion rate is 10%.
Product writes the hypothesis: fewer form fields reduce friction, so more users will complete purchase. The primary metric is checkout completion rate. Product decides a one percentage point lift is the smallest worth pursuing, because below that the engineering upkeep is not justified.
Data takes the baseline of 10% and the MDE of one point, and calculates the sample size with the normal approximation.
import math
from statistics import NormalDist
def sample_size_per_variant(baseline, mde_abs, alpha=0.05, power=0.8):
"""Approximate users per variant for a two-sided test of two proportions."""
p1 = baseline
p2 = baseline + mde_abs
z = NormalDist().inv_cdf
z_alpha = z(1 - alpha / 2)
z_beta = z(power)
variance = p1 * (1 - p1) + p2 * (1 - p2)
return math.ceil((z_alpha + z_beta) ** 2 * variance / (p2 - p1) ** 2)
print(sample_size_per_variant(0.10, 0.01))The result is roughly 14,700 users per variant. Data then converts that into days using eligible daily traffic and tells product how long to wait.
Engineering reviews the draft. It confirms the autofill can be hidden behind a flag and that assignment can use user_id. It notes that the existing completion event does not record whether an address was autofilled, so it adds a property. Without that property, nobody could check that treatment users saw the feature.
Product, engineering and data then record all of this in a shared brief. The record includes named contacts for each function:
experiment: checkout_address_autofill
owner: product
engineering_contact: eng-checkout
data_contact: analytics-growthNaming the contacts makes it clear who to ask when something looks wrong in week one.
Common role failures
These failures recur across teams, and each has a simple prevention.
| Failure | What goes wrong | Prevention |
|---|---|---|
| Product picks the metric after seeing results | Results look better than they are, because you choose the best-looking number | Write the primary metric and decision rule in the brief before launch |
| Engineering is told late | Required events or assignment cannot be built in time | Share the draft brief for a feasibility review |
| Data joins only at analysis | Sample size is wrong or the unit does not match the metric | Involve data when the hypothesis is drafted |
| No owner for data quality | A broken assignment goes unnoticed for weeks | Name the person who runs the pre-launch and daily health checks |
| Everyone decides | The meeting ends with no ship decision | Product holds the final call, with data advising on evidence |
Working agreements that help
A few small habits make the roles work in practice.
- Hold a short kickoff. Fifteen to thirty minutes with all three functions is enough to settle the shared decisions above.
- Use one written brief. A single document is the source of truth, so verbal agreements do not drift.
- Define a change process. If the plan must change after launch, such as extending the run or adding a metric, record who approved it and why.
- Agree on escalation. Decide ahead of time who can stop an experiment that harms users, and that engineering can act without waiting for a meeting.
- Review after the decision. A short retrospective covers what each function would change next time.
Summary of decision rights
- Product decides the question, the MDE, the decision rule and the final call.
- Engineering decides how variants, assignment, events and rollout are implemented, and can stop an unsafe launch.
- Data decides whether the design and data are valid, and reports the evidence.
- All three agree on metric definitions, eligibility, guardrails and stopping conditions before launch.
Exercise
Your team wants to test a new onboarding checklist. Midway through the second week, the PM notices the primary metric is flat but a secondary metric looks good, and proposes making that secondary metric the success measure. Which role failure is this, and who should do what?
Show answer
This is the failure of choosing the metric after seeing results. Product should keep the primary metric and decision rule written in the brief. The secondary metric can be reported as an exploratory finding and tested in a follow-up experiment. Data should flag that picking the best-looking metric inflates the false positive risk, and product should make the final call on the original rule.
Exercise
Data calculates that an experiment needs 14,700 users per variant. Engineering says the feature can only be randomized by session, not by user, and the metric is measured per user. Which function should have raised this earlier, and how should the team resolve it?
Show answer
Engineering should have raised the limit in the feasibility review of the draft brief, and data should have checked that the unit matched the metric. The team should either change assignment to user level, or redefine the metric and sample size at the session level and account for repeated sessions per user. Product then confirms the revised plan still answers the hypothesis.