liveBook · Manning

Indicator function

As explained in Causal AI

An indicator function returns one when a specified condition holds and zero otherwise.

An indicator function converts a condition into a deterministic value: it returns 1 when the condition holds and 0 otherwise. In a structural causal model, it can assign an outcome using a uniform exogenous variable. section 6.2.1

Coin-flip assignment

Sample u from Uniform(0, 1), then set y := I(u ≤ pₓ). If u falls below the selected coin’s probability pₓ, y is 1; otherwise, y is 0. Repeating this procedure produces Bernoulli samples. section 6.2.1

This reparameterization moves randomness into an exogenous variable and leaves the indicator as the assignment function; alternative reparameterizations can encode different causal assumptions. section 6.2.1

How Causal AI covers it

How deep it goes
Defines binary thresholding and explains its SCM role, but stops short of formal implementation beyond the assignment equation.
Examples
Demonstrates coin selection through stick breaking, uniform sampling, probability regions, and repeated Bernoulli outcomes.
What it assumes
Assumes familiarity with Bernoulli distributions, uniform distributions, exogenous variables, and structural causal models.
What you can do after
Build it from scratch by replacing a Bernoulli draw with uniform sampling and an indicator assignment.
How it connects
Connects indicator functions to structural causal models, Bernoulli distributions, uniform distributions, exogenous variables, and causal assumptions.

Also explained in

Compare how 2 books explain indicator function →

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