Catalog/stat-kruskal-wallis

Statistics

Kruskal-Wallis H test API

Runs the Kruskal-Wallis H test (tie-corrected) across three or more independent groups, returning H, df, chi-square p-value and per-group rank sums — a non-parametric one-way ANOVA. Answers 'Do several groups differ when data isn't normal?', 'What is the Kruskal-Wallis H and p-value?'.

Price$0.08per request
MethodPOST
Route/v1/stats/kruskal-wallis
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticskruskal-wallisnonparametricanovamultiple-groupsrankinferencep-value
API URLhttps://x402.hexl.dev/v1/stats/kruskal-wallis
Integration docs
Example request
{
  "groups": [
    [
      1,
      2,
      3
    ],
    [
      4,
      5,
      6
    ],
    [
      7,
      8,
      9
    ]
  ]
}
Example response
{
  "H": 7.2,
  "Huncorrected": 7.2,
  "df": 2,
  "pValue": 0.027324,
  "alpha": 0.05,
  "groups": 3,
  "totalN": 9,
  "rankSums": [
    6,
    15,
    24
  ],
  "tieCorrection": 1,
  "rejectNull": true,
  "rating": "significant",
  "interpretation": "Kruskal-Wallis H(2)=7.2, p=0.0273; at least one group differs at alpha=0.05."
}
Input schema
{
  "type": "object",
  "required": [
    "groups"
  ],
  "properties": {
    "groups": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "examples": [
        [
          [
            1,
            2,
            3
          ],
          [
            4,
            5,
            6
          ],
          [
            7,
            8,
            9
          ]
        ]
      ]
    },
    "alpha": {
      "type": "number",
      "examples": [
        0.05
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}