A random variable assigns values to outcomes whose uncertainty comes from a random experiment, sampling process, or unobserved factors. Its expectation is the average value under the relevant probability distribution. section 10.1.2 section 1.5.1
Keep randomness tied to the object being considered. A particular patient's potential outcome may be fixed, even though the corresponding population variable is random because it represents a randomly selected patient. Thus, P(Y1 = 1) describes the proportion of patients cured under treatment, not uncertainty about one already-fixed potential outcome. section 10.1.2
Several distinctions make random variables useful in statistics and causal inference:
- Separate a sample statistic from the underlying data-generating quantity: a sample average estimates an expectation. section 1.5.1
- Distinguish observable variables, such as treatment received or recovery, from unobserved potential outcomes. section 10.1.2
- Allow conditional outcomes to remain random: in Y := f(X, U), knowing X does not determine Y when unknown factors U also affect it. section 3.2.2
Heads and tails
For a sample containing two heads and three tails, the empirical distribution assigns probability 2/5 to H and 3/5 to T. Coding heads as 1 and tails as 0 makes the sample average 2/5, an estimate of the random variable's expectation under the data-generating process. section 1.5.1
Table 1.1 Empirical distribution from a sample of H, H, T, T, T
|
Outcome
|
Probability
|
|---|---|
|
H
|
2/5
|
|
T
|
3/5
|
Use the empirical-distribution table to compare observed outcome frequencies with probabilities assigned to a binary random variable. section 1.5.1




