{"uid":"cap_lJ4wmDIycjuiq5BoGhp4I","slug":"confidence-interval-calculator-mean-proportion-68b1f35b","name":"Confidence Interval Calculator (Mean & Proportion)","description":"Confidence interval for a mean (t interval from a list) or a proportion (Wilson and Wald from successes and trials).","url":"https://math-stats.x402tookit.com/confidence-interval?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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","null"]},"successes":{"type":["null","number"]},"zCritical":{"type":["null","number"]},"confidence":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"proportion":{"type":["null","number"]},"marginOfErrorWald":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1U4jMrkC-UnwadRrN1Dhb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes confidence intervals for a mean (t-interval from a data list) or a proportion (Wilson and Wald methods from successes and trials count).","exampleAgentPrompt":"Calculate the 95% confidence interval for a proportion where we had 87 successes out of 250 trials — give me both Wilson and Wald intervals.","exampleUseCases":[{"title":"Survey proportion confidence interval","prompt":"We ran a customer satisfaction survey and got 312 positive responses out of 500 total. Can you give me the 95% confidence interval for the true satisfaction proportion using Wilson and Wald methods?"},{"title":"Sample mean t-interval for lab measurements","prompt":"I have these reaction time measurements in milliseconds: 234, 267, 245, 289, 301, 278, 255, 241, 269, 283. What is the 90% confidence interval for the true mean?"},{"title":"Clinical trial proportion estimate","prompt":"In a clinical trial, 43 out of 180 patients showed improvement. Compute a 99% confidence interval for the proportion of patients who would improve, using both Wald and Wilson methods."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:35:45.153Z","isFirstParty":false,"canonicalSlug":"confidence-interval-calculator-mean-proportion-68b1f35b"}