liveBook · Manning

Domain knowledge

As explained in Causal Inference for Data Science

Domain knowledge is knowledge about the real-world subject matter, mechanisms, and context represented by a dataset or model.

Domain knowledge connects analysis to the real-world mechanisms behind the data. In causal inference, it determines whether stone size causes treatment choice or treatment changes stone size, setting the direction of the causal graph. section 2.1.1

Prediction and accuracy do not replace subject-matter judgment. Analysts use domain knowledge to identify plausible confounders, decide which variables belong in a model, and avoid selecting variables merely because they improve predictive performance. section 5.3.2 section 2.9

Use domain knowledge to:

  • Construct a directed acyclic graph that represents relevant causal relationships. section 3.1
  • Distinguish measured confounders from relevant factors that remain unknown or unavailable. section 2.9
  • Choose adjustment variables using causal structure rather than model accuracy alone. section 5.3.2 section 7.8
  • Check whether the available data support the intended causal question, including positivity. section 2.9 section 3.1

Kidney-stone treatment

Doctors assign larger, harder-to-treat stones to treatment A and smaller stones to treatment B. Without medical knowledge, the treatment-group difference could be mistaken for a treatment effect. The resulting graph identifies stone size as a confounder and indicates whether adjustment is required. section 2.1.1 section 3.1

Figure 2.1 The sizes of kidney stones vary between treatments. Larger stones, which are more challenging cases, tend to receive treatment A, whereas smaller, easier cases are often assigned to treatment B. In both scenarios, the distribution of stone sizes differs significantly from the overall distribution.
figure

Compare the stone-size distributions across treatments to see how treatment groups can contain systematically different cases. section 2.1.1

How Causal Inference for Data Science covers it

How deep it goes
Explains causal direction, confounder selection, graph construction, positivity, and adjustment while emphasizing limitations from missing variables.
Examples
Uses kidney-stone treatment assignment, causal graphs, propensity-score variables, and comparisons between predictive accuracy and causal validity.
What it assumes
Assumes access to subject-matter context while teaching analysts to express that context through causal graphs and assumptions.
What you can do after
Evaluate causal questions, collaborate with domain experts, identify confounders, and select adjustments supported by the causal structure.
How it connects
Connects causal inference with confounders, DAGs, Simpson’s paradox, d-separation, the back-door criterion, propensity scores, and the adjustment formula.

Also explained in

Compare how 17 books explain domain knowledge →

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.