{
  "$schema": "../../../schemas/mko-v0.4.schema.json",
  "schema_version": "mko-v0.4",
  "id": "mko-expectation",
  "semantic_family_id": "sf-expectation",
  "type": "definition",
  "version": "0.10.0",
  "language": "zh-Hant",
  "titles": {
    "zh-Hant": "有限模型的期望值"
  },
  "summary": {
    "zh-Hant": "有限期望是合法機率權重與隨機變數值的加權總和，線性性不要求獨立。"
  },
  "statement": {
    "zh-Hant": "對非空有限 S、歸一化非負權重 w_s 與實值隨機變數 X，定義 E[X]=Σ_(s∈S)w_s X(s)。在同一機率模型上 E[aX+b]=aE[X]+b、E[X+Y]=E[X]+E[Y]，不需假設 X、Y 獨立；常數 c 的期望為 c。"
  },
  "formula": {
    "tex": "E(X)",
    "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>E</mi><mo>(</mo><mi>X</mi><mo>)</mo></mrow></math>",
    "semantic_ast": {
      "type": "function_call",
      "callee": {
        "type": "symbol",
        "name": "E",
        "glyph": "E"
      },
      "arguments": [
        {
          "type": "symbol",
          "name": "X",
          "glyph": "X"
        }
      ]
    },
    "compiler": {
      "id": "ocme-formula-core",
      "version": "0.4.0",
      "source_sha256": "f5418721593e95478e11dfda98de2ce40bff03e6c81cba28b8e64da36ae9926d"
    }
  },
  "assumptions": [
    {
      "id": "a1",
      "zh-Hant": "權重非負且總和恰為一，隨機變數在同一個有限 S 上總定義。"
    },
    {
      "id": "a2",
      "zh-Hant": "本輪值與變換係數為整數、有理權重明示，使用精確有理數，不採樣估計。"
    }
  ],
  "symbols": [
    {
      "token": "E",
      "role": "finite_expectation",
      "role_zh": "有限期望運算",
      "scope": "representative_formula"
    },
    {
      "token": "X",
      "role": "random_variable",
      "role_zh": "同一機率模型上的實值隨機變數",
      "scope": "representative_formula"
    }
  ],
  "dependencies": [
    {
      "id": "mko-random-variable",
      "title_zh": "有限樣本空間的實值隨機變數",
      "reason_zh": "期望對指定隨機變數值做加權。"
    },
    {
      "id": "mko-probability",
      "title_zh": "有限樣本空間上的機率",
      "reason_zh": "先固定非負、總和一的權重。"
    }
  ],
  "explanation": {
    "paragraphs_zh": [
      "先驗權重，再把每個結果的值乘其機率相加；不是把不同數值各算一次後取普通平均。期望可以為負，也不一定等於某個實際可能值。",
      "仿射變換與同模型兩變數和可以逐點轉換後加權。線性期望不需要獨立性，不能因此推論乘積期望等於期望乘積。",
      "本輪是有限已知機率模型的數學期望，不是實測樣本均值、長期收斂結果或統計估計精度。一般積分存在性及無限期望另列。"
    ],
    "common_misconception_zh": "未給等可能就平均所有值，或以線性期望推論獨立或乘積公式。"
  },
  "proofs": [],
  "computational_companions": [],
  "verification": {
    "computational_status": "not_evaluated_no_computational_claim",
    "warning_zh": "有限加權總和可精確核對；一般期望與可積性的形式 Evidence 未建立。",
    "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": "綁定有限 sum 與積分 expectation 的可積性橋，保留線性性和共用模型前提。"
  },
  "provenance": {
    "origin": "ocme_local_ai_materialization_candidate",
    "note_zh": "依 research/atlas-expectation.md 整理；2026-10-04 脈衝 R06（使用者手動接續 2026-10-05 工作序列；實際日期仍為 2026-10-04），英文及 Lean 依使用者指示延後。",
    "content_license": "CC-BY-SA-4.0",
    "code_license": "MIT",
    "created_at": "2026-10-04"
  }
}
