← All tool references

Math · not_available

Bayes Theorem Calculator

Update a prior probability using sensitivity and false-positive evidence.

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/bayes-theorem-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/bayes-theorem-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.

prior_probability · number · required
Enter the prior probability used by this tool.
sensitivity · number · required
Enter the sensitivity / true-positive rate used by this tool.
false_positive_rate · number · required
Enter the false-positive rate used by this tool.
{
    "type": "object",
    "properties": {
        "prior_probability": {
            "type": "number",
            "description": "Enter the prior probability used by this tool."
        },
        "sensitivity": {
            "type": "number",
            "description": "Enter the sensitivity / true-positive rate used by this tool."
        },
        "false_positive_rate": {
            "type": "number",
            "description": "Enter the false-positive rate used by this tool."
        }
    },
    "required": [
        "prior_probability",
        "sensitivity",
        "false_positive_rate"
    ],
    "additionalProperties": false
}

Output schema

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

posterior_probability · number
Posterior probability after positive evidence produced by the tool.
positive_predictive_value · number
Positive predictive value produced by the tool.
negative_predictive_value · number
Negative predictive value produced by the tool.
evidence_probability · number
Probability of positive evidence produced by the tool.
odds_update · string
Posterior odds produced by the tool.
{
    "type": "object",
    "properties": {
        "posterior_probability": {
            "type": "number",
            "description": "Posterior probability after positive evidence produced by the tool."
        },
        "positive_predictive_value": {
            "type": "number",
            "description": "Positive predictive value produced by the tool."
        },
        "negative_predictive_value": {
            "type": "number",
            "description": "Negative predictive value produced by the tool."
        },
        "evidence_probability": {
            "type": "number",
            "description": "Probability of positive evidence produced by the tool."
        },
        "odds_update": {
            "type": "string",
            "description": "Posterior odds produced by the tool."
        }
    },
    "additionalProperties": false
}

Bayes Theorem 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/bayes-theorem-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "prior_probability": 10,
    "sensitivity": 90,
    "false_positive_rate": 8
}'
{
    "ok": true,
    "data": {
        "slug": "bayes-theorem-calculator",
        "result": {
            "values": {
                "posterior_probability": 55.55555555560000158266120706684887409210205078125,
                "positive_predictive_value": 55.55555555560000158266120706684887409210205078125,
                "negative_predictive_value": 98.8066825776000001724241883493959903717041015625,
                "evidence_probability": 16.199999999999999289457264239899814128875732421875,
                "odds_update": "1.25 to 1"
            },
            "display": {
                "display": "55.5555555556"
            },
            "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.