{
  "tool": "mph-health-economics--policy.diagnostic_accuracy",
  "name": "Predictive values and likelihood ratios (CDU-HEA-MPH-900)",
  "answers": "In a population with this prevalence, how likely is a positive (or negative) result to be right?",
  "degree": {
    "id": "competency:mph-health-economics--policy",
    "code": "CDU-HEA-MPH-900",
    "name": "MPH Health Economics & Policy",
    "version": "1.0.0"
  },
  "reference": "Bayes’ theorem applied to a diagnostic test; likelihood ratios LR+ = sens/(1 − spec), LR− = (1 − sens)/spec",
  "endpoint": "/faculty/mph-health-economics--policy/diagnostic_accuracy",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "sensitivity",
      "specificity",
      "prevalence"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "sensitivity": {
        "type": "number",
        "description": "P(test + | disease), 0–0.9999",
        "minimum": 0.0001,
        "maximum": 0.9999
      },
      "specificity": {
        "type": "number",
        "description": "P(test − | no disease), 0–0.9999",
        "minimum": 0.0001,
        "maximum": 0.9999
      },
      "prevalence": {
        "type": "number",
        "description": "Pre-test probability, 0–1",
        "minimum": 0.000001,
        "maximum": 0.999999
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "ppv",
      "npv",
      "positiveLikelihoodRatio",
      "negativeLikelihoodRatio"
    ],
    "properties": {
      "ppv": {
        "type": "number",
        "description": "P(disease | +)"
      },
      "npv": {
        "type": "number",
        "description": "P(no disease | −)"
      },
      "positiveLikelihoodRatio": {
        "type": "number",
        "description": "LR+"
      },
      "negativeLikelihoodRatio": {
        "type": "number",
        "description": "LR−"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "sensitivity": 0.9,
    "specificity": 0.95,
    "prevalence": 0.02
  }
}