{
  "tool": "mcom-auditing--assurance.attribute_sample_size",
  "name": "Attribute sample size for a test of controls (CDU-BUS-AUD-900)",
  "answers": "How many items must be tested so that, finding no more than the planned number of deviations, the control can be relied on at this confidence?",
  "degree": {
    "id": "competency:mcom-auditing--assurance",
    "code": "CDU-BUS-AUD-900",
    "name": "MCom Auditing & Assurance",
    "version": "1.0.0"
  },
  "reference": "ISA 530 Audit Sampling ¶7, ¶A10–A13 (tolerable rate, sampling risk); sample size by the binomial distribution as in the AICPA Audit Sampling guide",
  "endpoint": "/faculty/mcom-auditing--assurance/attribute_sample_size",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "confidence",
      "tolerableRate",
      "plannedDeviations"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "confidence": {
        "type": "number",
        "description": "Confidence level (1 − risk of overreliance), 0.8–0.99",
        "minimum": 0.8,
        "maximum": 0.99
      },
      "tolerableRate": {
        "type": "number",
        "description": "Tolerable deviation rate, 0.01–0.2",
        "minimum": 0.01,
        "maximum": 0.2
      },
      "plannedDeviations": {
        "type": "number",
        "description": "Deviations the plan allows the sample to contain",
        "minimum": 0,
        "maximum": 10
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "sampleSize",
      "riskOfOverreliance"
    ],
    "properties": {
      "sampleSize": {
        "type": "number",
        "description": "Smallest n meeting the risk"
      },
      "riskOfOverreliance": {
        "type": "number",
        "description": "P(deviations ≤ planned | n, tolerable rate)"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "confidence": 0.95,
    "tolerableRate": 0.05,
    "plannedDeviations": 1
  }
}