{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-random-variable-independence-01",
  "mko_id": "mko-random-variable-independence",
  "title": {
    "zh-Hant": "隨機變數獨立：完整核對有限聯合表，零協方差只是後果",
    "en": "Independence of random variables: checking the complete finite joint table, with zero covariance only a consequence"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-random-variable-independence-01",
    "source": {
      "mko_id": "mko-random-variable-independence",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "e8f6e97a13cd93c4cf37384ba6ab187d3ad4ca22c8f56260ed3707df0b8cc94e",
      "english_sha256": "d30f20ac634c6f78b55166d2cdea3b6fa5631c304d8ecd617b39b0a5aae747e8"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "prob_axioms",
      "frac_rules",
      "distributive",
      "finite_sum_rules",
      "numeric_evaluation"
    ],
    "goal": {
      "zh-Hant": "（一）聯合表 J₁：X∈{0,1}、Y∈{0,1,2}，P(0,0)=1/12、P(0,1)=1/12、P(0,2)=1/6、P(1,0)=1/6、P(1,1)=1/6、P(1,2)=1/3。由聯合表聚合兩個邊際，核對全部 6 個值對的乘積式，判定 X、Y 是否獨立；並證明獨立推出任意座標事件 {X∈S} 與 {Y∈T} 獨立與 E[XY]=E[X]E[Y]。（二）聯合表 J₂：X 在 {−1,0,1} 上均勻、Y=X²。證明 Cov(X,Y)=0 但 X、Y 不獨立。（三）聯合表 J₃ 說明只核一個值對不夠。",
      "en": "(1) Joint table J₁: X∈{0,1}, Y∈{0,1,2}, P(0,0)=1/12, P(0,1)=1/12, P(0,2)=1/6, P(1,0)=1/6, P(1,1)=1/6, P(1,2)=1/3. Aggregate both marginals from the joint table, check the product equation at all 6 value pairs, and decide whether X and Y are independent; also prove that independence implies independence of any coordinate events {X∈S} and {Y∈T} and E[XY]=E[X]E[Y]. (2) Joint table J₂: X uniform on {−1,0,1} and Y=X². Prove Cov(X,Y)=0 although X and Y are not independent. (3) Use joint table J₃ to show that checking a single value pair is not enough."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "J₁：值集合 X∈{0,1}、Y∈{0,1,2}；p(0,0)=1/12、p(0,1)=1/12、p(0,2)=1/6、p(1,0)=1/6、p(1,1)=1/6、p(1,2)=1/3。",
          "en": "J₁: value sets X∈{0,1}, Y∈{0,1,2}; p(0,0)=1/12, p(0,1)=1/12, p(0,2)=1/6, p(1,0)=1/6, p(1,1)=1/6, p(1,2)=1/3."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "J₂：值集合 X∈{−1,0,1}、Y∈{0,1}；p(−1,1)=1/3、p(0,0)=1/3、p(1,1)=1/3，其餘值對 (−1,0)、(0,1)、(1,0) 的質量為 0（即 Y=X²）。",
          "en": "J₂: value sets X∈{−1,0,1}, Y∈{0,1}; p(−1,1)=1/3, p(0,0)=1/3, p(1,1)=1/3, and the remaining pairs (−1,0), (0,1), (1,0) have mass 0 (that is, Y=X²)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "J₃：值集合 X∈{0,1}、Y∈{0,1,2}；p(0,0)=1/4、p(0,1)=1/4、p(0,2)=0、p(1,0)=1/4、p(1,1)=0、p(1,2)=1/4。",
          "en": "J₃: value sets X∈{0,1}, Y∈{0,1,2}; p(0,0)=1/4, p(0,1)=1/4, p(0,2)=0, p(1,0)=1/4, p(1,1)=0, p(1,2)=1/4."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "mko_joint_def"
        ],
        "before_tex": "J_1:\\ p(x,y)\\ge0",
        "after_tex": "\\sum_{(x,y)}p(x,y)=\\tfrac1{12}+\\tfrac1{12}+\\tfrac16+\\tfrac16+\\tfrac16+\\tfrac13=1",
        "relation": "definition",
        "rule": "mko_joint_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "先確認 J₁ 是同一個機率模型的完整聯合表：6 個互異值對、質量都非負，總和以 12 為分母是 1+1+2+2+2+4=12，即 1。之後的邊際與乘積都由這張表計算。",
          "en": "First confirm that J₁ is the complete joint table of one probability model: 6 distinct value pairs, all masses nonnegative, and with denominator 12 the total is 1+1+2+2+2+4=12, that is 1. Marginals and products are computed from this table from here on."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_joint_def",
            "G1"
          ],
          "explanation": {
            "zh-Hant": "只核資格（N1）；若總和不是 1，就不是機率模型，之後的判定無意義。",
            "en": "It only checks the setting (N1); if the total were not 1 there would be no probability model and later decisions would be meaningless."
          }
        },
        "leaf_basis": "mko_joint_def + numeric_evaluation"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "prob_axioms"
        ],
        "before_tex": "P(X=0)=\\sum_{y}p(0,y),\\ P(X=1)=\\sum_{y}p(1,y)",
        "after_tex": "P(X=0)=\\tfrac1{12}+\\tfrac1{12}+\\tfrac16=\\tfrac13,\\ \\ P(X=1)=\\tfrac16+\\tfrac16+\\tfrac13=\\tfrac23",
        "relation": "equivalent",
        "rule": "prob_axioms",
        "conditions": [],
        "explanation": {
          "zh-Hant": "事件 {X=x} 是 3 個不交的值對事件 {X=x,Y=y} 的聯集，依可加性把該行相加（MKO：先由聯合表聚合邊際）。",
          "en": "The event {X=x} is the disjoint union of the 3 pair events {X=x,Y=y}, so by additivity sum that row (the MKO: first aggregate the marginals from the joint table)."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "prob_axioms",
            "frac_rules"
          ],
          "explanation": {
            "zh-Hant": "精確有理數相加，兩邊同值（N2）。",
            "en": "Exact rational sums; both sides have the same value (N2)."
          }
        },
        "leaf_basis": "prob_axioms + frac_rules + numeric_evaluation"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "prob_axioms"
        ],
        "before_tex": "P(Y=y)=\\sum_{x}p(x,y)",
        "after_tex": "P(Y=0)=\\tfrac1{12}+\\tfrac16=\\tfrac14,\\ P(Y=1)=\\tfrac1{12}+\\tfrac16=\\tfrac14,\\ P(Y=2)=\\tfrac16+\\tfrac13=\\tfrac12",
        "relation": "equivalent",
        "rule": "prob_axioms",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同理按列相加。三個邊際之和 1/4+1/4+1/2=1，作為一致性核對。",
          "en": "Likewise sum each column. The three marginals add to 1/4+1/4+1/2=1, a consistency check."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "prob_axioms",
            "frac_rules"
          ],
          "explanation": {
            "zh-Hant": "精確計算，兩邊同值（N3）。",
            "en": "Exact computation; both sides have the same value (N3)."
          }
        },
        "leaf_basis": "prob_axioms + frac_rules + numeric_evaluation"
      },
      {
        "id": "S04",
        "uses": [
          "mko_rv_indep_def"
        ],
        "before_tex": "X,Y\\ \\text{independent}",
        "after_tex": "\\forall x\\in\\{0,1\\}\\ \\forall y\\in\\{0,1,2\\}:\\ p(x,y)=P(X=x)P(Y=y)",
        "relation": "definition",
        "rule": "mko_rv_indep_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依 MKO，獨立要求每個值對都通過乘積式；值集合的乘積有 2·3=6 對，全部都要核對，包括質量為 0 的值對（若有）。",
          "en": "By the MKO, independence requires every value pair to pass the product equation; the product of the value sets has 2·3=6 pairs, and all must be checked, including any pair of mass 0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_rv_indep_def"
          ],
          "explanation": {
            "zh-Hant": "只展開定義；量化範圍是完整的值對集合，不是幾個樣本。",
            "en": "It only unfolds the definition; the quantifier ranges over the complete set of value pairs, not a few samples."
          }
        },
        "leaf_basis": "mko_rv_indep_def + def_unfold"
      },
      {
        "id": "S05",
        "uses": [
          "S02",
          "S03",
          "G1"
        ],
        "before_tex": "x=0:\\ P(X=0)=\\tfrac13",
        "after_tex": "\\tfrac13\\cdot\\tfrac14=\\tfrac1{12}=p(0,0),\\ \\tfrac13\\cdot\\tfrac14=\\tfrac1{12}=p(0,1),\\ \\tfrac13\\cdot\\tfrac12=\\tfrac16=p(0,2)",
        "relation": "implies",
        "rule": "frac_rules",
        "conditions": [],
        "explanation": {
          "zh-Hant": "第一行的三個值對：乘積分別是 1/12、1/12、1/6，與 G1 的質量完全相同。",
          "en": "The three pairs of the first row: the products are 1/12, 1/12 and 1/6, exactly equal to the masses in G1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "frac_rules",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "每個等式都是精確有理數比較（N4、N13）。",
            "en": "Each equation is an exact rational comparison (N4, N13)."
          }
        },
        "leaf_basis": "frac_rules + numeric_evaluation"
      },
      {
        "id": "S06",
        "uses": [
          "S02",
          "S03",
          "G1"
        ],
        "before_tex": "x=1:\\ P(X=1)=\\tfrac23",
        "after_tex": "\\tfrac23\\cdot\\tfrac14=\\tfrac16=p(1,0),\\ \\tfrac23\\cdot\\tfrac14=\\tfrac16=p(1,1),\\ \\tfrac23\\cdot\\tfrac12=\\tfrac13=p(1,2)",
        "relation": "implies",
        "rule": "frac_rules",
        "conditions": [],
        "explanation": {
          "zh-Hant": "第二行的三個值對：乘積分別是 1/6、1/6、1/3，也與質量相同。",
          "en": "The three pairs of the second row: the products are 1/6, 1/6 and 1/3, again equal to the masses."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "frac_rules",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確比較（N5、N6）。",
            "en": "Exact comparisons (N5, N6)."
          }
        },
        "leaf_basis": "frac_rules + numeric_evaluation"
      },
      {
        "id": "S07",
        "uses": [
          "S04",
          "S05",
          "S06"
        ],
        "before_tex": "6\\ \\text{of}\\ 6\\ \\text{value pairs factor}",
        "after_tex": "X,Y\\ \\text{independent under}\\ J_1",
        "relation": "implies",
        "rule": "case_analysis",
        "conditions": [],
        "explanation": {
          "zh-Hant": "S05、S06 涵蓋 {0,1}×{0,1,2} 的全部 6 對（x=0 與 x=1 兩種情形窮盡），每一對都通過，依 S04 的定義 X 與 Y 獨立。這是對完整有限表的窮舉，不是抽樣。",
          "en": "S05 and S06 cover all 6 pairs of {0,1}×{0,1,2} (the cases x=0 and x=1 are exhaustive) and every pair passes, so by the definition in S04, X and Y are independent. This is an exhaustive check of the complete finite table, not a sample."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S04",
            "S05",
            "S06",
            "case_analysis"
          ],
          "explanation": {
            "zh-Hant": "目標：獨立。足夠條件：6 對全部通過；H⇒G 由定義，H 由已知正向證得。",
            "en": "Goal: independence. Sufficient condition: all 6 pairs pass; H⇒G by the definition, and H is proved forwards from the givens."
          }
        },
        "leaf_basis": "case_analysis + mko_rv_indep_def"
      },
      {
        "id": "S08",
        "uses": [
          "S07"
        ],
        "before_tex": "S=\\{1\\},\\ T=\\{1,2\\}",
        "after_tex": "P(X\\in S,Y\\in T)=\\tfrac16+\\tfrac13=\\tfrac12=\\tfrac23\\cdot\\tfrac34=P(X\\in S)P(Y\\in T)",
        "relation": "implies",
        "rule": "L_rect",
        "conditions": [],
        "explanation": {
          "zh-Hant": "MKO 說獨立等價於所有值事件逆像獨立。依引理 L_rect，值對的乘積式推出任意矩形事件的乘積式。例子：S={1}、T={1,2}，左邊 p(1,1)+p(1,2)=1/2，右邊 (2/3)(1/4+1/2)=(2/3)(3/4)=1/2。引理在子步 S08.1、S08.2 證明。",
          "en": "The MKO says independence is equivalent to independence of all inverse images of value events. By Lemma L_rect, the product equation for value pairs implies it for every rectangle event. Example: S={1}, T={1,2}; the left side is p(1,1)+p(1,2)=1/2 and the right side (2/3)(1/4+1/2)=(2/3)(3/4)=1/2. The lemma is proved in sub-steps S08.1 and S08.2."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S07",
            "L_rect",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "反向（矩形事件獨立 ⇒ 值對獨立）取 S={x}、T={y} 即得，但本步不需要；數字由 N7 核對。",
            "en": "The converse (rectangle independence ⇒ pair independence) follows with S={x}, T={y}, but this step does not need it; the numbers are checked by N7."
          }
        },
        "leaf_basis": "finite_sum_rules + distributive + prob_axioms"
      },
      {
        "id": "S08.1",
        "uses": [
          "prob_axioms",
          "mko_joint_def"
        ],
        "before_tex": "P(X\\in S,Y\\in T)",
        "after_tex": "\\sum_{x\\in S}\\sum_{y\\in T}p(x,y)",
        "relation": "equivalent",
        "rule": "prob_axioms",
        "conditions": [],
        "explanation": {
          "zh-Hant": "事件 {X∈S, Y∈T} 是值對事件 {X=x,Y=y}（x∈S、y∈T）的不交聯集，依可加性它的機率是這些質量之和。",
          "en": "The event {X∈S, Y∈T} is the disjoint union of the pair events {X=x,Y=y} with x∈S and y∈T, so by additivity its probability is the sum of these masses."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "prob_axioms",
            "mko_joint_def"
          ],
          "explanation": {
            "zh-Hant": "可加性是等式，雙向成立；值對互異保證不重複計算。",
            "en": "Additivity is an equation, valid both ways; distinct pairs ensure nothing is double counted."
          }
        },
        "leaf_basis": "prob_axioms + mko_joint_def"
      },
      {
        "id": "S08.2",
        "uses": [
          "S08.1",
          "finite_sum_rules",
          "distributive"
        ],
        "before_tex": "\\sum_{x\\in S}\\sum_{y\\in T}P(X=x)P(Y=y)",
        "after_tex": "\\Big(\\sum_{x\\in S}P(X=x)\\Big)\\Big(\\sum_{y\\in T}P(Y=y)\\Big)=P(X\\in S)P(Y\\in T)",
        "relation": "implies",
        "rule": "distributive",
        "conditions": [
          "p(x,y)=P(X=x)P(Y=y)\\ \\forall x,y"
        ],
        "explanation": {
          "zh-Hant": "代入假設 p(x,y)=P(X=x)P(Y=y)，內層和提出與 y 無關的 P(X=x)，外層和再提出 Σ_y P(Y=y)（有限和的分配律）；最後兩個和依可加性就是 P(X∈S) 與 P(Y∈T)。S08.1 與 S08.2 合起來證得引理 L_rect。",
          "en": "Substitute the hypothesis p(x,y)=P(X=x)P(Y=y); the inner sum pulls out P(X=x), which does not depend on y, and the outer sum pulls out Σ_y P(Y=y) (distributivity of finite sums); by additivity the two sums are P(X∈S) and P(Y∈T). S08.1 and S08.2 together prove Lemma L_rect."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S08.1",
            "finite_sum_rules",
            "distributive",
            "prob_axioms"
          ],
          "explanation": {
            "zh-Hant": "需要全部值對的乘積式；只有部分值對成立時，代入不合法。",
            "en": "It needs the product equation for all value pairs; if it held only for some pairs, the substitution would not be valid."
          }
        },
        "leaf_basis": "finite_sum_rules + distributive + prob_axioms"
      },
      {
        "id": "S09",
        "uses": [
          "S07",
          "expectation_def"
        ],
        "before_tex": "X,Y\\ \\text{independent}",
        "after_tex": "E[XY]=E[X]E[Y],\\ \\ \\operatorname{Cov}(X,Y)=0",
        "relation": "implies",
        "rule": "L_EXY",
        "conditions": [],
        "explanation": {
          "zh-Hant": "MKO 指出獨立可推出零協方差（有限值變數的二階矩自動有限）。依引理 L_EXY，由值對乘積式得 E[XY]=E[X]E[Y]。引理在子步 S09.1、S09.2 證明。這是必要後果，不是充分條件（見 S12）。",
          "en": "The MKO notes that independence implies zero covariance (second moments of finite-valued variables are automatically finite). By Lemma L_EXY, the pair product equation gives E[XY]=E[X]E[Y]. The lemma is proved in sub-steps S09.1 and S09.2. This is a necessary consequence, not a sufficient condition (see S12)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S07",
            "L_EXY"
          ],
          "explanation": {
            "zh-Hant": "只宣稱獨立 ⇒ 零協方差；反向由 J₂ 否定。",
            "en": "Only independence ⇒ zero covariance is claimed; the converse is refuted by J₂."
          }
        },
        "leaf_basis": "finite_sum_rules + distributive + expectation_def"
      },
      {
        "id": "S09.1",
        "uses": [
          "expectation_def"
        ],
        "before_tex": "E[XY]=\\sum_{x}\\sum_{y}xy\\,p(x,y)",
        "after_tex": "E[XY]=\\sum_{x}\\sum_{y}\\big(xP(X=x)\\big)\\big(yP(Y=y)\\big)",
        "relation": "implies",
        "rule": "expectation_def",
        "conditions": [
          "p(x,y)=P(X=x)P(Y=y)\\ \\forall x,y"
        ],
        "explanation": {
          "zh-Hant": "依期望定義對所有值對求和，再把每個 p(x,y) 換成 P(X=x)P(Y=y)，並用乘法交換、結合律把每一項重排成 (xP(X=x))(yP(Y=y))。",
          "en": "By the definition of expectation, sum over all value pairs; then replace each p(x,y) by P(X=x)P(Y=y) and rearrange each term as (xP(X=x))(yP(Y=y)) by commutativity and associativity."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "expectation_def",
            "mul_comm",
            "mul_assoc"
          ],
          "explanation": {
            "zh-Hant": "代入需要全部值對的乘積式。",
            "en": "The substitution needs the product equation for all value pairs."
          }
        },
        "leaf_basis": "expectation_def + mul_comm + mul_assoc"
      },
      {
        "id": "S09.2",
        "uses": [
          "S09.1",
          "finite_sum_rules"
        ],
        "before_tex": "\\sum_{x}\\sum_{y}\\big(xP(X=x)\\big)\\big(yP(Y=y)\\big)",
        "after_tex": "\\Big(\\sum_{x}xP(X=x)\\Big)\\Big(\\sum_{y}yP(Y=y)\\Big)=E[X]E[Y]",
        "relation": "equivalent",
        "rule": "finite_sum_rules",
        "conditions": [],
        "explanation": {
          "zh-Hant": "有限雙重和的分配律把它分解成兩個單和的乘積，正是 E[X] 與 E[Y]。所以 Cov=E[XY]−E[X]E[Y]=0。S09.1 與 S09.2 合起來證得引理 L_EXY。",
          "en": "Distributivity of finite double sums factors it into the product of two single sums, which are E[X] and E[Y]. So Cov=E[XY]−E[X]E[Y]=0. S09.1 and S09.2 together prove Lemma L_EXY."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "finite_sum_rules",
            "distributive"
          ],
          "explanation": {
            "zh-Hant": "有限和的分配律是等式，雙向成立。",
            "en": "Distributivity of finite sums is an equation, valid both ways."
          }
        },
        "leaf_basis": "finite_sum_rules + distributive + expectation_def"
      },
      {
        "id": "S10",
        "uses": [
          "S02",
          "S03",
          "S09",
          "G1"
        ],
        "before_tex": "E[X]=\\tfrac23,\\ E[Y]=0\\cdot\\tfrac14+1\\cdot\\tfrac14+2\\cdot\\tfrac12=\\tfrac54",
        "after_tex": "E[XY]=1\\cdot1\\cdot\\tfrac16+1\\cdot2\\cdot\\tfrac13=\\tfrac56=\\tfrac23\\cdot\\tfrac54",
        "relation": "implies",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "直接核對 S09：E[XY] 只有 x=1 且 y≠0 的值對有貢獻，1/6+2/3=5/6；E[X]E[Y]=(2/3)(5/4)=10/12=5/6。兩者相等，Cov=0，與引理一致。",
          "en": "Direct check of S09: only the pairs with x=1 and y≠0 contribute to E[XY], giving 1/6+2/3=5/6; E[X]E[Y]=(2/3)(5/4)=10/12=5/6. They agree, Cov=0, as the lemma predicts."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S09",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "這是對 J₁ 的獨立重算（N8），不是引理的證明。",
            "en": "This is an independent recomputation for J₁ (N8), not a proof of the lemma."
          }
        },
        "leaf_basis": "numeric_evaluation + expectation_def"
      },
      {
        "id": "S11",
        "uses": [
          "G2",
          "expectation_def",
          "prob_axioms"
        ],
        "before_tex": "J_2:\\ P(X=x)=\\tfrac13\\ (x=-1,0,1),\\ P(Y=0)=\\tfrac13,\\ P(Y=1)=\\tfrac23",
        "after_tex": "E[X]=0,\\ E[XY]=(-1)(1)\\tfrac13+0+(1)(1)\\tfrac13=0\\ \\Rightarrow\\ \\operatorname{Cov}(X,Y)=0-0\\cdot\\tfrac23=0",
        "relation": "implies",
        "rule": "expectation_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "J₂ 的邊際：X 在三個值上各 1/3；Y=0 只來自 (0,0)，機率 1/3；Y=1 來自 (−1,1) 與 (1,1)，機率 2/3。E[X]=(−1+0+1)/3=0；E[XY] 中只有兩個非零項 −1/3 與 1/3，相加為 0。所以 Cov(X,Y)=0。",
          "en": "Marginals of J₂: X takes each of its three values with probability 1/3; Y=0 comes only from (0,0), with probability 1/3; Y=1 comes from (−1,1) and (1,1), with probability 2/3. E[X]=(−1+0+1)/3=0; E[XY] has only the two nonzero terms −1/3 and 1/3, which sum to 0. Hence Cov(X,Y)=0."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "expectation_def",
            "prob_axioms",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "精確計算（N9）；零協方差在此只是一個事實，尚未推出任何獨立性結論。",
            "en": "Exact computation (N9); zero covariance is just a fact here and implies nothing yet about independence."
          }
        },
        "leaf_basis": "expectation_def + prob_axioms + numeric_evaluation"
      },
      {
        "id": "S12",
        "uses": [
          "S11",
          "G2",
          "mko_rv_indep_def"
        ],
        "before_tex": "p(0,1)=0,\\ P(X=0)P(Y=1)=\\tfrac13\\cdot\\tfrac23=\\tfrac29",
        "after_tex": "0\\neq\\tfrac29\\ \\Rightarrow\\ X,Y\\ \\text{not independent, although}\\ \\operatorname{Cov}=0",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "值對 (0,1) 不可能出現（X=0 時 Y=0），質量 0，但乘積 2/9≠0。乘積式在一個值對失敗，所以 X 與 Y 不獨立，雖然 S11 給出 Cov=0。這說明零協方差不能反推獨立：MKO 指出的誤解。",
          "en": "The pair (0,1) cannot occur (X=0 forces Y=0), so its mass is 0, but the product is 2/9≠0. The product equation fails at one value pair, so X and Y are not independent, although S11 gives Cov=0. Zero covariance therefore cannot certify independence, the misconception the MKO names."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_rv_indep_def",
            "quantifier_negation",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "否定全稱只需一個失敗的值對（N10）；質量 0 的值對也必須核對。",
            "en": "Refuting the universal statement needs one failing value pair (N10); pairs of mass 0 must be checked too."
          }
        },
        "leaf_basis": "quantifier_negation + mko_rv_indep_def + numeric_evaluation"
      },
      {
        "id": "S13",
        "uses": [
          "G3",
          "prob_axioms",
          "mko_rv_indep_def"
        ],
        "before_tex": "J_3:\\ P(X=0)=\\tfrac12,\\ P(Y=0)=\\tfrac12,\\ P(Y=1)=\\tfrac14",
        "after_tex": "p(0,0)=\\tfrac14=\\tfrac12\\cdot\\tfrac12\\ \\text{but}\\ p(0,1)=\\tfrac14\\neq\\tfrac18=\\tfrac12\\cdot\\tfrac14",
        "relation": "implies",
        "rule": "quantifier_negation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "J₃ 的邊際：P(X=0)=1/4+1/4+0=1/2，P(X=1)=1/2；P(Y=0)=1/2，P(Y=1)=1/4，P(Y=2)=1/4。值對 (0,0) 通過乘積式，若只核這一對會誤判獨立；但 (0,1) 失敗：1/4≠1/8。所以 J₃ 下 X、Y 不獨立，必須核完所有值對。",
          "en": "Marginals of J₃: P(X=0)=1/4+1/4+0=1/2 and P(X=1)=1/2; P(Y=0)=1/2, P(Y=1)=1/4, P(Y=2)=1/4. The pair (0,0) passes the product equation, so checking only it would wrongly suggest independence; but (0,1) fails: 1/4≠1/8. So under J₃, X and Y are not independent, and every value pair must be checked."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "quantifier_negation",
            "prob_axioms",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "一個值對通過不推出全稱（N11），一個值對失敗就否定全稱（N12）。",
            "en": "One passing pair does not give the universal statement (N11), while one failing pair refutes it (N12)."
          }
        },
        "leaf_basis": "quantifier_negation + prob_axioms + numeric_evaluation"
      },
      {
        "id": "S14",
        "uses": [
          "S07",
          "S08",
          "S09",
          "S10",
          "S12",
          "S13"
        ],
        "before_tex": "\\text{S07},\\ \\text{S08},\\ \\text{S09},\\ \\text{S12},\\ \\text{S13}",
        "after_tex": "J_1:\\ X\\perp Y;\\ J_2:\\ \\operatorname{Cov}=0,\\ X\\not\\perp Y;\\ J_3:\\ X\\not\\perp Y",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "合併：J₁ 的 6 個值對全部通過，X、Y 獨立，並推出矩形事件獨立與零協方差；J₂ 零協方差但不獨立；J₃ 一個值對通過但不獨立。",
          "en": "Combine: all 6 value pairs of J₁ pass, so X and Y are independent, which implies independence of rectangle events and zero covariance; J₂ has zero covariance but is not independent; J₃ passes one value pair but is not independent."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S07",
            "S08",
            "S09",
            "S12",
            "S13",
            "and_intro_elim"
          ],
          "explanation": {
            "zh-Hant": "目標是三個任務的合取；各部分由所列步驟正向證得，H⇒G 由合取引入。",
            "en": "The goal is the conjunction of the three tasks; each part is proved forwards by the listed steps, and H⇒G by conjunction introduction."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "J₁ 的邊際為 P(X=0)=1/3、P(X=1)=2/3、P(Y=0)=1/4、P(Y=1)=1/4、P(Y=2)=1/2，全部 6 個值對都滿足 p(x,y)=P(X=x)P(Y=y)，所以 X 與 Y 獨立；因此任意座標事件 {X∈S} 與 {Y∈T} 也獨立（例：1/2=(2/3)(3/4)），且 E[XY]=5/6=E[X]E[Y]。J₂（Y=X²）中 Cov(X,Y)=0，但 p(0,1)=0≠2/9，所以不獨立。J₃ 中 (0,0) 通過而 (0,1) 失敗，不獨立。",
      "en": "J₁ has marginals P(X=0)=1/3, P(X=1)=2/3, P(Y=0)=1/4, P(Y=1)=1/4, P(Y=2)=1/2, and all 6 value pairs satisfy p(x,y)=P(X=x)P(Y=y), so X and Y are independent; hence any coordinate events {X∈S} and {Y∈T} are independent too (for example 1/2=(2/3)(3/4)), and E[XY]=5/6=E[X]E[Y]. In J₂ (Y=X²), Cov(X,Y)=0 but p(0,1)=0≠2/9, so they are not independent. In J₃, (0,0) passes but (0,1) fails, so they are not independent."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "J₂ 中 Cov(X,Y)=0，所以 X 與 Y 獨立",
          "en": "In J₂, Cov(X,Y)=0, so X and Y are independent"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "p(0,1)=0，但 P(X=0)P(Y=1)=2/9。",
          "en": "p(0,1)=0 but P(X=0)P(Y=1)=2/9."
        }
      },
      {
        "claim": {
          "zh-Hant": "J₃ 中 P(X=0,Y=0)=P(X=0)P(Y=0)，所以 X 與 Y 獨立",
          "en": "In J₃, P(X=0,Y=0)=P(X=0)P(Y=0), so X and Y are independent"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "(0,1) 失敗：1/4≠(1/2)(1/4)=1/8。",
          "en": "(0,1) fails: 1/4≠(1/2)(1/4)=1/8."
        }
      },
      {
        "claim": {
          "zh-Hant": "J₃ 與某個獨立表有相同的邊際，所以 J₃ 下 X、Y 獨立",
          "en": "J₃ has the same marginals as an independent table, so X, Y are independent under J₃"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "邊際不決定聯合表；J₃ 的 p(0,1)=1/4，獨立表的是 1/8。",
          "en": "Marginals do not determine the joint table; J₃ has p(0,1)=1/4 while the independent table has 1/8."
        }
      },
      {
        "claim": {
          "zh-Hant": "X、Y 為獨立的公平 0/1 變數，Z=(X+Y) mod 2；X、Y、Z 兩兩獨立，所以三者相互獨立",
          "en": "X, Y are independent fair 0/1 variables and Z=(X+Y) mod 2; X, Y, Z are pairwise independent, so the three are mutually independent"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "P(X=0,Y=0,Z=1)=0，但 (1/2)³=1/8；兩兩獨立不推出相互獨立。",
          "en": "P(X=0,Y=0,Z=1)=0 but (1/2)³=1/8; pairwise independence does not give mutual independence."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "prob_axioms",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "機率公理：P(A)≥0；P(Ω)=1；兩兩互斥事件的（可數）聯集機率等於各機率之和。由此 P(∅)=0、P(Aᶜ)=1−P(A)。",
          "en": "Probability axioms: P(A)≥0; P(Ω)=1; the probability of a (countable) union of pairwise disjoint events is the sum of their probabilities. Hence P(∅)=0 and P(Aᶜ)=1−P(A)."
        }
      },
      {
        "id": "frac_rules",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分數運算（分母皆非零）：a/c+b/c=(a+b)/c；(a/b)(c/d)=(ac)/(bd)；(a/b)/(c/d)=(ad)/(bc)（另需 c≠0）；a/b=(ak)/(bk)（k≠0）。",
          "en": "Fraction rules (all denominators nonzero): a/c+b/c=(a+b)/c; (a/b)(c/d)=(ac)/(bd); (a/b)/(c/d)=(ad)/(bc) (also needing c≠0); a/b=(ak)/(bk) for k≠0."
        }
      },
      {
        "id": "distributive",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分配律：u(v+w)=uv+uw；配合乘法交換律也有 (v+w)u=vu+wu。",
          "en": "Distributivity: u(v+w)=uv+uw; with commutativity also (v+w)u=vu+wu."
        }
      },
      {
        "id": "finite_sum_rules",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "有限和：Σ_{i=1}^{0} a_i=0、Σ_{i=1}^{n+1} a_i=Σ_{i=1}^{n} a_i + a_{n+1}；Σ(a_i+b_i)=Σa_i+Σb_i；Σ c·a_i=c·Σa_i。",
          "en": "Finite sums: Σ_{i=1}^{0} a_i=0 and Σ_{i=1}^{n+1} a_i=Σ_{i=1}^{n} a_i + a_{n+1}; Σ(a_i+b_i)=Σa_i+Σb_i; Σ c·a_i=c·Σa_i."
        }
      },
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "case_analysis",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "分情況論證：若 P∨Q 成立，且 P⇒R、Q⇒R 都已證，則 R 成立。所有情況必須涵蓋全部可能。",
          "en": "Proof by cases: if P∨Q holds and both P⇒R and Q⇒R are proved, then R holds. The cases must cover every possibility."
        }
      },
      {
        "id": "mul_comm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法交換律：uv=vu（在交換的數系中，例如 ℤ、ℚ、ℝ、ℂ）。",
          "en": "Commutativity of multiplication: uv=vu (in commutative number systems such as ℤ, ℚ, ℝ, ℂ)."
        }
      },
      {
        "id": "mul_assoc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "乘法結合律：(uv)w=u(vw)。",
          "en": "Associativity of multiplication: (uv)w=u(vw)."
        }
      },
      {
        "id": "quantifier_negation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "量詞否定：¬(∀x, P(x)) 等價於 ∃x, ¬P(x)；¬(∃x, P(x)) 等價於 ∀x, ¬P(x)。",
          "en": "Negating quantifiers: ¬(∀x, P(x)) is equivalent to ∃x, ¬P(x), and ¬(∃x, P(x)) is equivalent to ∀x, ¬P(x)."
        }
      },
      {
        "id": "and_intro_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合取：由 P 與 Q 得 P∧Q；由 P∧Q 可分別得 P 與 Q。",
          "en": "Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q."
        }
      },
      {
        "id": "mko_rv_indep_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-random-variable-independence",
          "sha256": "e8f6e97a13cd93c4cf37384ba6ab187d3ad4ca22c8f56260ed3707df0b8cc94e",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "有限值隨機變數 X,Y 獨立，若對每個值對 (x,y) 皆有 P(X=x,Y=y)=P(X=x)P(Y=y)。等價地，所有值事件逆像獨立。本輪完整核有限 joint table；零協方差只作必要後果而非反向證書。",
          "en": "Finite-valued X,Y are independent if every pair (x,y) satisfies P(X=x,Y=y)=P(X=x)P(Y=y). Equivalently, all inverse images of value events are independent. This slice checks the complete finite joint table; zero covariance is only a consequence, never a converse certificate."
        }
      },
      {
        "id": "mko_joint_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-finite-joint-distribution",
          "sha256": "d04aa2266aeda810e9e7e400220d366a61da23cdc33192e7286eac1d0fed0340",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "二維有限聯合分布列出互異值對 (x,y) 及非負精確質量，總和恰為 1。邊際、矩形事件及單點質量都從同一 joint law 聚合。",
          "en": "A two-dimensional finite joint distribution lists distinct pairs (x,y) and nonnegative exact masses summing exactly to 1. Marginals, rectangle events and single-pair masses all aggregate from that same joint law."
        }
      },
      {
        "id": "expectation_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "對有限聯合表，E[g(X,Y)]=Σ_{(x,y)} g(x,y)p(x,y)；特別地 E[X]=Σ_x x P(X=x)，Cov(X,Y)=E[XY]−E[X]E[Y]。",
          "en": "For a finite joint table, E[g(X,Y)]=Σ_{(x,y)} g(x,y)p(x,y); in particular E[X]=Σ_x x P(X=x) and Cov(X,Y)=E[XY]−E[X]E[Y]."
        }
      },
      {
        "id": "L_rect",
        "kind": "lemma",
        "proved_in": [
          "S08.1",
          "S08.2"
        ],
        "statement": {
          "zh-Hant": "若對所有值對 p(x,y)=P(X=x)P(Y=y)，則對值集合的任意子集 S、T：P(X∈S, Y∈T)=P(X∈S)P(Y∈T)。",
          "en": "If p(x,y)=P(X=x)P(Y=y) for all value pairs, then for any subsets S, T of the value sets: P(X∈S, Y∈T)=P(X∈S)P(Y∈T)."
        }
      },
      {
        "id": "L_EXY",
        "kind": "lemma",
        "proved_in": [
          "S09.1",
          "S09.2"
        ],
        "statement": {
          "zh-Hant": "若對所有值對 p(x,y)=P(X=x)P(Y=y)，則 E[XY]=E[X]E[Y]，所以 Cov(X,Y)=0。",
          "en": "If p(x,y)=P(X=x)P(Y=y) for all value pairs, then E[XY]=E[X]E[Y], so Cov(X,Y)=0."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S01",
        "lhs": "1/12+1/12+1/6+1/6+1/6+1/3",
        "rhs": "1"
      },
      {
        "id": "N2",
        "step": "S02",
        "lhs": "1/12+1/12+1/6",
        "rhs": "1/3"
      },
      {
        "id": "N3",
        "step": "S03",
        "lhs": "1/6+1/3",
        "rhs": "1/2"
      },
      {
        "id": "N4",
        "step": "S05",
        "lhs": "(1/3)*(1/2)",
        "rhs": "1/6"
      },
      {
        "id": "N5",
        "step": "S06",
        "lhs": "(2/3)*(1/4)",
        "rhs": "1/6"
      },
      {
        "id": "N6",
        "step": "S06",
        "lhs": "(2/3)*(1/2)",
        "rhs": "1/3"
      },
      {
        "id": "N7",
        "step": "S08",
        "lhs": "1/6+1/3",
        "rhs": "(2/3)*(1/4+1/2)"
      },
      {
        "id": "N8",
        "step": "S10",
        "lhs": "1*1*(1/6)+1*2*(1/3)",
        "rhs": "(2/3)*(0*(1/4)+1*(1/4)+2*(1/2))"
      },
      {
        "id": "N9",
        "step": "S11",
        "lhs": "(-1)*1*(1/3)+0*0*(1/3)+1*1*(1/3)",
        "rhs": "0"
      },
      {
        "id": "N10",
        "step": "S12",
        "lhs": "0",
        "relation": "!=",
        "rhs": "(1/3)*(2/3)"
      },
      {
        "id": "N11",
        "step": "S13",
        "lhs": "1/4",
        "rhs": "(1/2)*(1/2)"
      },
      {
        "id": "N12",
        "step": "S13",
        "lhs": "1/4",
        "relation": "!=",
        "rhs": "(1/2)*(1/4)"
      },
      {
        "id": "N13",
        "step": "S05",
        "lhs": "(1/3)*(1/4)",
        "rhs": "1/12"
      },
      {
        "id": "N14",
        "lhs": "0",
        "relation": "!=",
        "rhs": "(1/2)**3"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "在 MKO 的範圍內工作：完整的有限聯合支撐與精確有理質量屬於同一機率模型（假設 a1）；主要處理兩個變數，三個以上變數只在負向控制中說明兩兩獨立不推出相互獨立（假設 a2）。零協方差只作必要後果，不作反向證書。不處理連續分布或獨立同分布序列（下一節點），不改動 canonical MKO 或英文 edition。",
      "en": "Works inside the MKO's scope: the complete finite joint support and exact rational masses belong to one probability model (assumption a1); mainly two variables are handled, and three or more variables appear only in a negative control showing that pairwise independence does not give mutual independence (assumption a2). Zero covariance serves only as a necessary consequence, never as a converse certificate. Continuous distributions and IID sequences (the next node) are not treated, and the canonical MKO and its English edition are not changed."
    },
    "md_symbols": [
      [
        "p(x,y)=P(X=x,Y=y)",
        "聯合質量",
        "the joint mass"
      ],
      [
        "P(X=x),\\ P(Y=y)",
        "由聯合表聚合的邊際",
        "the marginals aggregated from the joint table"
      ],
      [
        "J_1,J_2,J_3",
        "三個聯合表",
        "the three joint tables"
      ],
      [
        "E[\\cdot]",
        "期望，對聯合表加權求和",
        "expectation, a weighted sum over the joint table"
      ],
      [
        "\\operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y]",
        "協方差",
        "the covariance"
      ],
      [
        "S,T",
        "X 與 Y 的值集合子集（矩形事件）",
        "subsets of the value sets of X and Y (rectangle events)"
      ]
    ],
    "md_error_controls": [
      {
        "title": "零協方差不是獨立證書 / Zero covariance is not a certificate of independence",
        "zh": "MKO 指出的誤解是由零協方差直接宣稱獨立。S09 證明獨立 ⇒ Cov=0，但 J₂ 中 Y 完全由 X 決定（Y=X²），Cov 卻為 0。零協方差只排除「線性」關聯，不排除其他依賴。",
        "en": "The MKO's misconception is to declare independence from zero covariance. S09 proves independence ⇒ Cov=0, but in J₂, Y is completely determined by X (Y=X²) and still Cov=0. Zero covariance rules out only 'linear' association, not other dependence."
      },
      {
        "title": "只核一個值對不夠 / Checking one value pair is not enough",
        "zh": "J₃ 中值對 (0,0) 滿足 1/4=(1/2)(1/2)，但 (0,1) 不滿足。獨立量化所有值對，包括質量為 0 的值對（J₂ 的 (0,1) 正是質量 0 的值對失敗）。",
        "en": "In J₃ the pair (0,0) satisfies 1/4=(1/2)(1/2) but (0,1) does not. Independence quantifies over every value pair, including pairs of mass 0 (in J₂ it is exactly the zero-mass pair (0,1) that fails)."
      },
      {
        "title": "只看邊際不夠 / Marginals alone are not enough",
        "zh": "J₃ 的邊際是 X：(1/2,1/2)、Y：(1/2,1/4,1/4)。具有相同邊際的獨立表是 (1/4,1/8,1/8; 1/4,1/8,1/8)，與 J₃ 不同。邊際不決定聯合分布，所以必須由聯合表逐對比較。",
        "en": "J₃ has marginals X: (1/2,1/2) and Y: (1/2,1/4,1/4). The independent table with the same marginals is (1/4,1/8,1/8; 1/4,1/8,1/8), which differs from J₃. Marginals do not determine the joint law, so the joint table must be compared pair by pair."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "第四個負向控制中「X、Y、Z 兩兩獨立」只作說明，未在本稿逐對核對。",
        "en": "The pairwise independence of X, Y, Z in the fourth negative control is stated for illustration and not checked pair by pair in this guide."
      },
      {
        "zh-Hant": "L_EXY 只用於有限值變數；無限值或連續變數需要可積性條件，不在本稿範圍內。",
        "en": "L_EXY is used only for finite-valued variables; infinite-valued or continuous variables need integrability conditions and are outside this guide's scope."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "7bf7621a002b7bd6ae4231f260d2c52de04b8a76aece92b976ea6093d4b8e054",
    "original_source_sha256": "7bf7621a002b7bd6ae4231f260d2c52de04b8a76aece92b976ea6093d4b8e054",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
