www.brainiac.software/api/v1/experimentation/sample-ratio-mismatch
Chi-square goodness-of-fit test of observed arm counts against expected traffic shares, with an exact binomial p-value for tiny two-arm counts and generic causes when a mismatch is flagged. Docs: https://www.brainiac.software/api/experimentation/sample-ratio-mismatch
POST
https://www.brainiac.software/api/v1/experimentation/sample-ratio-mismatchUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://www.brainiac.software/api/v1/experimentation/sample-ratio-mismatch", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"arms":[{"expectedShare":0.5,"name":"control","observed":50000},{"expectedShare":0.5,"name":"treatment","observed":49000}],"threshold":0.0005}),
});
console.log(await res.json());Example input
{
"arms": [
{
"expectedShare": 0.5,
"name": "control",
"observed": 50000
},
{
"expectedShare": 0.5,
"name": "treatment",
"observed": 49000
}
],
"threshold": 0.0005
}