N

Netzhandwerker Agent Tools · Abtest Evaluate

by Netzhandwerker Agent Tools

POSTBase

$0.002

per call · USD Coin on Base

Reads one conversion experiment two ways at once. Frequentist: two-proportion test, p value, confidence interval on the absolute lift, and the sample size the requested minimum detectable effect needs at the requested power. Bayesian: Beta-Binomial posteriors, probability the variant is better, expected loss either way, credible intervals - closed form, not sampled, so the numbers repeat exactly. looks_taken carries the adjusted threshold and the rate you actually ran at.

Endpoint

POST https://tools.halowerk.com/v1/abtest/evaluate

1

Calls / 30d

1

Unique payers / 30d

Aug 19

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://tools.halowerk.com/v1/abtest/evaluate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "confidence_level": 0.95,
    "control": {
      "conversions": 241,
      "visitors": 4820
    },
    "looks_taken": 3,
    "minimum_detectable_effect_rel": 0.1,
    "variant": {
      "conversions": 302,
      "visitors": 4790
    }
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://tools.halowerk.com/v1/abtest/evaluate" \
  -H "Content-Type: application/json" \
  -d '{"confidence_level":0.95,"control":{"conversions":241,"visitors":4820},"looks_taken":3,"minimum_detectable_effect_rel":0.1,"variant":{"conversions":302,"visitors":4790}}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "bayesian": {
    "credible_interval_control": [
      0.044204,
      0.056523
    ],
    "credible_interval_variant": [
      0.056515,
      0.070291
    ],
    "expected_loss_choosing_control": 0.01169,
    "expected_loss_choosing_variant": 0.000002,
    "method": "closed-form Beta-Binomial, no sampling",
    "posterior_control": {
      "alpha": 242,
      "beta": 4580,
      "mean": 0.050187
    },
    "posterior_variant": {
      "alpha": 303,
      "beta": 4489,
      "mean": 0.06323
    },
    "prior": {
      "alpha": 1,
      "beta": 1
    },
    "probability_exact": true,
    "probability_variant_better": 0.997196
  },
  "control": {
    "conversions": 241,
    "rate": 0.05,
    "visitors": 4820
  },
  "deterministic": true,
  "frequentist": {
    "absolute_lift": 0.013048,
    "alpha": 0.05,
    "alternative": "two_sided",
    "confidence_interval_absolute": [
      0.003816,
      0.02228
    ],
    "confidence_level": 0.95,
    "note": null,
    "p_value": 0.0056071682,
    "relative_lift": 0.26096,
    "significant": true,
    "standard_error": 0.00471,
    "z": 2.769911
  },
  "peeking": {
    "adjusted_alpha": 0.01666667,
    "correction": "bonferroni",
    "effective_false_positive_rate_unadjusted": 0.142625,
    "looks_taken": 3,
    "significant_after_adjustment": true
  },
  "sample_size": {
    "current_control": 4820,
    "current_variant": 4790,
    "minimum_detectable_effect_rel": 0.1,
    "power": 0.8,
    "required_per_group": 30245,
    "sufficient": false
  },
  "stateless": true,
  "variant": {
    "conversions": 302,
    "rate": 0.063048,
    "visitors": 4790
  },
  "verdict": {
    "decision": "keep_running",
    "reasons": [
      "Fewer observations per group (4790) than the 30245 the requested minimum detectable effect needs."
    ]
  }
}

Payment details

Pay to0x2880edfff13100677bf97a3cbdf3bc34771c4e5e
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from Netzhandwerker Agent Tools & similar services