omni_diagnostic_sensitivity_specificity
Calculate diagnostic test sensitivity, specificity, PPV, NPV, and likelihood ratios from a 2×2 contingency table to evaluate clinical test performance.
Instructions
Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator. Calculate diagnostic Sensitivity, Specificity, Positive Predictive Value (PPV), Negative Predictive Value (NPV), and Likelihood Ratios from a 2×2 contingency table. Discipline: BIOTECH. Governing mathematical model / formula: Sensitivity = TP / (TP + FN) | Specificity = TN / (TN + FP) | PPV = TP / (TP + FP).
USAGE GUIDELINES:
WHEN TO USE: Invoke for deterministic calculation of diagnostic_sensitivity_pct (Diagnostic Sensitivity), diagnostic_specificity_pct (Diagnostic Specificity), positive_predictive_value_ppv (Positive Predictive Value (PPV)), negative_predictive_value_npv (Negative Predictive Value (NPV)) using true_positives_tp (True Positives (TP) in cases), false_positives_fp (False Positives (FP) in cases), false_negatives_fn (False Negatives (FN) in cases), true_negatives_tn (True Negatives (TN) in cases). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.
WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.
SIBLING ROUTING: Use this dedicated specialist tool for 'Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator' rather than generic dispatchers like omni_universal_query. For cross-discipline dynamic dispatch, see omni_universal_query.
BEHAVIOR & SAFETY:
Pure deterministic computation with machine floating-point precision.
Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.
Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.
RETURNS:
Structured JSON object containing:
status (string): "success" on valid execution or "error" if validation fails
calculator (string): "diagnostic-sensitivity-specificity"
category (string): "biotech"
name (string): "Clinical Diagnostic Test Sensitivity, Specificity & Predictive Value (PPV/NPV) Calculator"
formula (string): Governing mathematical formula string
inputs (object): Echoed input parameter dictionary with applied defaults
metrics (object): Dictionary of computed outputs:
metrics.diagnostic_sensitivity_pct (Diagnostic Sensitivity): Formatted display string (e.g. '95.0% True Positive Rate')
metrics.diagnostic_specificity_pct (Diagnostic Specificity): Formatted display string (e.g. '98.9% True Negative Rate')
metrics.positive_predictive_value_ppv (Positive Predictive Value (PPV)): Formatted display string (e.g. '90.5% (Post-Test Probability)')
metrics.negative_predictive_value_npv (Negative Predictive Value (NPV)): Formatted display string (e.g. '99.4% Ruled Out')
execution_time_ms (number): Latency in milliseconds.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "omni_diagnostic_sensitivity_specificity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| true_negatives_tn | No | True Negatives (TN) (cases). Healthy individuals correctly identified as negative. Default: 890. Min: 0. Max: 100000. | |
| true_positives_tp | No | True Positives (TP) (cases). Sick patients correctly identified by test as positive. Default: 95. Min: 0. Max: 10000. | |
| false_negatives_fn | No | False Negatives (FN) (cases). Sick patients incorrectly flagged as negative. Default: 5. Min: 0. Max: 10000. | |
| false_positives_fp | No | False Positives (FP) (cases). Healthy individuals incorrectly flagged as positive. Default: 10. Min: 0. Max: 10000. |