{"uid":"cap_mUgzVniAMq3sxsSUXry7c","slug":"saylor-innovations-data-desk-t-test-dfa6fe2d","name":"Saylor Innovations Data Desk – T-Test","description":"T-test from raw samples - Welch two-sample or one-sample, t, degrees of freedom, p-value, confidence interval, Cohen d and a significance verdict","url":"https://saylorinnovations.com/api/stats/t-test?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","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["a"],"properties":{"a":{"type":"string","description":"Comma-separated sample, 2-500 numbers"},"b":{"type":"string","description":"optional second sample for a Welch two-sample test"},"mu":{"type":"string","description":"hypothesised mean for a one-sample test when b is omitted"},"confidence":{"type":"string","description":"optional percent, default 95"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["test","t","p_value"],"properties":{"t":{"type":"number","description":"Title of the guide"},"df":{"type":"number","description":"Degrees of freedom"},"n_a":{"type":"integer","description":"Number of a"},"n_b":{"type":"integer","description":"Number of b"},"sd_a":{"type":"number","description":"Sd a"},"sd_b":{"type":"number","description":"Sd b"},"test":{"type":"string","description":"Test performed"},"alpha":{"type":["number","null"],"description":"Significance threshold"},"mean_a":{"type":"number","description":"Mean a"},"mean_b":{"type":"number","description":"Mean b"},"source":{"type":"string","description":"Data source the values come from"},"p_value":{"type":"number","description":"P value"},"cohens_d":{"type":["number","null"],"description":"Cohens d"},"interval":{"type":"array","items":{"type":"number"},"description":"Interval between data points"},"checked_at":{"type":"string","description":"Time the check was run (UTC)"},"confidence":{"type":"number","description":"Confidence level in percent"},"difference":{"type":"number","description":"Difference between the means, or mean minus the hypothesised value"},"significant":{"type":"boolean","description":"True when the p-value is below alpha"},"effect_size_label":{"type":"string","description":"Effect size label"}},"additionalProperties":true},"description":{"type":"string"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KChkmVzLEFCdMWxfqETPh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs a Welch two-sample or one-sample t-test on raw numeric samples, returning t-statistic, degrees of freedom, p-value, confidence interval, Cohen's d effect size, and a significance verdict","exampleAgentPrompt":"Run a Welch two-sample t-test on these two groups and tell me if the difference is statistically significant — group A: 23, 25, 28, 22, 27, 24 and group B: 30, 32, 29, 31, 33, 28.","exampleUseCases":[{"title":"A/B test significance check","prompt":"I ran an A/B test on page load times — control group got 1.2, 1.4, 1.1, 1.3, 1.5 seconds and the variant got 0.9, 0.8, 1.0, 0.7, 0.85 seconds. Run a two-sample t-test and tell me if the variant is significantly faster, including the effect size."},{"title":"Clinical trial group comparison","prompt":"I have blood pressure readings before treatment: 140, 138, 142, 145, 137 and after treatment: 130, 128, 132, 127, 135. Do a Welch t-test to see if the treatment made a statistically significant difference, and give me Cohen's d."},{"title":"One-sample mean hypothesis check","prompt":"My sample test scores are 72, 68, 75, 80, 71, 69, 77 — run a one-sample t-test to check whether the mean is significantly different from 70 and show me the p-value and confidence interval."}],"resultDescription":"A JSON object containing the test name, t-statistic, degrees of freedom, p-value, 95% confidence interval for the difference, Cohen's d effect size with a verbal label (small/medium/large), means and standard deviations for each sample, sample sizes, the significance threshold (alpha), and a boolean 'significant' verdict indicating whether the null hypothesis is rejected at alpha.","failureModes":["Missing required sample A parameter returns an error","Fewer than 2 values in sample A causes computation failure","Non-numeric values in comma-separated list return a parsing error","Sample too large (>500 numbers) may be rejected","Identical samples with zero variance may produce undefined t-statistic or Inf degrees of freedom"],"whenToPreferThis":"Choose this endpoint when you have raw numeric samples and need a full t-test output including effect size (Cohen's d) and confidence interval in a single call, rather than computing statistics step by step. It supports both Welch two-sample (unequal variance) and one-sample tests, making it suitable for A/B testing, clinical comparisons, or quality control checks. Prefer this over general-purpose statistics libraries when you need a lightweight, pay-per-call API with no setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-02T06:41:26.331Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-data-desk-t-test-dfa6fe2d"}