← All tool references

Math · not_available

Correlation Calculator

Measure the direction and strength of a linear relationship between paired values.

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/correlation-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/correlation-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.

x_values · string · required
Enter the x values used by this tool.
y_values · string · required
Enter the y values used by this tool.
{
    "type": "object",
    "properties": {
        "x_values": {
            "type": "string",
            "description": "Enter the x values used by this tool."
        },
        "y_values": {
            "type": "string",
            "description": "Enter the y values used by this tool."
        }
    },
    "required": [
        "x_values",
        "y_values"
    ],
    "additionalProperties": false
}

Output schema

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

correlation · number
Pearson correlation produced by the tool.
r_squared · number
R-squared produced by the tool.
direction · string
Relationship direction produced by the tool.
strength · string
Relationship strength produced by the tool.
pair_count · number
Paired observations produced by the tool.
{
    "type": "object",
    "properties": {
        "correlation": {
            "type": "number",
            "description": "Pearson correlation produced by the tool."
        },
        "r_squared": {
            "type": "number",
            "description": "R-squared produced by the tool."
        },
        "direction": {
            "type": "string",
            "description": "Relationship direction produced by the tool."
        },
        "strength": {
            "type": "string",
            "description": "Relationship strength produced by the tool."
        },
        "pair_count": {
            "type": "number",
            "description": "Paired observations produced by the tool."
        }
    },
    "additionalProperties": false
}

Correlation Calculator 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/correlation-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "x_values": "10, 12, 14, 16, 18",
    "y_values": "22, 25, 27, 31, 34"
}'
{
    "ok": true,
    "data": {
        "slug": "correlation-calculator",
        "result": {
            "values": {
                "correlation": 0.99558496740000002045434257524902932345867156982421875,
                "r_squared": 0.991189427312999971064755300176329910755157470703125,
                "direction": "Positive",
                "strength": "Very strong",
                "pair_count": 5
            },
            "display": {
                "display": "0.9955849674"
            },
            "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.