liveBook · Manning

Marginal probability

As explained in Causal AI

A marginal probability is the probability of a variable or event obtained without conditioning on other variables by summing or integrating them out.

A marginal probability describes one variable without conditioning on another. Obtain it from a joint distribution by summing over the other variable, or integrating it for continuous variables. section 2.1.3 section 2.1.4

For a joint distribution P(X, Y):

  • Compute P(X) by summing P(X, Y) across all values of Y. section 2.1.3
  • Compute P(Y) by summing across all values of X. section 2.1.3
  • Use marginal distributions to connect joint distributions with conditional probability through the law of total probability. section 2.1.4

Marginalizing a tabular distribution

A joint table assigns probabilities to six combinations of X and Y. Summing over Y produces P(X) = {0.45, 0.30, 0.25}; summing over X produces P(Y) = {0.60, 0.40}. In pgmpy, DiscreteFactor.marginalize(variables=['Y'], inplace=False) returns the new marginal table without modifying the joint distribution. section 2.1.3

Figure 2.5 Marginalizing over Y yields the marginal distribution of X.
figure

Shows how summing over Y yields the marginal distribution of X. section 2.1.3

How Causal AI covers it

How deep it goes
Explains discrete summation, continuous integration, notation, and pgmpy operations, but stops short of broader multivariate inference.
Examples
Uses a six-cell X-Y probability table and pgmpy DiscreteFactor marginalize outputs.
What it assumes
Assumes joint and conditional probability notation, while motivating marginal distributions through explicit tables and sums.
What you can do after
Apply it via pgmpy to derive marginal tables from discrete joint distributions without altering the original factor.
How it connects
Connects marginal probability with joint probability, conditional probability, the law of total probability, the chain rule, and Bayes rule.

Also explained in

Compare how 3 books explain marginal probability →

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.