# The holdout and how lift is measured

> A share of people always get your defaults. Comparing them with everyone else measures what Zigbongo adds, with an interval you can check as often as you like.

## What the holdout is

The holdout is a group of people who always get the default you send. Everyone else gets what Zigbongo chooses. The difference between the two is the lift: what Zigbongo adds over what you would have shown anyway. It works like an A/B test against your current experience that runs for as long as the flow does.

- **Per person, and stable.** Whether someone is held out is worked out from the flow and their subject id, so the same person is in or out every time, in every session, with nothing stored. Raising the share only adds people; lowering it only removes them. The one exception so far: once, in an upgrade of Zigbongo, each flow's holdout was drawn afresh, and its lift comparison started again from then.
- **Never learned from.** Holdout decisions show your default and teach Zigbongo nothing, so the comparison stays clean.
- **Visible in each answer.** A decision's `arm` says what happened: `optimised` (Zigbongo chose), `holdout` (your default, held out), `paused` (your default, the flow is paused) or, from the SDK, `fallback` (your default, no answer in time).

## Flow and node holdouts

There are two kinds, and both are 5% by default.

- **The flow holdout:** its share of people see your default choices at every decision point of the flow. The lift is measured against this group.
- **A node holdout:** its share of people see your default at one decision point only. These decisions are counted apart from the ones Zigbongo chose at that point and aren't learned from.

With both at 5%, about 9.75% of decisions show your default.

Set a node's holdout with `holdoutPercent` on any decide call. Zigbongo remembers it for that decision point until you send another value:

```js
const offer = await s.decide("upsell", ["none", "annual"], "none", { holdoutPercent: 10 });
if (offer.arm === "holdout") {
  // this person sees your default at this point
}
```

In a [registered flow](https://zigbongo.com/docs/registered-flows.md), give a node its `holdoutPercent` in the definition.

## Changing the holdout

- **On the dashboard:** the flow page's settings, "Holdout (%)", from 0 to 50.
- **Through the API:** `PATCH /v1/flows/{flowKey}` with `holdoutPercent` from 0 to 100. The SDKs have no call for flow settings.
- **In a registered flow:** the definition's `holdoutPercent`. Each registration sets the flow back to its definition's settings, so change it there; the dashboard shows it but doesn't offer it.

```sh
curl -X PATCH https://zigbongo.com/v1/flows/checkout \
  -H "Authorization: Bearer $ZIGBONGO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"holdoutPercent": 10}'
```

A session keeps the flow holdout it started with; new sessions follow the new share.

A larger holdout proves lift sooner but means more people see your default choices. In simulation, a 5% holdout limited how soon lift could be proved on flows with small effects, not how well Zigbongo learned; a small flow may want a larger holdout for a while. A holdout of 0 leaves nothing to measure lift against.

## How lift is computed

- **Two sides.** Sessions are split by whether the person was in the flow holdout. Holdout sessions got your defaults everywhere. The other sessions had Zigbongo on, including the node holdouts and fallbacks inside them, so the comparison measures Zigbongo as it really runs. Sessions that saw the flow paused are left out of both sides.
- **Each session's value.** Its outcomes within its [attribution window](https://zigbongo.com/docs/sessions-and-outcomes.md), added up by the flow's rule (sum, largest or latest). A session with no outcome counts as 0 once its window closes. Sessions still within their window are pending and not yet compared.
- **The test.** When every closed session's value is 0 or 1, the sides are compared as conversion rates (two proportions). Otherwise they're compared as means per session (Welch's unequal variances).
- **The numbers.** The difference, in your outcome's units, and the relative lift: the mean of the customers Zigbongo chooses for over the holdout's, minus one. Both come with a 95% interval.
- **Direction.** When lower is better, the side with the lower value wins.

## When the comparison starts

The comparison starts once each side has at least 20 closed sessions with a non-zero outcome. Until then the status is "Gathering data": the dashboard shows no lift figure, only each side's progress towards 20 and which side it's still waiting for. The holdout is the smaller side, so it's usually the one.

## The 95% interval

The interval is sequential, or always valid: it holds however often you look. You can check the dashboard every day and act as soon as it says "Clearly better", and the chance that a clear result was wrong stays at most 5% across all your looks.

- **"Clearly better"** means the interval for the difference leaves out zero, above it. Until then the status is "No clear difference yet". If the holdout does clearly better, the dashboard says "Clearly worse". The relative lift's interval comes from the same test, so it leaves out zero exactly when the result is clear.
- **It can be open-ended.** While the holdout's average is too uncertain to put an upper bound on the ratio, as with revenue just past 20 outcomes, the interval reads "−20% or more": any lift above its lower end is possible.
- **It's wider than a one-look interval.** That's the price of looking whenever you like. It's narrowest when the smaller side has about 1,500 sessions (30,000 sessions in all at the default 5% holdout) and widens slowly after.
- **A result can come and go.** A lift can show as clearly better on one look and not on a later one. The guarantee covers every look together.
- **Skewed revenue is less exact early on.** With a 5% holdout and revenue where a few orders are very large, the first looks rest on few holdout purchases. In simulation, 7.7% of runs with no real difference showed a false win at some point.

Learning comes before proof. In simulation, in a five-step quiz where the best version earns 44% more than the default, Zigbongo found that version after about 20,000 sessions (median of 100 simulated runs), and the lift against the holdout became clear at a median of 42,500 sessions.

## What the dashboard shows

Each flow's page leads with the comparison:

- **The status line:** "optimizing", or "paused · showing your default choices", the sessions covered and when the report was computed.
- **The lift:** "Conversion vs holdout" for 0/1 outcomes, "Value per session vs holdout" otherwise. The relative lift, its status (Gathering data, No clear difference yet, Clearly better or Clearly worse) and the 95% interval, drawn as a band with zero marked. A note on how it's measured names the test it comes from (sequential two-proportion test or sequential Welch test).
- **Both sides:** "Zigbongo's choices", the customers Zigbongo chooses for, and the "Holdout", with its share, each with its value per session and its closed and pending sessions.
- **Over time:** the last 30 days; while the flow is under two days old, the last 48 hours by the hour; and while it is under 8 hours old, every minute since its first session. It shows the lift to date (each day's, hour's or minute's lift over the sessions started by then, with its interval as a band, once the comparison has started), both sides' value per session, and sessions, by when each session started, in UTC, once there are two days, hours or minutes of data. While sessions are still in their attribution window, a chart shows the share of them with an outcome so far, on each side: it rises as outcomes arrive, until the window closes.
- **Each decision point:** each option's share of traffic, over the last 7 days and all time, and per day over the last 30 days; its estimate with a 95% interval and its "Chance it's best"; the share of calls that fell back, where the customer saw your default because Zigbongo didn't answer in time; and, where the point uses inputs, the share of people each option is best for, and what Zigbongo learned for each group of customers. Where a point uses inputs, its estimates are Zigbongo's on average over everyone, not the rate among the people each option was shown to, who it was chosen for. For numeric outcomes, estimates are a "Score" on a 0 to 100 scale that ranks the options, not money.

Traffic shares describe what happened: traffic shifted as Zigbongo learned, so they don't tell you which option is better. The lift against the holdout is the measure of what Zigbongo adds.

The same numbers are in the API: `GET /v1/flows/{flowKey}/report` ([API reference](https://zigbongo.com/docs/api.md)).

---

The Markdown of https://zigbongo.com/docs/holdout-and-lift/. Every docs page: https://zigbongo.com/llms.txt
