Original question and givens
S={0,…,2}, F=P(S), masses=[1, 0, 2], D=3, and w_i=mass_i/D. Masses are nonnegative and sum exactly to D; uniform weights are not assumed. X=[4, 99, 4] in index order and Y=[4, -50, 4] on the same S and weights, with no independence premise. Find Var(X−Y), not Var(X)+Var(Y). Use exact reduced fractions with positive denominators, retaining /1 for integers.
G001 — S={0,…,2}, F=P(S), masses=[1, 0, 2], D=3, and w_i=mass_i/D. Masses are nonnegative and sum exactly to D; uniform weights are not assumed. X=[4, 99, 4] in index order and Y=[4, -50, 4] on the same S and weights, with no independence premise. Find Var(X−Y), not Var(X)+Var(Y). Use exact reduced fractions with positive denominators, retaining /1 for integers.
Step-by-step derivation
S001 · calculation
Before
total mass numerator := sum(1, 0, 2)
After
total mass numerator = 3
Conditions: none
Nonnegative masses must sum to D to give total probability1.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001
S002 · calculation
Before
probability weight0 := div(1, 3)
After
probability weight0 = 1/3
Conditions: none
Divide the indexed mass by the common positive denominator D.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S001
S003 · calculation
Before
probability weight1 := div(0, 3)
After
probability weight1 = 0
Conditions: none
Divide the indexed mass by the common positive denominator D.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S002
S004 · calculation
Before
probability weight2 := div(2, 3)
After
probability weight2 = 2/3
Conditions: none
Divide the indexed mass by the common positive denominator D.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S003
S005 · implies
Before
values=[4, 99, 4];weights=[1/3, 0/1, 2/3]
After
known finite probability law,not a sampled estimate
Conditions: none
This is the complete normalized probability law,so variance uses its probability weights,not an n−1 sample estimate.Retain original indices of zero-mass outcomes.
Step identifiers and dependencies
Rule: probability_variance_scope · Uses: G001, S004
S006 · calculation
Before
pointwise difference0 := sub(4, 4)
After
pointwise difference0 = 0
Conditions: none
First take X_i−Y_i at the shared outcome,without re-pairing two models.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S005
S007 · calculation
Before
pointwise difference1 := sub(99, -50)
After
pointwise difference1 = 149
Conditions: none
First take X_i−Y_i at the shared outcome,without re-pairing two models.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S006
S008 · calculation
Before
pointwise difference2 := sub(4, 4)
After
pointwise difference2 = 0
Conditions: none
First take X_i−Y_i at the shared outcome,without re-pairing two models.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S007
S009 · implies
Before
[0, 149, 0]
After
compute the variance of this shared-model difference
Conditions: none
Without an independence premise,do not replace Var(X−Y) by Var(X)+Var(Y).Form the difference variable first and retain the original weights.
Step identifiers and dependencies
Rule: difference_variance_not_sum · Uses: G001, S008
S010 · calculation
Before
target variable weighted value0 := mul(1/3, 0)
After
target variable weighted value0 = 0
Conditions: none
Multiply aligned probabilities and values,retaining negative values and zero weights exactly.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S009
S011 · calculation
Before
target variable weighted value1 := mul(0, 149)
After
target variable weighted value1 = 0
Conditions: none
Multiply aligned probabilities and values,retaining negative values and zero weights exactly.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S010
S012 · calculation
Before
target variable weighted value2 := mul(2/3, 0)
After
target variable weighted value2 = 0
Conditions: none
Multiply aligned probabilities and values,retaining negative values and zero weights exactly.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S011
S013 · calculation
Before
target variable mean := sum(0, 0, 0)
After
target variable mean = 0
Conditions: none
Add every weighted term to obtain the exact mean.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S012
S014 · calculation
Before
centered difference0 := sub(0, 0)
After
centered difference0 = 0
Conditions: none
Subtract this variable's own exact mean.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S013
S015 · calculation
Before
centered square0 := square(0)
After
centered square0 = 0
Conditions: none
The squared deviation is nonnegative;do not use a signed deviation itself as a variance term.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S014
S016 · calculation
Before
centered contribution0 := mul(1/3, 0)
After
centered contribution0 = 0
Conditions: none
Multiply by the aligned probability;a zero weight contributes0 even for a large deviation.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S015
S017 · calculation
Before
centered difference1 := sub(149, 0)
After
centered difference1 = 149
Conditions: none
Subtract this variable's own exact mean.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S016
S018 · calculation
Before
centered square1 := square(149)
After
centered square1 = 22201
Conditions: none
The squared deviation is nonnegative;do not use a signed deviation itself as a variance term.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S017
S019 · calculation
Before
centered contribution1 := mul(0, 22201)
After
centered contribution1 = 0
Conditions: none
Multiply by the aligned probability;a zero weight contributes0 even for a large deviation.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S018
S020 · calculation
Before
centered difference2 := sub(0, 0)
After
centered difference2 = 0
Conditions: none
Subtract this variable's own exact mean.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S019
S021 · calculation
Before
centered square2 := square(0)
After
centered square2 = 0
Conditions: none
The squared deviation is nonnegative;do not use a signed deviation itself as a variance term.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S020
S022 · calculation
Before
centered contribution2 := mul(2/3, 0)
After
centered contribution2 = 0
Conditions: none
Multiply by the aligned probability;a zero weight contributes0 even for a large deviation.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S021
S023 · implies
Before
[0/1, 0/1, 0/1]
After
all indexed centered-square contributions retained
Conditions: none
Retain one term for every outcome,including zeros.These are quantities of the complete probability law,not sample estimates.
Step identifiers and dependencies
Rule: complete_centered_variance_terms · Uses: G001, S022
S024 · calculation
Before
variance of the difference := sum(0, 0, 0)
After
variance of the difference = 0
Conditions: none
Sum every centered-square contribution of the difference variable.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S023