# 全變異數公式

同一有限law與完整partition生成的G下，總變異數等於cell內變異數期望加cell均值變異數。

mko-law-of-total-variance · theorem · v0.10.0



## 數學敘述

Var(X)=E[Var(X|G)]+Var(E[X|G])。partition cells兩兩不交、非空且union為全部outcomes；zero-mass cell仍是含零質量outcomes的非空事件。同一cell conditional mean與variance使用同一law；positive-mass cell才可除法。zero-mass cell條件值只a.s.決定，外層加權貢獻為0。within與between不可交換或漏項，不要求partition events independent。





## 代表公式（精確 TeX）

V(X)=E(V(X\mid G))+V(E(X\mid G))





## 成立條件


- 完整正規化有限law、exact values與由非空cells組成的完整disjoint partition。
- G由該partition生成；zero-mass cells不做conditional division。





## 符號作用域


- V — 變異數算子
- X — 有限隨機變數
- E — 期望算子
- G — partition生成的sigma-algebra





## 直觀、定義與常見誤解

partition cells非空；zero-mass指cell含有outcomes但其總機率為0。

within term平均cell variances。

between term計算cell means的variance，且zero-mass cell不影響兩個outer terms。

以empty cell冒充zero-mass event、漏掉between term、交換兩項語義或除以0。





## 已採用的推導導讀

[within與between的精確分解](https://ocme.evemisslab.com/zh-Hant/derivations/derivation-mko-law-of-total-variance-01/)原始 MKO 保留；導讀有自己的追加式修訂與驗證界線，不代表新 Lean 證明。





## 前置知識


- [全期望公式](https://ocme.evemisslab.com/zh-Hant/mko/mko-law-of-total-expectation/) — tower identity。
- [有限機率模型的變異數](https://ocme.evemisslab.com/zh-Hant/mko/mko-variance/) — global/cell variance。
- [有限條件期望](https://ocme.evemisslab.com/zh-Hant/mko/mko-conditional-expectation/) — cell means。





## 驗證界線

本輪限完整有限law；一般conditional variance需measure-theoretic證明。

not_formalized

這不表示內容錯誤；只表示尚未登錄可重播的計算或形式證據。





## 下一個義務

加入bias-variance decomposition。





## 同源結構化資料

本頁與互動版共用同一個物件與既有語言 edition；未新增證明或人工審定。

[原始 MKO JSON](https://ocme.evemisslab.com/data/mko/law-of-total-variance.json) · [純文字 Markdown](https://ocme.evemisslab.com/zh-Hant/mko/mko-law-of-total-variance/index.md)


