Catalog/stat-t-test-two-sample

Calculators

Two-sample t-test (Welch / pooled) API

Compare two independent samples with a two-sample t-test — Welch unequal-variance (default, Welch–Satterthwaite df) or Student pooled-variance — returning t, df, two-tailed p-value and a decision. Auditable: echoes both means and the difference. Answers 'are these two groups different','Welch t-test p-value','compare group A vs group B means'.

Price$0.01per request
MethodPOST
Route/v1/calc/stat-t-test-two-sample
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calcstatisticst-testwelchtwo-samplep-valueab-testinference
API URLhttps://x402.hexl.dev/v1/calc/stat-t-test-two-sample
Integration docs
Example request
{
  "sample1": [
    20,
    22,
    19,
    24,
    25
  ],
  "sample2": [
    28,
    27,
    30,
    26,
    29
  ]
}
Example response
{
  "t": -4.472136,
  "df": 6.6804,
  "pValue": 0.003248,
  "alpha": 0.05,
  "method": "Welch unequal-variance",
  "mean1": 22,
  "mean2": 28,
  "meanDifference": -6,
  "n1": 5,
  "n2": 5,
  "rejectNull": true,
  "rating": "significant",
  "interpretation": "t(6.68)=-4.472, p=0.0032; reject H0 (equal means) at alpha=0.05."
}
Input schema
{
  "type": "object",
  "required": [
    "sample1",
    "sample2"
  ],
  "properties": {
    "sample1": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "examples": [
        [
          20,
          22,
          19,
          24,
          25
        ]
      ]
    },
    "sample2": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "examples": [
        [
          28,
          27,
          30,
          26,
          29
        ]
      ]
    },
    "equalVariance": {
      "type": "boolean",
      "default": false,
      "description": "true=Student pooled, false=Welch"
    },
    "alpha": {
      "type": "number",
      "default": 0.05
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}