{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-law-of-total-expectation-01",
  "mko_id": "mko-law-of-total-expectation",
  "title": {
    "zh-Hant": "含非空零質量塊的全期望",
    "en": "Total expectation with a nonempty null block"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-law-of-total-expectation-01",
    "source": {
      "mko_id": "mko-law-of-total-expectation",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "135b6dedfa00c0fd52813c51ffe3c6af6b5eca3527d0e536110c62f0e27392ac",
      "english_sha256": "90d94b2ee88d08ce7a31ddf914834dec4c8f41f84a8ef5839bc5508ac80c7e0a"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "work"
    ],
    "goal": {
      "zh-Hant": "完整核partition並以兩條路計算E[X]。",
      "en": "Audit the partition and compute E[X] by two routes."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "Ω={a,b,c,d,e}，質量(1/8,3/8,1/4,1/4,0)，X=(0,2,4,4,99)；B1={a,b}，B2={c,d}，B0={e}，G=σ({B1,B2,B0})。",
          "en": "Omega={a,b,c,d,e} has masses(1/8,3/8,1/4,1/4,0), X=(0,2,4,4,99); B1={a,b}, B2={c,d}, B0={e}, and G is their generated sigma-algebra."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "work"
        ],
        "before_tex": "\\{B_1,B_2,B_0\\}",
        "after_tex": "B_i\\cap B_j=\\varnothing\\ (i\\ne j),\\quad\\bigcup_iB_i=\\Omega",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "三塊非空、互斥且包含所有五個原子。",
          "en": "The three blocks are nonempty, disjoint and contain all five atoms."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "work"
          ],
          "explanation": {
            "zh-Hant": "e不可因質量零而從carrier漏掉。",
            "en": "The zero-mass atom e must not disappear from the carrier."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01",
          "work"
        ],
        "before_tex": "P(B_1),P(B_2),P(B_0)",
        "after_tex": "(P(B_1),P(B_2),P(B_0))=(1/2,1/2,0)",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐塊加總質量並先辨識零分母。",
          "en": "Sum block masses and identify the zero denominator first."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "work"
          ],
          "explanation": {
            "zh-Hant": "B0是{e}而非空集合。",
            "en": "B0 is{e}, not the empty set."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02",
          "work"
        ],
        "before_tex": "E[X\\mid B_1]=\\frac{0/8+2(3/8)}{1/2}",
        "after_tex": "E[X\\mid B_1]=3/2",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "以正質量1/2正規化第一塊。",
          "en": "Normalize the first block by its positive mass 1/2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "work"
          ],
          "explanation": {
            "zh-Hant": "不可把分子3/4當條件mean。",
            "en": "The numerator 3/4 is not the conditional mean."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03",
          "work"
        ],
        "before_tex": "E[X\\mid B_2]=\\frac{4/4+4/4}{1/2}",
        "after_tex": "E[X\\mid B_2]=4",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "第二塊值恆4，條件mean也為4。",
          "en": "X is constant 4 on the second block, giving conditional mean 4."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "work"
          ],
          "explanation": {
            "zh-Hant": "分子2除1/2才得到4。",
            "en": "The numerator 2 must be divided by 1/2."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S04",
          "work"
        ],
        "before_tex": "P(B_0)=0",
        "after_tex": "Y=E[X\\mid G]=(3/2,3/2,4,4,k),\\quad k\\in\\mathbb R",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "在null塊任取有限版本值k，沒有0/0商。",
          "en": "Choose any finite version value k on the null block, with no0/0 quotient."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "work"
          ],
          "explanation": {
            "zh-Hant": "版本在e可異，但只影響零質量集合。",
            "en": "Versions may differ at e only on a null set."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05",
          "work"
        ],
        "before_tex": "E[Y]=\\tfrac12\\tfrac32+\\tfrac12 4+0k",
        "after_tex": "E[Y]=11/4",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "完整外層加權包含null塊的零貢獻。",
          "en": "The complete outer weighting includes the null block's zero contribution."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05",
            "work"
          ],
          "explanation": {
            "zh-Hant": "任何有限k都給相同外層mean。",
            "en": "Every finite k gives the same outer expectation."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S06",
          "work"
        ],
        "before_tex": "E[X]=0/8+2(3/8)+4/4+4/4+99(0)",
        "after_tex": "E[X]=11/4",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "直接五原子求和與條件路徑一致。",
          "en": "The direct five-atom sum agrees with the conditional route."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "work"
          ],
          "explanation": {
            "zh-Hant": "99乘零不是把99當條件mean的必要選擇。",
            "en": "The term99 times zero does not force a conditional version value 99."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S07",
          "work"
        ],
        "before_tex": "\\sum_{i:P(B_i)>0}P(B_i)\\frac{\\sum_{\\omega\\in B_i}p_\\omega X(\\omega)}{P(B_i)}",
        "after_tex": "\\sum_{\\omega\\in\\Omega}p_\\omega X(\\omega)=E[X]",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "取消正分母並以partition重排有限和，得到tower identity。",
          "en": "Cancel positive denominators and regroup the finite partition sum to obtain the tower identity."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S07",
            "work"
          ],
          "explanation": {
            "zh-Hant": "null原子的原始加權和也是零，故沒有遺漏貢獻。",
            "en": "The original weighted sum on null atoms is zero as well."
          }
        },
        "leaf_basis": "work"
      }
    ],
    "result": {
      "zh-Hant": "E(E[X|G])=E[X]=11/4，與null塊的版本值無關。",
      "en": "E(E[X|G])=E[X]=11/4, independently of the null-block version value."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "E[X|B0]=0/0=0。",
          "en": "E[X|B0]=0/0=0."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "0/0未定義；只能選版本，不能以商定義。",
          "en": "The quotient is undefined; one may choose a version, not define it by division."
        }
      },
      {
        "claim": {
          "zh-Hant": "partition各塊必須獨立。",
          "en": "The partition blocks must be independent."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "全期望只需互斥與窮盡，非獨立。",
          "en": "Total expectation needs disjointness and exhaustiveness, not independence."
        }
      },
      {
        "claim": {
          "zh-Hant": "漏掉b仍是同一partition。",
          "en": "Omitting b leaves the same partition."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "b有正質量3/8且carrier覆蓋會失敗。",
          "en": "b has positive mass 3/8 and coverage would fail."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "令G為完整partition生成的sigma-algebra，tower identity為E(E(X|G))=E(X)。partition兩兩不交且union為sample space；positive-mass cells使用P(B_i)E[X|B_i]，zero-mass cell conditional value只a.s.決定且weighted contribution為0，禁止division by zero。不需independence也不混同Bayes。",
          "en": "Let G be the sigma-algebra generated by a complete partition. The tower identity is E(E(X|G))=E(X). Cells are pairwise disjoint and cover the sample space. Positive-mass cells contribute P(B_i)E[X|B_i]. Conditional expectation is determined only almost surely: a null-cell quotient is undefined, but any integrable version there has zero weighted contribution. Do not divide by zero. No independence is required, and this is not Bayes formula."
        },
        "source": {
          "mko_id": "mko-law-of-total-expectation",
          "sha256": "135b6dedfa00c0fd52813c51ffe3c6af6b5eca3527d0e536110c62f0e27392ac",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      },
      {
        "id": "work",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "正質量塊的條件mean定義為塊內加權和除質量；零質量塊的版本任取有限值；有限和可重排。",
          "en": "On a positive-mass block, a conditional mean is its probability-weighted sum divided by the block mass; on a null block, any finite version value may be chosen; finite sums may be regrouped."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N01",
        "lhs": "(2*3/8)/(1/2)",
        "rhs": "3/2"
      },
      {
        "id": "N02",
        "lhs": "(1/2)*(3/2)+(1/2)*4",
        "rhs": "11/4"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "有限law；null cell不做條件除法。",
      "en": "Finite law; no conditional division on a null cell."
    },
    "md_symbols": [
      [
        "G",
        "partition生成的σ代數",
        "partition-generated sigma-algebra"
      ],
      [
        "Y",
        "條件期望版本",
        "conditional-expectation version"
      ],
      [
        "k",
        "null塊版本值",
        "null-block version value"
      ]
    ],
    "md_error_controls": [
      {
        "title": "零塊 / Null block",
        "zh": "先算cell質量，再決定是否能除。",
        "en": "Compute cell masses before deciding whether division is allowed."
      },
      {
        "title": "兩路核對 / Two-route audit",
        "zh": "以11/4比對直接sum與outer conditional sum。",
        "en": "Compare the direct sum and outer conditional sum at 11/4."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "24bfde5c0b3950c83c7e98fb04fbc75973b2b5a7422e8b9f5843de4153da3a73",
    "original_source_sha256": "743b092227a8a2ca350616cc5f1b13f4b757db1ac765c638dd10d4dd33fe489d",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [
      "work"
    ],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [
      "BR142-S149",
      "BR142-S148",
      "BR142-P052",
      "BR142-S143",
      "BR142-S144",
      "BR142-S145",
      "BR142-S146",
      "BR142-S147"
    ],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite."
  }
}
