144. Expected Value
144.1. Expected Value
The expected value is the probability-weighted average of a random variable — its long-run mean over many draws.
144.1.1. Discrete
Weight each value by its probability and sum:
Example
Fair die:
144.1.2. Continuous
Swap the sum for an integral, and the mass for :
144.1.3. Partial (truncated) expectation
Average over only a window — same integrand, restricted limits:
where is the indicator (1 when the condition holds, 0 otherwise). This is not a mean — it is not renormalized, so it shrinks toward 0 as the window captures less probability.
144.1.4. Conditional expectation
Renormalize by the probability of the window — now it is a true average, given that landed in :
144.1.5. LOTUS
Law of the Unconscious Statistician. To average a function , integrate against the density of — no need to first find the distribution of :