# 第 31638 題：仿射變換的有限期望

[返回所在分頁 159](https://ocme.evemisslab.com/zh-Hant/questions/page/159/)

[← 逐題詳解目錄](https://ocme.evemisslab.com/zh-Hant/questions/) · [原題批次](https://ocme.evemisslab.com/zh-Hant/practice/batch-20261004-advance-20261005-r06-expectation-foundations/#q-20261004-advance-20261005-r06-expectation-0038)

本頁是已完成第二對話 AI 數理與中英語義覆核的教學詳解，只支持本題明示的模型與前提。沒有人工審查或新 Lean 證明，也不提升原題或 MKO 的 Canonical 真值狀態。

R0062-31638 · q-20261004-advance-20261005-r06-expectation-0038



## 原題與已知條件

非空有限 S={0, 1, 2, 3}、事件族 F=𝒫(S)，總函數 X:S→R 的值表為 {(0, 2), (1, 2), (2, 16), (3, 1011)}，各結果依列序 [0, 1, 2, 3] 的非負機率權重為 [1/18, 14/18, 3/18, 0/18]，權重總和恰為一。令 Z=1X+(7)，求精確 E[Z]。


- G001 — 非空有限 S={0, 1, 2, 3}、事件族 F=𝒫(S)，總函數 X:S→R 的值表為 {(0, 2), (1, 2), (2, 16), (3, 1011)}，各結果依列序 [0, 1, 2, 3] 的非負機率權重為 [1/18, 14/18, 3/18, 0/18]，權重總和恰為一。令 Z=1X+(7)，求精確 E[Z]。





## 定義與適用範圍

沿用原題明示的論域、假設與來源 MKO 定義。本題已完成第二對話數理與中英語義覆核，並由原始參數逐題獨立重算模型、答案與每個算術步驟；原題仍為 candidate。


- [mko-expectation](https://ocme.evemisslab.com/zh-Hant/mko/mko-expectation/)





## 逐步推導

S001 · implies操作前

source roles = [qf-expectation-affine, no-domain-field, affine_expectation, no-form-field]

操作後

derived = [[reduced_fraction_RETAIN1_STRING]]

條件：無

按原bank核欄位：BASE方程用form及論域，BASE事件／補集無operation，階乘無domain；ext18用local-hyphen，其他legacy用underscore。輸出型別不統一成tuple或fraction。

步驟識別與依賴規則：R62_EXACT_source_keys_domain_operation_form_AND_output_types · 依賴：G001





S002 · calculation操作前

Expectation ORIGINAL weight total through slot0 := sum(0, 1)

操作後

Expectation ORIGINAL weight total through slot0 = 1

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S001





S003 · calculation操作前

Expectation ORIGINAL weight total through slot1 := sum(1, 14)

操作後

Expectation ORIGINAL weight total through slot1 = 15

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S002





S004 · calculation操作前

Expectation ORIGINAL weight total through slot2 := sum(15, 3)

操作後

Expectation ORIGINAL weight total through slot2 = 18

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S003





S005 · calculation操作前

Expectation ORIGINAL weight total through slot3 := sum(18, 0)

操作後

Expectation ORIGINAL weight total through slot3 = 18

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S004





S006 · implies操作前

source roles = [[0, 1, 2, 3], powerset(S), [1, 14, 3, 0], 18, [2, 2, 16, 1011], not-supplied]

操作後

derived = [[0, 1, 2, 3], 18, 是]

條件：無

S非空、distinct且≤100，權重與X／Y依原S位置對齊。F必為powerset(S)，權重非負、den正、總和恰den；即使a0或零權重，也先驗全部raw欄位，不默改成uniform模型。

步驟識別與依賴規則：Expectation_FULL_model_RAW_slots_SAME_alignment_and_normalized_law · 依賴：G001, S005





S007 · calculation操作前

Expectation affine ORIGINAL slot0 a times X := mul(1, 2)

操作後

Expectation affine ORIGINAL slot0 a times X = 2

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S006





S008 · calculation操作前

Expectation affine ORIGINAL slot0 plus b := sum(2, 7)

操作後

Expectation affine ORIGINAL slot0 plus b = 9

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S007





S009 · implies操作前

source roles = [0, 0, affine_expectation, 2, not-supplied, 1, 7, not-supplied]

操作後

derived = [9]

條件：無

每個原outcome先作本題變換，再用同位置權重；不能各自排序S／X／Y／weights。零權重的取值仍是原資料，不以刪除它們修題或推導range。

步驟識別與依賴規則：Expectation_EACH_original_outcome_transformation_BEFORE_weight · 依賴：G001, S008





S010 · calculation操作前

Expectation ORIGINAL slot0 weight times transformed value := mul(1, 9)

操作後

Expectation ORIGINAL slot0 weight times transformed value = 9

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S009





S011 · calculation操作前

Expectation ORIGINAL weighted numerator through slot0 := sum(0, 9)

操作後

Expectation ORIGINAL weighted numerator through slot0 = 9

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S010





S012 · calculation操作前

Expectation affine ORIGINAL slot1 a times X := mul(1, 2)

操作後

Expectation affine ORIGINAL slot1 a times X = 2

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S011





S013 · calculation操作前

Expectation affine ORIGINAL slot1 plus b := sum(2, 7)

操作後

Expectation affine ORIGINAL slot1 plus b = 9

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S012





S014 · implies操作前

source roles = [1, 1, affine_expectation, 2, not-supplied, 1, 7, not-supplied]

操作後

derived = [9]

條件：無

每個原outcome先作本題變換，再用同位置權重；不能各自排序S／X／Y／weights。零權重的取值仍是原資料，不以刪除它們修題或推導range。

步驟識別與依賴規則：Expectation_EACH_original_outcome_transformation_BEFORE_weight · 依賴：G001, S013





S015 · calculation操作前

Expectation ORIGINAL slot1 weight times transformed value := mul(14, 9)

操作後

Expectation ORIGINAL slot1 weight times transformed value = 126

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S014





S016 · calculation操作前

Expectation ORIGINAL weighted numerator through slot1 := sum(9, 126)

操作後

Expectation ORIGINAL weighted numerator through slot1 = 135

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S015





S017 · calculation操作前

Expectation affine ORIGINAL slot2 a times X := mul(1, 16)

操作後

Expectation affine ORIGINAL slot2 a times X = 16

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S016





S018 · calculation操作前

Expectation affine ORIGINAL slot2 plus b := sum(16, 7)

操作後

Expectation affine ORIGINAL slot2 plus b = 23

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S017





S019 · implies操作前

source roles = [2, 2, affine_expectation, 16, not-supplied, 1, 7, not-supplied]

操作後

derived = [23]

條件：無

每個原outcome先作本題變換，再用同位置權重；不能各自排序S／X／Y／weights。零權重的取值仍是原資料，不以刪除它們修題或推導range。

步驟識別與依賴規則：Expectation_EACH_original_outcome_transformation_BEFORE_weight · 依賴：G001, S018





S020 · calculation操作前

Expectation ORIGINAL slot2 weight times transformed value := mul(3, 23)

操作後

Expectation ORIGINAL slot2 weight times transformed value = 69

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S019





S021 · calculation操作前

Expectation ORIGINAL weighted numerator through slot2 := sum(135, 69)

操作後

Expectation ORIGINAL weighted numerator through slot2 = 204

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S020





S022 · calculation操作前

Expectation affine ORIGINAL slot3 a times X := mul(1, 1011)

操作後

Expectation affine ORIGINAL slot3 a times X = 1011

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S021





S023 · calculation操作前

Expectation affine ORIGINAL slot3 plus b := sum(1011, 7)

操作後

Expectation affine ORIGINAL slot3 plus b = 1018

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S022





S024 · implies操作前

source roles = [3, 3, affine_expectation, 1011, not-supplied, 1, 7, not-supplied]

操作後

derived = [1018]

條件：無

每個原outcome先作本題變換，再用同位置權重；不能各自排序S／X／Y／weights。零權重的取值仍是原資料，不以刪除它們修題或推導range。

步驟識別與依賴規則：Expectation_EACH_original_outcome_transformation_BEFORE_weight · 依賴：G001, S023





S025 · calculation操作前

Expectation ORIGINAL slot3 weight times transformed value := mul(0, 1018)

操作後

Expectation ORIGINAL slot3 weight times transformed value = 0

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S024





S026 · calculation操作前

Expectation ORIGINAL weighted numerator through slot3 := sum(204, 0)

操作後

Expectation ORIGINAL weighted numerator through slot3 = 204

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S025





S027 · calculation操作前

Expectation ORIGINAL weighted numerator over denominator := div(204, 18)

操作後

Expectation ORIGINAL weighted numerator over denominator = 34/3

條件：無

使用原操作數與明示次序作精確整數／有理計算，不用浮點近似。輸入界依題族：不把衍生值重驗成raw輸入，也不給BASE題庫另加SAFE或n64界。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S026





S028 · implies操作前

source roles = [[0, 1, 2, 3], [1, 14, 3, 0], 18, affine_expectation, [9, 9, 23, 1018]]

操作後

derived = [[9, 126, 69, 0], 204, 34/3]

條件：無

依已合格同一概率law，E[Z]=Σw_i Z(s_i)/q。仿射為aE[X]+b、同模型相加為E[X]+E[Y]而不要求獨立，不能推成乘積期望公式。常數c的期望是c因權重總和1；負值或未被取到的期望合法，fraction保/1。

步驟識別與依賴規則：Expectation_LINEARITY_qualified_SAME_law_NOT_independence_or_sample_mean · 依賴：G001, S027









## 逐步反向核對


- S028 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S027 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weighted numerator over denominator，不以小數近似替代。
- S026 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weighted numerator through slot3，不以小數近似替代。
- S025 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL slot3 weight times transformed value，不以小數近似替代。
- S024 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S023 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot3 plus b，不以小數近似替代。
- S022 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot3 a times X，不以小數近似替代。
- S021 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weighted numerator through slot2，不以小數近似替代。
- S020 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL slot2 weight times transformed value，不以小數近似替代。
- S019 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S018 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot2 plus b，不以小數近似替代。
- S017 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot2 a times X，不以小數近似替代。
- S016 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weighted numerator through slot1，不以小數近似替代。
- S015 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL slot1 weight times transformed value，不以小數近似替代。
- S014 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S013 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot1 plus b，不以小數近似替代。
- S012 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot1 a times X，不以小數近似替代。
- S011 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weighted numerator through slot0，不以小數近似替代。
- S010 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL slot0 weight times transformed value，不以小數近似替代。
- S009 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S008 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot0 plus b，不以小數近似替代。
- S007 · premise_and_result_audit — 以精確有理數重算 Expectation affine ORIGINAL slot0 a times X，不以小數近似替代。
- S006 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。
- S005 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weight total through slot3，不以小數近似替代。
- S004 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weight total through slot2，不以小數近似替代。
- S003 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weight total through slot1，不以小數近似替代。
- S002 · premise_and_result_audit — 以精確有理數重算 Expectation ORIGINAL weight total through slot0，不以小數近似替代。
- S001 · premise_and_result_audit — 反向代回原輸入、欄位角色、論域及本步條件；一致性不表示結論能唯一恢復前提。有限核對、獨立審查、形式證明與發布分開標記。





## 結論

34/3

依上列完整代值及條件核對得到原題答案；原題編號、格式與狀態保持不變。





## 本題覆核與來源綁定

覆核日期：2026-10-26

原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣；原來的候選狀態屬於來源歷史，不覆寫為形式化證明。

來源雜湊與覆核憑證
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: 07386bf079e19ae361f8d7f0cfbc661673c9e3d9535b81098cbd65a028269930
- candidate record SHA-256: a3801e15d804ac5c37d08c76130cc9c0d2f4872a8a101bab0833462308f2c626
- semantic review receipt SHA-256: 963099ffc9f754069fdce6792949a85ed350472465eaceb3038fa8011cf672bd
- question-first witness SHA-256: d7655324c5d11528e1af90b757384cebd3313e19dc5f6f5b9b8ea7624fb06f6f
- Lean: NOT_RUN · human review: NOT_PERFORMED

[同源完整 JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261004-advance-20261005-r06-expectation-0038.json)




