# Question 4142: Expectation Difference on a Shared Model

[Return to catalogue page 21](https://ocme.evemisslab.com/en/questions/page/21/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261008-advance-20261010-r05-expectation-foundations/#q-20261008-advance-20261010-r05-expectation-0042)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0007-04142 · q-20261008-advance-20261010-r05-expectation-0042



## Original question and givens

S={0,…,2}, F=P(S), masses=[17, 2, 1], D=20, and w_i=mass_i/D. Masses are nonnegative and sum exactly to D; uniform weights are not assumed. X=[-16, 2, 17] in index order and Y=[1, -1, -16] on the same S and weights, with no independence premise. Find E[X]−E[Y], equivalently E[X−Y]. Use exact reduced fractions with positive denominators, retaining /1 for integers.


- G001 — S={0,…,2}, F=P(S), masses=[17, 2, 1], D=20, and w_i=mass_i/D. Masses are nonnegative and sum exactly to D; uniform weights are not assumed. X=[-16, 2, 17] in index order and Y=[1, -1, -16] on the same S and weights, with no independence premise. Find E[X]−E[Y], equivalently E[X−Y]. Use exact reduced fractions with positive denominators, retaining /1 for integers.





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


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





## Step-by-step derivation

S001 · calculationBefore

total mass numerator := sum(17, 2, 1)

After

total mass numerator = 20

Conditions: none

Nonnegative integer masses must sum to D for normalized weights.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001





S002 · impliesBefore

indexed masses=[17, 2, 1];D=20

After

probabilities=[17/20, 1/10, 1/20]

Conditions: none

Outcome indices start at0 and align masses with X and Y values.Retain zero-mass outcomes;negative random-variable values are allowed.

Step identifiers and dependenciesRule: indexed_normalized_expectation_model · Uses: G001, S001





S003 · calculationBefore

X weighted numerator0 := mul(17, -16)

After

X weighted numerator0 = -272

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S002





S004 · calculationBefore

X contribution0 := div(-272, 20)

After

X contribution0 = -68/5

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S003





S005 · calculationBefore

X weighted numerator1 := mul(2, 2)

After

X weighted numerator1 = 4

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S004





S006 · calculationBefore

X contribution1 := div(4, 20)

After

X contribution1 = 1/5

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S005





S007 · calculationBefore

X weighted numerator2 := mul(1, 17)

After

X weighted numerator2 = 17

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S006





S008 · calculationBefore

X contribution2 := div(17, 20)

After

X contribution2 = 17/20

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S007





S009 · calculationBefore

X expectation := sum(-68/5, 1/5, 17/20)

After

X expectation = -251/20

Conditions: none

Add every indexed expectation contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S008





S010 · calculationBefore

Y weighted numerator0 := mul(17, 1)

After

Y weighted numerator0 = 17

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S009





S011 · calculationBefore

Y contribution0 := div(17, 20)

After

Y contribution0 = 17/20

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S010





S012 · calculationBefore

Y weighted numerator1 := mul(2, -1)

After

Y weighted numerator1 = -2

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S011





S013 · calculationBefore

Y contribution1 := div(-2, 20)

After

Y contribution1 = -1/10

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S012





S014 · calculationBefore

Y weighted numerator2 := mul(1, -16)

After

Y weighted numerator2 = -16

Conditions: none

Multiply the mass by the value at the same index;deleting zero masses must not shift alignment.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S013





S015 · calculationBefore

Y contribution2 := div(-16, 20)

After

Y contribution2 = -4/5

Conditions: none

Divide by the common positive denominator,retaining the index position of a zero contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S014





S016 · calculationBefore

Y expectation := sum(17/20, -1/10, -4/5)

After

Y expectation = -1/20

Conditions: none

Add every indexed expectation contribution.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S015





S017 · calculationBefore

difference of expectations := sub(-251/20, -1/20)

After

difference of expectations = -25/2

Conditions: none

Subtract the weighted sums in the same model to obtain the expectation of the difference.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S016





S018 · impliesBefore

E[X]=-251/20;E[Y]=-1/20

After

E[X]−E[Y]=E[X−Y]=-25/2

Conditions: none

Distributivity of the finite weighted sum gives linearity;independence is unnecessary.

Step identifiers and dependenciesRule: expectation_linearity_without_independence · Uses: G001, S017









## Reverse checks


- S018 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S017 · premise_and_result_audit — Recompute difference of expectations with exact rational arithmetic, not rounded decimals.
- S016 · premise_and_result_audit — Recompute Y expectation with exact rational arithmetic, not rounded decimals.
- S015 · premise_and_result_audit — Recompute Y contribution2 with exact rational arithmetic, not rounded decimals.
- S014 · premise_and_result_audit — Recompute Y weighted numerator2 with exact rational arithmetic, not rounded decimals.
- S013 · premise_and_result_audit — Recompute Y contribution1 with exact rational arithmetic, not rounded decimals.
- S012 · premise_and_result_audit — Recompute Y weighted numerator1 with exact rational arithmetic, not rounded decimals.
- S011 · premise_and_result_audit — Recompute Y contribution0 with exact rational arithmetic, not rounded decimals.
- S010 · premise_and_result_audit — Recompute Y weighted numerator0 with exact rational arithmetic, not rounded decimals.
- S009 · premise_and_result_audit — Recompute X expectation with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Recompute X contribution2 with exact rational arithmetic, not rounded decimals.
- S007 · premise_and_result_audit — Recompute X weighted numerator2 with exact rational arithmetic, not rounded decimals.
- S006 · premise_and_result_audit — Recompute X contribution1 with exact rational arithmetic, not rounded decimals.
- S005 · premise_and_result_audit — Recompute X weighted numerator1 with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Recompute X contribution0 with exact rational arithmetic, not rounded decimals.
- S003 · premise_and_result_audit — Recompute X weighted numerator0 with exact rational arithmetic, not rounded decimals.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Recompute total mass numerator with exact rational arithmetic, not rounded decimals.





## Result

-25/2

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: fcf0bb5b12152b0ba5beb8379109360c6dc3749740a1c048346a2838647df2c8
- candidate record SHA-256: e24e308c78569aef33c83be801c564888c79be9016edda85f36b7fe76bef2de6
- semantic review receipt SHA-256: faf0582c0184613e6fae207374056133eae600883a29c67d8438113bbe3c485a
- question-first witness SHA-256: 4b283b6ff424b1d22caa36f3552b0fa21b1b66a0a883d7cbe9cedc8dd77b2e42
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261008-advance-20261010-r05-expectation-0042.json)




