liveBook · Manning

Empirical distribution function

As explained in Causal Inference for Data Science

An empirical distribution is a probability distribution formed from a finite sample by assigning equal probability weight to each observation.

An empirical distribution turns a finite sample into a probability distribution by assigning every observation weight 1/n. For five coin tosses yielding H, H, T, T, T, heads has probability 2/5 and tails 3/5. Its expectation equals the sample average, while the unobserved data-generating distribution describes the process that produced the sample. section 1.5.1

Use the empirical distribution to:

  • Represent an observed dataset as a probability distribution when the data-generating distribution is unavailable. section 4.2.1
  • Apply the adjustment formula by weighting each observed row equally, giving every configuration probability 1/n. section 4.2.1
  • Handle continuous variables without requiring integrals in practice, because the empirical distribution has at most n observed outcome values. section 4.2.3

Five coin tosses

Encode heads as 1 and tails as 0. The sample (1, 1, 0, 0, 0) assigns probability 1/5 to each toss, producing an empirical probability of 2/5 for heads and a sample average of 2/5. section 1.5.1

Table 4.4 Empirical distribution in a case with multiple confounders
Y
X
Z 1
…
Z p
Empirical probability
y 1
x 1
z 1 1
…
z 1 p
1/ n
y 2
x 2
z 2 1
…
z 2 p
…
y 3
x 3
z 3 1
…
z 3 p
1/ n

Inspect how equal 1/n weights represent rows containing outcomes, treatments, and multiple confounders. section 4.2.1

How Causal Inference for Data Science covers it

How deep it goes
Defines equal 1/n weighting, relates convergence to the generating distribution, and stops short of proving Glivenko–Cantelli.
Examples
Uses five coin tosses and a dataset containing outcomes, treatments, and multiple confounders.
What it assumes
Assumes familiarity with samples and probability distributions while introducing the distinction from data-generating distributions.
What you can do after
Apply it via the adjustment formula by assigning equal weight to each observed row.
How it connects
Connects sample averages, data-generating distributions, adjustment formulas, and continuous distributions.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.