# Paired T-Test Statistical Analysis

> Paired T-Test Statistical Analysis is a paid API for AI agents from stats-tests.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Runs a paired t-test on before/after measurements from the same subjects, returning mean change, t-statistic, degrees of freedom, p-value, confidence interval, and Cohen's dz effect size.

## Facts

- Endpoint: GET https://stats-tests.x402tookit.com/paired-t-test?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/paired-t-test-statistical-analysis-161309de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VqEj4MSgsBR0kyR48M58x

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 paired-t-test-statistical-analysis-161309de
```

Example prompt: Run a paired t-test on these before measurements [120, 115, 130, 125, 118] and after measurements [112, 108, 119, 117, 110] — use a 0.05 significance level and tell me if the change is significant, what the p-value is, and what Cohen's dz is.

## When to prefer this

Use this endpoint when you have repeated measurements on the same subjects (within-subjects or pre/post design) and want to test whether the mean change is statistically significant. It is the correct choice over a two-sample t-test when the same individuals are measured twice, as pairing controls for individual variability. It also returns Cohen's dz, making it useful when you need both significance testing and effect size in one call. Prefer this over Mann-Whitney U when data is approximately normal and you want parametric results with confidence intervals.

## Known failure modes

- Mismatched array lengths between before and after parameters cause an error — both must have the same number of subjects in the same order
- Fewer than 2 pairs results in insufficient degrees of freedom to compute the test
- Non-numeric values in the before or after strings will cause a parsing error
- Alpha outside the range 0.001–0.2 is rejected as an invalid significance level
- Missing required before or after query parameters returns a 400 error
- Payment failure or insufficient USDC balance returns a 402 Payment Required response

## How this service works

Paired t-test on before and after data: mean change, t, degrees of freedom, p-value, confidence interval and Cohen dz.

## Output

Returns a JSON object with: mean before and after values, array of pairwise differences, mean difference, standard deviation and standard error of differences, t-statistic, degrees of freedom, two-sided p-value, confidence interval (lower, upper, level), Cohen's dz effect size, a boolean significant flag, a plain-language summary and verdict, and metadata such as number of pairs and timestamp.

## 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": [
      "before",
      "after"
     ],
     "properties": {
      "after": {
       "type": "string",
       "description": "Second measurements, same subjects in the same order"
      },
      "alpha": {
       "type": "number",
       "description": "Significance level 0.001 to 0.2 (default 0.05)"
      },
      "before": {
       "type": "string",
       "description": "First measurements"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "pairs": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "cohensDz": {
       "type": [
        "null",
        "number"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "meanAfter": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "meanBefore": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "tStatistic": {
       "type": [
        "null",
        "number"
       ]
      },
      "differences": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "number"
       }
      },
      "significant": {

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/paired-t-test-statistical-analysis-161309de/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stats-tests.x402tookit.com](https://www.zero.xyz/host/stats-tests.x402tookit.com/llms.txt)
