Agent Wranglers

ANA-14Recommended

Decide only at the planned sample size or with a sequential test

Read the result of a fixed-size test only when it reaches its planned sample size. When the team must look earlier, use a sequential test built for repeated looks, and name it in the plan.

How to do it

A test checked every day and stopped at the first p below 0.05 calls far more false wins than 5 percent. Each look is another chance for noise to cross the line. Dashboards that show a live p-value invite exactly that. Either hide the result until the stop date, or use a method made for looks at any time. Examples are a sequential probability ratio test and always-valid confidence intervals. Many experiment tools offer one of these, so turn it on and record which. A sequential test needs more users for the same effect, so plan the size with that method. Stopping early for harm is separate, as Stop an experiment when a guardrail metric breaks says.

Examples

JSON example

{
  "experiment": "checkout-one-page",
  "method": "fixed-size",
  "result_visible_from": "2026-11-17",
  "sample_size_per_variant": 25551
}

Python example

def may_read_result(experiment, today, exposed_per_variant: list[int]) -> bool:
    if experiment.method == "sequential":
        return True
    return today >= experiment.stop_date and min(exposed_per_variant) >= experiment.sample_size_per_variant

JavaScript example

export function mayReadResult(experiment, today, exposedPerVariant) {
  if (experiment.method === 'sequential') return true;
  return today >= experiment.stopDate && Math.min(...exposedPerVariant) >= experiment.sampleSizePerVariant;
}

How to check

The registry shows, for every finished experiment, either a decision dated on or after the planned stop date or a named sequential method. A query finds no experiment called a win before its planned size with a fixed-size method.

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/analytics/experiments/no-peeking">Agent Wranglers product analytics and experiments playbook</a>. In code you write, add a comment next to it with the same link.