liveBook · Manning

Conditional distribution

As explained in Causal Inference for Data Science

A conditional distribution is the probability distribution of a variable after conditioning on specified information.

A conditional distribution describes how a variable is distributed after selecting cases with specified information. For Y|X = a, keep observations where X equals a, then examine their Y values. This differs from the unconditional distribution, which combines all observed cases. section 1.5.2

Selecting a subgroup

Suppose the selected cases have X = a and Y values 7.01 and 10.89. Their conditional distribution gives each observed value weight 1/2, so E[Y|X = a] = 8.95. Adding Z = B narrows the selection to Y = 10.89. section 1.5.2

Table 1.3 Simulated data conditioned on X = a
X
Y
Z
a
7.01
A
a
10.89
B

Inspect the rows remaining after conditioning the simulated data on X = a. section 1.5.2

For binary Y, the conditional expectation E[Y|X] equals the conditional probability P(Y|X). In general, E[Y|X = x] means calculating the average Y among cases with the chosen value x. section 1.5.2

How Causal Inference for Data Science covers it

How deep it goes
Defines subgroup selection, distributional comparison, and conditional expectation, but does not develop estimation methods.
Examples
Uses simulated X, Y, and Z tables plus grouped Gaussian data to contrast conditional and unconditional distributions.
What you can do after
Evaluate conditional averages and distributions by selecting observations matching specified variable values.
How it connects
Connects conditional distribution with conditional expectation, unconditional distribution, probability, machine learning, and causal inference.

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.