Hanzo
OpenapiExperiment

Is per-variant conversion, lift and statistical significance against the…

Is per-variant conversion, lift and statistical significance against the control arm.

POST /v1/experiment/{id}/analyze

Addresshttps://api.hanzo.ai/v1/experiment/{id}/analyze
MethodPOST
Operationpost_experiment_by_id_analyze
AuthAuthorization: Bearer $HANZO_API_KEY

Is per-variant conversion, lift and statistical significance against the control arm.

It reads per-subject outcomes from the analytics plane over a window, folds them into per-variant samples, and returns each arm's exposed count, conversions, rate, lift versus control, two-proportion z, two-tailed p-value and whether it clears alpha. Arms with no data still appear with zero exposed, so the read is complete over the experiment's declared arms; the control arm sorts first. The pooled-variance estimator is used and the p-value is exact; a degenerate comparison (an empty arm, no variance) answers z 0 and p 1 — not significant, never an error.

Only EXPOSED subjects are counted, and each is joined to its arm by re-evaluating the assignment flag AT ANALYSIS TIME — not from what was in force during the window. That is the one rule to get right: analyzing an experiment after its winner has been promoted re-buckets every subject into the promoted arm, collapsing the control to zero exposed and making the result meaningless. Read the analysis before deciding. A subject the flag cannot place is dropped rather than allowed to poison the fold.

The winner in the response is ADVISORY — the significant, control-beating arm with the highest rate, or empty when inconclusive. It promotes nothing; the decision is a separate, explicit act.

Every plane read is scoped to the caller's org. Per-variant samples are also written to the research evidence plane as immutable ab rows, best-effort: the analysis is still returned if that write fails, because the samples are recomputable, and the failure is logged rather than swallowed.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the experiment the URL names.
alphabodynumberAlpha overrides the 0.05 two-tailed significance threshold when it lies strictly between 0 and 1; anything else leaves the default in place.
daysbodyintegerDays is how far back to read when no start is given: 1 to 365, 30 by default.
endbodystringEnd is the window's exclusive end in RFC3339, defaulting to now.
idbodystringID is the experiment the URL names.
startbodystringStart is the window's inclusive start in RFC3339.

Response

StatusBodyMeaning
200Analysisok

200 body — 15 fields.

FieldInTypeAlwaysDescription
alphabodynumberthe two-tailed threshold significance was judged at
experimentbodystringthe experiment that was analysed
exposedTotalbodyintegersubjects enrolled across every arm
metricbodystringthe event a conversion is counted from
resultsbodyOutcome[]one row per declared arm, control first
results[].controlbodybooleantrue on the baseline arm; its own lift and stats are zero
results[].convertedbodyintegerof those, how many fired the metric event
results[].exposedbodyintegersubjects the arm enrolled — the denominator
results[].liftbodynumberrelative to control: (rate-ctrl)/ctrl
results[].pValuebodynumbertwo-tailed p vs control
results[].ratebodynumberconverted over exposed
results[].significantbodybooleanpValue < alpha
results[].variantbodystringthe arm this row measures
results[].zbodynumbertwo-proportion z vs control
winnerbodystringADVISORY: the significant, control-beating arm with the highest rate, else empty

Failure carries the platform error shape — see Errors.

Examples

hanzo experiments analyze <id>

Experiment API · All Hanzo APIs · Interactive reference

How is this guide?

On this page