---
title: "Keep a holdout group to measure the sum of · Agent Wranglers"
url: https://agentwranglers.se/playbook/analytics/experiments/holdout-groups
id: ANA-16
level: Optional
updated: 2026-10-27
build: a2a6bdfed830
tokens: 735
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Keep a holdout group to measure the sum of changes

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Experiments](https://agentwranglers.se/playbook/analytics/experiments.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: ANA-16
- Level: Optional
- Chapter: [Experiments](https://agentwranglers.se/playbook/analytics/experiments.md)
- Rule: Keep a small share of users, such as 5 percent, on the product as it was at the start of the quarter. At the quarter's end, compare them with everyone else on the primary business metric.
- Check: The assignment code puts the holdout's users in no other experiment. A test assigns 100,000 fake IDs and finds the holdout within 0.5 percentage points of its planned share.
- How: Each test can win on its own while their sum does nothing, because some wins were noise and some cancel out. A holdout measures what the shipped changes added together. Assign it with the same stable hash as [Assign each user to one variant for good](https://agentwranglers.se/playbook/analytics/experiments/experiment-assignment.md), under its own name. Leave it out of every test that quarter. Keep it small and short, since those users miss improvements. Never hold back security fixes, legal changes or accessibility fixes.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
const HOLDOUT = { name: 'holdout-2026-q4', share: 0.05 };

export function inHoldout(userId) {
  return bucketFor(HOLDOUT.name, userId) < HOLDOUT.share * BUCKETS;
}
```

### Python example

```python
HOLDOUT = {"name": "holdout-2026-q4", "share": 0.05}

def in_holdout(user_id: str) -> bool:
    return bucket_for(HOLDOUT["name"], user_id) < HOLDOUT["share"] * BUCKETS
```

## Related rules

- ANA-12 [Assign each user to one variant for good](https://agentwranglers.se/playbook/analytics/experiments/experiment-assignment.md) in Product analytics and experiments

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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/holdout-groups">Agent Wranglers product analytics and experiments playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Stop an experiment when a guardrail metric breaks](https://agentwranglers.se/playbook/analytics/experiments/guardrail-metrics.md)
- Next: [Name the lawful basis for every experiment](https://agentwranglers.se/playbook/analytics/experiments/experiment-lawful-basis.md)
- [Experiments](https://agentwranglers.se/playbook/analytics/experiments.md)
