Goal and scope
S={1,2,3,4}, event family F=𝒫(S), weights w₁=1/2, w₂=1/4, w₃=1/8, w₄=1/8. The random variable X:S→ℝ is given by the table X(1)=1, X(2)=0, X(3)=1, X(4)=4 (that is, X(s)=(s−2)²). Find the range of X, the preimage events {X=1}, {X≥1} and {X∈{2,3}}, and the point probability P(X=t) of each value, and prove that these point probabilities sum to 1.
Stays inside the MKO's finite slice: S nonempty and finite, F the full power set, X a total function, weights explicit rationals. The range and preimage events read only the function data and do not use the weights; point probabilities use the separately given weights (MKO assumption a2). The lemma building a probability law from weights is proved here; general measurable spaces, continuous densities and general representations of distributions are not treated; the canonical MKO and its English edition are not changed.
Main derivation
S01 · implies
Before
w_1=\tfrac12,\ w_2=\tfrac14,\ w_3=\tfrac18,\ w_4=\tfrac18
After
w_s\ge 0,\ \sum_{s\in S}w_s=1Conditions: none
Rule: numeric_evaluation · Uses: G3
Leaf basis: numeric_evaluation + frac_rules
First validate the weights: all four are positive rationals, hence nonnegative; their sum is 1/2+1/4+1/8+1/8=4/8+2/8+1/8+1/8=8/8=1. This is the precondition for using the probability law later.
S02 · implies
Before
w_s\ge0,\ \sum_{s}w_s=1After
P(E)=\sum_{s\in E}w_s\ \text{is a valid probability law on}\ \mathcal{P}(S)Conditions: S\ \text{finite}
Rule: L_weight_law · Uses: S01, G1
Leaf basis: prob_axioms + finite_sum_rules + order_basics
By Lemma L_weight_law, the P defined from valid weights satisfies the probability axioms (nonnegativity, total probability 1, additivity for disjoint events). Since F=𝒫(S), every subset E is an event and P(E) is defined. The lemma is proved in S02.1 to S02.3.
S03 · definition
Before
X(1)=1,\ X(2)=0,\ X(3)=1,\ X(4)=4
After
X:S\to\mathbb{R}\ \text{total function}Conditions: none
Rule: mko_rv_def · Uses: G1, G2
Leaf basis: function_def + mko_rv_def
Each of the four outcomes has exactly one real value, so X is a total function S→ℝ, which is the MKO's definition of a random variable. X means the whole table s↦X(s), not a number obtained in one trial.
S04 · equivalent
Before
X(S)=\{X(1),X(2),X(3),X(4)\}After
X(S)=\{0,1,4\}Conditions: none
Rule: image_preimage_def · Uses: S03
Leaf basis: image_preimage_def + set_extensionality
The range is the set of all values: {1,0,1,4}. A set does not count an element twice, so X(S)={0,1,4}, with only 3 values while S has 4 outcomes; this is because X(1)=X(3)=1.
S05 · equivalent
Before
\{X=1\}=\{s\in S\mid X(s)=1\}After
\{1,3\}\in\mathcal{P}(S)Conditions: none
Rule: image_preimage_def · Uses: S03, G1
Leaf basis: image_preimage_def + set_builder + set_extensionality
Check the four outcomes one by one: X(1)=1 yes, X(2)=0 no, X(3)=1 yes, X(4)=4 no, so the preimage {X=1}={1,3}. It is a subset of S and F=𝒫(S), so it is an event. This step reads only the function data.
S06 · equivalent
Before
P(X=1)=P(\{1,3\})After
w_1+w_3=\tfrac12+\tfrac18=\tfrac58
Conditions: none
Rule: mko_rv_def · Uses: S02, S05
Leaf basis: mko_rv_def + def_unfold + numeric_evaluation
The point probability is the sum of the weights of all outcomes with X(s)=1: P({1,3})=w₁+w₃=1/2+1/8=5/8. Both outcomes must be added; counting only w₁ would give the wrong value 1/2.
S07 · equivalent
Before
\{X=0\},\ \{X=4\}After
\{2\},\ \{4\};\ P(X=0)=\tfrac14,\ P(X=4)=\tfrac18Conditions: none
Rule: image_preimage_def · Uses: S02, S03
Leaf basis: image_preimage_def + set_extensionality + def_unfold
Scan in the same way: only X(2)=0 and only X(4)=4, so {X=0}={2} and {X=4}={4}, with point probabilities w₂=1/4 and w₄=1/8.
S08 · implies
Before
\{X=0\},\ \{X=1\},\ \{X=4\}After
\text{pairwise disjoint},\ \{2\}\cup\{1,3\}\cup\{4\}=SConditions: none
Rule: L_level_partition · Uses: S03, S04
Leaf basis: function_def + set_operations_def
By Lemma L_level_partition, the level sets of the values in the range form a partition of S: pairwise disjoint with union S. The proof is in S08.1 and S08.2; in this example one sees directly that {2}, {1,3}, {4} are disjoint and together give {1,2,3,4}.
S09 · implies
Before
P(X=0)+P(X=1)+P(X=4)
After
P(S)=1
Conditions: none
Rule: L_weight_law · Uses: S02, S06, S07, S08
Leaf basis: prob_axioms + set_operations_def + numeric_evaluation
The three level sets are pairwise disjoint (S08), so two-set additivity applied twice gives P({2}∪{1,3}∪{4})=P({2}∪{1,3})+P({4})=P({2})+P({1,3})+P({4}), and the left side is P(S)=1. Numerically: 1/4+5/8+1/8=1. So the point probabilities add up to exactly 1.
S10 · equivalent
Before
\{X\ge 1\}=X^{-1}([1,\infty))After
\{1,3,4\},\ P=\tfrac12+\tfrac18+\tfrac18=\tfrac34Conditions: none
Rule: image_preimage_def · Uses: S02, S03
Leaf basis: image_preimage_def + set_builder + numeric_evaluation
Take T=[1,∞). Filter the outcomes by X(s)≥1: X(1)=1, X(3)=1 and X(4)=4 qualify and X(2)=0 does not, so {X≥1}={1,3,4} with probability w₁+w₃+w₄=3/4.
S11 · equivalent
Before
\{X\ge1\}=S\setminus\{X=0\}After
P(X\ge1)=1-\tfrac14=\tfrac34
Conditions: none
Rule: prob_axioms · Uses: S07, S10, S02
Leaf basis: prob_axioms + set_operations_def + numeric_evaluation
Cross-check: only the value 0 in the range is below 1, so {X≥1} is the complement of {X=0}={2}. By the complement rule P(Eᶜ)=1−P(E), this gives 1−1/4=3/4, agreeing with the direct sum in S10.
S12 · equivalent
Before
X^{-1}(\{2,3\})After
\varnothing\in\mathcal{P}(S),\ P(\varnothing)=0Conditions: none
Rule: image_preimage_def · Uses: S03, G1
Leaf basis: image_preimage_def + set_builder + prob_axioms
Take T={2,3}: no outcome has value 2 or 3, so the preimage is empty. The empty set is also a subset of S, belongs to F=𝒫(S), and is an event, with probability the empty sum 0. This shows that the MKO's 'the preimage of any subset of ℝ is an event' includes the empty case.
S13 · implies
Before
\text{S04 to S12}After
X(S)=\{0,1,4\};\ P(X=0)=\tfrac14,\ P(X=1)=\tfrac58,\ P(X=4)=\tfrac18;\ \textstyle\sum=1Conditions: none
Rule: and_intro_elim · Uses: S04, S05, S06, S07, S09, S10, S12
Leaf basis: and_intro_elim
Summary: range {0,1,4}; preimage events {X=1}={1,3}, {X≥1}={1,3,4}, {X∈{2,3}}=∅; point probabilities 1/4, 5/8, 1/8, summing to 1. The range and events use only the function data; only the point probabilities use the weights.
Substeps and lemmas
S02.1 · implies
Before
w_s\ge 0\ \ (s\in E)
After
P(E)=\sum_{s\in E}w_s\ge 0Conditions: none
Rule: order_basics · Uses: S01, order_basics
Leaf basis: order_basics + finite_sum_rules
Adding nonnegative numbers stays nonnegative (from u≥0 and v≥0 we get u+v≥v≥0, adding one term at a time); the empty sum is 0, so P(∅)=0≥0 as well.
S02.2 · implies
Before
P(S)
After
\sum_{s\in S}w_s=1Conditions: none
Rule: def_unfold · Uses: S01
Leaf basis: def_unfold + numeric_evaluation
By the definition of P, P(S) is the sum of all weights, which S01 computed to be 1.
S02.3 · implies
Before
E_1\cap E_2=\varnothing
After
\sum_{s\in E_1\cup E_2}w_s=\sum_{s\in E_1}w_s+\sum_{s\in E_2}w_sConditions: E_1\cap E_2=\varnothing
Rule: finite_sum_rules · Uses: finite_sum_rules, set_operations_def
Leaf basis: finite_sum_rules + set_operations_def
Each outcome of E₁∪E₂ lies in exactly one of E₁, E₂ (they are disjoint), so the finite sum on the left can be regrouped into two groups, counting each weight exactly once. S02.1 to S02.3 together prove Lemma L_weight_law.
S08.1 · implies
Before
s\in\{X=t\}\cap\{X=t'\}After
t=X(s)=t'
Conditions: none
Rule: function_def · Uses: S03, function_def
Leaf basis: function_def + eq_refl_symm_trans
If s lies in both {X=t} and {X=t′}, then X(s)=t and X(s)=t′; a function has only one value at s, so t=t′. Hence level sets of different values have no common element.
S08.2 · implies
Before
s\in S
After
s\in\{X=X(s)\},\ X(s)\in X(S)Conditions: none
Rule: function_def · Uses: S03, function_def
Leaf basis: function_def + set_extensionality + image_preimage_def
X is total, so every s∈S has a value X(s), which lies in the range, and s lies in the level set of that value. So the union of the level sets contains S; conversely every level set is a subset of S, so the union is exactly S. S08.1 and S08.2 together prove Lemma L_level_partition.