← All tool references

Math · not_available

T-Test Calculator

Run a two-sample Welch t-test from summary statistics.

Open public tool

Overview

Category
Math
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/t-test-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/t-test-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

mean_1 · number · required
Enter group 1 mean for this calculation.
sd_1 · number · required
Enter group 1 standard deviation for this calculation.
n_1 · number · required
Enter group 1 size for this calculation.
mean_2 · number · required
Enter group 2 mean for this calculation.
sd_2 · number · required
Enter group 2 standard deviation for this calculation.
n_2 · number · required
Enter group 2 size for this calculation.
{
    "type": "object",
    "properties": {
        "mean_1": {
            "type": "number",
            "description": "Enter group 1 mean for this calculation."
        },
        "sd_1": {
            "type": "number",
            "description": "Enter group 1 standard deviation for this calculation.",
            "minimum": 9.99999999999999954748111825886258685613938723690807819366455078125e-7
        },
        "n_1": {
            "type": "number",
            "description": "Enter group 1 size for this calculation.",
            "minimum": 2
        },
        "mean_2": {
            "type": "number",
            "description": "Enter group 2 mean for this calculation."
        },
        "sd_2": {
            "type": "number",
            "description": "Enter group 2 standard deviation for this calculation.",
            "minimum": 9.99999999999999954748111825886258685613938723690807819366455078125e-7
        },
        "n_2": {
            "type": "number",
            "description": "Enter group 2 size for this calculation.",
            "minimum": 2
        }
    },
    "required": [
        "mean_1",
        "sd_1",
        "n_1",
        "mean_2",
        "sd_2",
        "n_2"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

t_statistic · number
t statistic calculated by the tool.
degrees_of_freedom · number
Degrees of freedom calculated by the tool.
p_value_approx · number
Approximate two-sided p-value calculated by the tool.
mean_difference · number
Mean difference calculated by the tool.
{
    "type": "object",
    "properties": {
        "t_statistic": {
            "type": "number",
            "description": "t statistic calculated by the tool."
        },
        "degrees_of_freedom": {
            "type": "number",
            "description": "Degrees of freedom calculated by the tool."
        },
        "p_value_approx": {
            "type": "number",
            "description": "Approximate two-sided p-value calculated by the tool."
        },
        "mean_difference": {
            "type": "number",
            "description": "Mean difference calculated by the tool."
        }
    },
    "additionalProperties": false
}

T-Test Calculator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/t-test-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "mean_1": 82,
    "sd_1": 10,
    "n_1": 30,
    "mean_2": 76,
    "sd_2": 12,
    "n_2": 28
}'
{
    "ok": true,
    "data": {
        "slug": "t-test-calculator",
        "result": {
            "values": {
                "t_statistic": 2.060871000000000119456444735988043248653411865234375,
                "degrees_of_freedom": 52.72182699999999755391399958170950412750244140625,
                "p_value_approx": 0.039315179999999998183835003828789922408759593963623046875,
                "mean_difference": 6
            },
            "display": {
                "display": "2.060871"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.