{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-bias-variance-decomposition",
  "semantic_family_id": "sf-bias-variance-decomposition",
  "type": "theorem",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "偏誤－變異數分解"
  },
  "summary": {
    "zh-Hant": "逐參數theta，scalar estimator的MSE等於其variance加上bias平方。"
  },
  "statement": {
    "zh-Hant": "每個theta須給完整finite sampling law，主端分別直接計算mean、bias=E_theta[T]-theta、variance=E_theta[(T-E_theta[T])^2]與MSE=E_theta[(T-theta)^2]。展開T-theta=(T-E[T])+bias後，cross term以E[T-E[T]]=0消失，得到MSE=variance+bias^2。多theta逐law核對。unbiased只推出MSE=variance，不推出zero MSE或consistency；單一observed squared error不是MSE。"
  },
  "formula": {
    "tex": "M(T,t)=V(T,t)+B(T,t)^2",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mrow><mi>M</mi><mo>(</mo><mi>T</mi><mo>,</mo><mi>t</mi><mo>)</mo></mrow><mo>=</mo><mrow><mrow><mi>V</mi><mo>(</mo><mi>T</mi><mo>,</mo><mi>t</mi><mo>)</mo></mrow><mo>+</mo><msup><mrow><mi>B</mi><mo>(</mo><mi>T</mi><mo>,</mo><mi>t</mi><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow></math>",
    "semantic_ast": {
      "type": "equation",
      "lhs": {
        "type": "function_call",
        "callee": {
          "type": "symbol",
          "name": "M",
          "glyph": "M"
        },
        "arguments": [
          {
            "type": "symbol",
            "name": "T",
            "glyph": "T"
          },
          {
            "type": "symbol",
            "name": "t",
            "glyph": "t"
          }
        ]
      },
      "rhs": {
        "type": "addition",
        "operands": [
          {
            "type": "function_call",
            "callee": {
              "type": "symbol",
              "name": "V",
              "glyph": "V"
            },
            "arguments": [
              {
                "type": "symbol",
                "name": "T",
                "glyph": "T"
              },
              {
                "type": "symbol",
                "name": "t",
                "glyph": "t"
              }
            ]
          },
          {
            "type": "power",
            "base": {
              "type": "function_call",
              "callee": {
                "type": "symbol",
                "name": "B",
                "glyph": "B"
              },
              "arguments": [
                {
                  "type": "symbol",
                  "name": "T",
                  "glyph": "T"
                },
                {
                  "type": "symbol",
                  "name": "t",
                  "glyph": "t"
                }
              ]
            },
            "exponent": {
              "type": "number",
              "value": 2
            }
          }
        ]
      }
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "e19e56efa26d9637b913e1841c5edf6ef82af42f94afc7074570851dd7b03b0b"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "theta、support與probabilities皆為exact rationals，law完整且正規化。"
    },
    {
      "id": "a2",
      "zh-Hant": "本輪限scalar estimator與finite sampling law。"
    }
  ],
  "symbols": [
    {
      "token": "M",
      "role": "mean_squared_error",
      "role_zh": "均方誤差",
      "scope": "representative_formula"
    },
    {
      "token": "T",
      "role": "scalar_estimator",
      "role_zh": "純量估計量",
      "scope": "representative_formula"
    },
    {
      "token": "t",
      "role": "target_parameter",
      "role_zh": "目標參數",
      "scope": "representative_formula"
    },
    {
      "token": "V",
      "role": "estimator_variance",
      "role_zh": "估計量變異數",
      "scope": "representative_formula"
    },
    {
      "token": "B",
      "role": "estimator_bias",
      "role_zh": "估計量偏誤",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-estimator-mean-squared-error",
      "title_zh": "估計量均方誤差",
      "reason_zh": "MSE逐theta定義。"
    },
    {
      "id": "mko-estimator-bias",
      "title_zh": "估計量偏誤",
      "reason_zh": "bias定義。"
    },
    {
      "id": "mko-estimator-variance",
      "title_zh": "估計量變異數",
      "reason_zh": "variance定義。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "四個量由同一完整law獨立計算。",
      "cross term消失需明示centering identity。",
      "biased與unbiased界線不等於zero error。"
    ],
    "common_misconception_zh": "把單一sample error當MSE，或把unbiased誤解成沒有變異。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "每個theta需獨立核對；不由有限表推出consistency或asymptotic optimality。",
    "evidence_refs": [],
    "producers": [
      {
        "id": "lean-mathlib",
        "adapter": "formal_system",
        "config_path": "formal/lean/lakefile.toml",
        "status": "configured"
      }
    ]
  },
  "formalization": {
    "status": "not_formalized",
    "target_systems": [
      "Lean 4",
      "Mathlib"
    ],
    "next_obligation_zh": "加入有限模型風險與估計量比較。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-bias-variance-decomposition.md 整理；2026-10-15 脈衝 R03（使用者手動接續 2026-11-15 工作序列；實際日期仍為 2026-10-15），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-15"
  }
}
