Skip to content

Onboarding A/B test results with chi-squared p-value

GET
/api/v1/ux/ab-tests/{test_id}/results
curl --request GET \
--url https://api.ultimateteam.ai/api/v1/ux/ab-tests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/results \
--header 'X-API-Key: <X-API-Key>'

UX-01: Return per-variant metrics plus the significance decision. p_value is exposed as chi_squared_p_value to match the UX-01 acceptance criterion language; the underlying math is a two-proportion z-test which is mathematically equivalent to chi-squared on a 2x2 table.

test_id
required
Test Id
string format: uuid

Successful Response

Media typeapplication/json
ABTestResultsResponse

Response body for GET /api/v1/ux/ab-tests/{test_id}/results.

p_value from the underlying two-proportion z-test is renamed to chi_squared_p_value here per UX-01 acceptance criteria.

object
chi_squared_p_value
required
Any of:
number
significant
required
Significant
boolean
status
required
Status
string
test_id
required
Test Id
string format: uuid
variants
required
Variants
Array<object>
VariantMetricsView

Per-variant view for the results endpoint.

object
completion_rate
required
Completion Rate
number
name
required
Name
string
observations
required
Observations
integer
successes
required
Successes
integer
variant_id
required
Variant Id
string format: uuid
winner
required
Any of:
string
Examplegenerated
{
"chi_squared_p_value": 1,
"significant": true,
"status": "example",
"test_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"variants": [
{
"completion_rate": 1,
"name": "example",
"observations": 1,
"successes": 1,
"variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"winner": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}