# Confidence Interval Calculator (Mean & Proportion)

> Confidence Interval Calculator (Mean & Proportion) is a paid API for AI agents from math-stats.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Computes confidence intervals for a mean (t-interval from a data list) or a proportion (Wilson and Wald methods from successes and trials count).

## Facts

- Endpoint: GET https://math-stats.x402tookit.com/confidence-interval?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/confidence-interval-calculator-mean-proportion-68b1f35b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lJ4wmDIycjuiq5BoGhp4I

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability confidence-interval-calculator-mean-proportion-68b1f35b
```

Example prompt: Calculate the 95% confidence interval for a proportion where we had 87 successes out of 250 trials — give me both Wilson and Wald intervals.

## When to prefer this

Choose this endpoint when you need a rigorous statistical confidence interval for either a sample mean (using the t-distribution) or a proportion (using industry-standard Wilson or Wald methods). It is ideal for survey analysis, A/B test result interpretation, quality control, and any scenario where you need to quantify uncertainty around a point estimate. Prefer Wilson intervals for proportions near 0 or 1 or with small sample sizes, as it outperforms Wald in those conditions. This endpoint handles both use cases in one call and returns both Wilson and Wald intervals for proportions, making it more informative than single-method alternatives.

## Known failure modes

- Missing required 'kind' parameter returns an error
- For 'proportion' kind: missing 'successes' or 'trials' causes an error
- For 'mean' kind: missing or malformed 'values' list causes an error
- Confidence level outside 0.80–0.999 range may be rejected or default to 0.95
- Non-numeric values in the sample list will cause a parse error
- Trials value of zero causes division-by-zero; will return an error or degraded result

## How this service works

Confidence interval for a mean (t interval from a list) or a proportion (Wilson and Wald from successes and trials).

## Output

Returns a JSON object with lower and upper bounds for Wilson and Wald intervals (for proportion), or a t-based interval (for mean), along with the z-critical value, margin of error, estimated proportion, confidence level used, a human-readable summary and verdict, any degraded-mode flags, and a disclaimer about statistical assumptions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "kind"
     ],
     "properties": {
      "kind": {
       "type": "string",
       "description": "mean or proportion"
      },
      "trials": {
       "type": "number",
       "description": "For proportion: number of trials"
      },
      "values": {
       "type": "string",
       "description": "For mean: the sample values"
      },
      "successes": {
       "type": "number",
       "description": "For proportion: number of successes"
      },
      "confidence": {
       "type": "number",
       "description": "0.80 to 0.999 (default 0.95)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "wald": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "lower": {
         "type": [
          "null",
          "number"
         ]
        },
        "upper": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "trials": {
       "type": [
        "null",
        "number"
       ]
      },
      "wilson": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "lower": {
         "type": [
          "null",
          "number"
         ]
        },
        "upper": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/confidence-interval-calculator-mean-proportion-68b1f35b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from math-stats.x402tookit.com](https://www.zero.xyz/host/math-stats.x402tookit.com/llms.txt)
