liveBook · Manning

Data-generating process

As explained in Causal AI

A data-generating process is the underlying mechanism or probability distribution that produces observed data and its causal relationships.

Suppose an advertising decision raises future revenue. A model trained before that decision may not describe the data collected afterward: the action has changed the process producing the data. That real-world causal process is the data-generating process (DGP). A statistical model can match patterns in recorded outcomes without capturing how decisions change those outcomes. section 2.3 section 7.1.1

Observed data are sampled outcomes, not the DGP itself. For discrete variables, counting each outcome combination and dividing by the sample size gives an empirical joint distribution. A zero count does not establish a zero probability: an outcome may simply be missing from a small sample. The observational joint distribution also leaves out latent variables. Even if that distribution were known, multiple DGPs could be consistent with it. section 2.3.2

Listing 2.11 An example of a DGP in code form
def true_dgp(jenny_inclination, brian_inclination, window_strength):     #1
    jenny_throws_rock = jenny_inclination > 0.5     #2
    brian_throws_rock = brian_inclination > 0.5    #2
    if jenny_throws_rock and brian_throws_rock:    #3
        strength_of_impact = 0.8   #3
    elif jenny_throws_rock or brian_throws_rock:     #4
        strength_of_impact = 0.6    #4
    else:     #5
        strength_of_impact = 0.0   #5
    window_breaks = window_strength < strength_of_impact    #6
    return jenny_throws_rock, brian_throws_rock, window_breaks

The Python function makes causal steps explicit: inclinations determine who throws, throws determine impact strength, and impact strength together with window strength determines whether the window breaks. section 2.3.2

A causal directed acyclic graph (DAG) is a less detailed representation: its arrows state what causes what without specifying every calculation in the underlying process. Scope the graph to the causal question, not just the dataset. Include causally relevant variables even when they were not measured; do not redraw the graph merely to make an effect identifiable from available data. section 3.1.2 section 3.3 section 11.3.5

The assumptions determine which questions a model can answer:

  • Statistical assumptions describe associations, such as a conditional relationship fitted by regression or a neural network. section 10.1.2
  • A causal DAG adds assumptions about what causes what, supporting reasoning about interventions. section 10.1.2
  • Assumptions about how one variable affects another specify mechanisms beyond the DAG’s arrows; structural causal models are an example. section 10.1.2

Prediction versus intervention

Bringing an umbrella does not change future weather. Advertising can change future business performance, so a predictor retrained on post-advertising revenue encounters data from a changed DGP. Treat the advertising decision as an intervention rather than assuming the old predictive relationship will remain reliable. section 7.1.1

When an intervention’s direct targets are unclear, it can be represented explicitly as a root node with edges to variables it might affect. If the resulting causal query is not identifiable with the measured variables, seek additional data rather than changing causal assumptions to fit the dataset. section 7.6.4 section 11.3.5

How Causal AI covers it

How deep it goes
Works from empirical counts through latent-variable distributions and an executable process, then distinguishes graph structure from detailed mechanisms.
Examples
Uses rock throws and a breaking window, then contrasts umbrella decisions with advertising-driven revenue.
What it assumes
Assumes familiarity with random variables and distributions while deriving empirical probabilities from observed counts.
What you can do after
Evaluate/understand when a fitted distribution or predictor may not answer an intervention question, and scope a causal graph accordingly.
How it connects
Links the DGP to joint distributions, latent variables, causal DAGs, interventions, and identification.

Also explained in

Compare how 2 books explain data-generating process →

Related concepts

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.