{
  "capability_id": "engineering.msa.linearity",
  "tool_id": "linearity",
  "engine": "linearity",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-15T23:38:12.911Z",
  "engine_build": "2026-09-15",
  "test_count": 9,
  "passed": 9,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 0,
      "passed": 0
    },
    "boundary": {
      "total": 6,
      "passed": 6
    },
    "property": {
      "total": 3,
      "passed": 3
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/engineering/linearity",
  "api": "https://www.calculatorx.com/api/v1/calc/linearity",
  "schema_input": "https://www.calculatorx.com/schemas/engineering.msa.linearity.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/engineering.msa.linearity.output.json",
  "assumptions": [
    "Ordinary least squares of ε = ylab − xref versus xref. slope = dε/d(xref).",
    "n≥3 paired points. xref must not all be equal.",
    "Not a single-master bias, not Type-1 Cg/Cgk, and not a %Linearity pass/fail.",
    "Does not take T."
  ],
  "limitations": [
    "Ordinary least squares of ε versus xref — not a %Linearity / process-variation verdict",
    "Not a single-master bias (Accuracy) and not Type-1 Cg/Cgk",
    "Does not take T and does not issue pass/fail",
    "n≥3 paired points; xref must not all be equal"
  ],
  "boundary_conditions": [
    "missing xref or ylab → MISSING_REQUIRED_INPUT",
    "n < 3 → VALUE_OUT_OF_RANGE",
    "length mismatch → INVALID_INPUT",
    "all xref equal → INVALID_INPUT"
  ],
  "sources": [
    {
      "title": "AIAG Measurement Systems Analysis (MSA)",
      "section": "Linearity and bias study — error versus reference",
      "supports": "Linearity is the change of bias across the operating range. This page reports the OLS slope of ε versus xref and does not issue a %Linearity verdict.",
      "kind": "standard"
    },
    {
      "title": "ISO 11095 — Linear calibration using reference materials",
      "section": "Ordinary least squares of response versus reference",
      "supports": "Paired reference and indication values; linear fit. This page fits ε versus xref rather than ylab versus xref.",
      "kind": "standard"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:257ca7997ec399f806a68a89ee72fe6fadd91ff7cca3f947efd72a26820c25f8",
  "tests": [
    {
      "id": "boundary-lin",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          0,
          2,
          4
        ],
        "ylab": [
          0,
          3,
          6
        ]
      },
      "expect": {
        "slope": 0.5,
        "intercept": 0,
        "r_squared": 1,
        "n": 3
      },
      "expectWarning": null,
      "actual": {
        "slope": 0.5,
        "intercept": 0,
        "r_squared": 1,
        "n": 3,
        "xbar": 2,
        "ebar": 1,
        "xref": [
          0,
          2,
          4
        ],
        "ylab": [
          0,
          3,
          6
        ],
        "error": [
          0,
          1,
          2
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-lin-flat",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          0,
          2,
          4
        ],
        "ylab": [
          1,
          3,
          5
        ]
      },
      "expect": {
        "slope": 0,
        "intercept": 1,
        "r_squared": null
      },
      "expectWarning": null,
      "actual": {
        "slope": 0,
        "intercept": 1,
        "r_squared": null,
        "n": 3,
        "xbar": 2,
        "ebar": 1,
        "xref": [
          0,
          2,
          4
        ],
        "ylab": [
          1,
          3,
          5
        ],
        "error": [
          1,
          1,
          1
        ]
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-lin-n2",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          0,
          2
        ],
        "ylab": [
          0,
          3
        ]
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "linearity needs at least 3 paired points"
    },
    {
      "id": "boundary-lin-equal",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          2,
          2,
          2
        ],
        "ylab": [
          3,
          4,
          5
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "xref values must not all be equal"
    },
    {
      "id": "boundary-lin-len",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          0,
          2,
          4
        ],
        "ylab": [
          0,
          3
        ]
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "xref and ylab must have the same length"
    },
    {
      "id": "boundary-lin-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "xref": [
          0,
          2,
          4
        ]
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "ylab is required"
    },
    {
      "id": "property-lin",
      "ok": true,
      "kind": "property",
      "detail": "0.5",
      "expect": 0.5,
      "actual": 0.5
    },
    {
      "id": "property-lin-flat",
      "ok": true,
      "kind": "property",
      "detail": "0",
      "expect": 0,
      "actual": 0
    },
    {
      "id": "property-lin-alias",
      "ok": true,
      "kind": "property",
      "detail": "0.5",
      "expect": 0.5,
      "actual": 0.5
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 9,
      "total": 9,
      "golden": 0,
      "boundary": 6,
      "property": 3
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-15T22:10:24.430Z",
  "rendered_at": "2026-09-15T23:38:12.911Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "cc2a36f22622cc63033e0c726aba51a3fd0aec3694e4f8528f433b769d5f6eaf",
      "output_schema_sha256": "33668072c4df3c6ea841a5a439f5f501eee69e1c14e87453dfa9a9b09294404b",
      "evidence_sha256": "8150a58e39abc47ae5b9978932ac6515227d0d2b46b58816fbdaf0eae011d0d4",
      "evidence_core_sha256": "8150a58e39abc47ae5b9978932ac6515227d0d2b46b58816fbdaf0eae011d0d4",
      "capability_sha256": "e9e9d847f8514e0b43efaf6a0795f354696344541ce3aac88e8a35bda203a286",
      "engine_sha256": "9265836b6b06f498f3f985320eab21319806f5471a924aead2cf954a9b6ffd8f",
      "mcp_contract_sha256": "ef59a935293be4e8212bcd43a3fc15993093aab9a9136fa56d3a8d267774178c"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
