{
  "tool": "mcom-forensic-accounting--investigation.duplicate_amounts",
  "name": "Number-duplication test (CDU-BUS-FOR-900)",
  "answers": "Which payment amounts recur, how often, and how many rows do the repeats account for?",
  "degree": {
    "id": "competency:mcom-forensic-accounting--investigation",
    "code": "CDU-BUS-FOR-900",
    "name": "MCom Forensic Accounting & Investigation",
    "version": "1.0.0"
  },
  "reference": "Nigrini, M. J. (2011) Forensic Analytics, Wiley, ch. 8 (the number-duplication test); amounts compared to the cent",
  "endpoint": "/faculty/mcom-forensic-accounting--investigation/duplicate_amounts",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "amounts"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "amounts": {
        "type": "array",
        "description": "Payment amounts, in ledger order",
        "items": {
          "type": "number"
        }
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "rows",
      "distinctAmounts",
      "duplicatedAmounts",
      "duplicateRows",
      "mostFrequentAmount",
      "mostFrequentCount"
    ],
    "properties": {
      "rows": {
        "type": "number",
        "description": "Amounts tested"
      },
      "distinctAmounts": {
        "type": "number",
        "description": "Different amounts"
      },
      "duplicatedAmounts": {
        "type": "number",
        "description": "Amounts that occur more than once"
      },
      "duplicateRows": {
        "type": "number",
        "description": "Rows carrying a duplicated amount"
      },
      "mostFrequentAmount": {
        "type": "number",
        "description": "The amount that recurs most (the smallest such, on a tie)"
      },
      "mostFrequentCount": {
        "type": "number",
        "description": "How often it occurs"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "amounts": [
      1250,
      980.5,
      1250,
      4400,
      75,
      980.5,
      1250,
      310,
      5000,
      4400,
      18.99,
      6200
    ]
  }
}