liveBook · Manning

Marginal probability

As explained in Math and Architectures of Deep Learning

The probability distribution for one variable obtained by summing out the other variables from a joint distribution.

A marginal probability gives the distribution of one variable after summing out the other variables in a joint distribution. For exhaustive, mutually exclusive values E₁,…,Eₙ, p(G) = Σᵢ p(Eᵢ, G). Adding every joint event in a row or column accounts for all situations in which the retained event can occur. section 5.4.1 section 6.1.1

Use marginal probabilities to:

  • Read a variable’s overall distribution from a joint-probability table by summing across the other variable’s values. section 5.4.1
  • Check normalization: marginal probabilities sum to 1 because they collectively cover every possible joint outcome. section 6.1.1
  • Assess independence by comparing p(X, Y) with p(X)p(Y); equality holds for independent variables. section 6.1.1
  • Supply the denominator in Bayes’ theorem, where the marginal probability is obtained by summing joint probabilities. section 6.1.3

Summing a joint table

Suppose distance G₁ has joint probabilities 0.05, 0.10, and 0.05 with weight categories E₁, E₂, and E₃. Then p(G₁) = 0.05 + 0.10 + 0.05 = 0.20. Summing the entries for E₂ across G₁, G₂, and G₃ similarly gives p(E₂) = 0.50. section 5.4.1

Table 5.6 Joint probability distribution with marginal probabilities shown

Less than 60 kg (E1)

Between 60 and 90 kg (E2)

More than 90 kg (E3)

Marginals for G’s

Less than 5 km (G1)

p(E1, G1)

= 0.25 × 0.2

= 0.05

p(E2, G1)

= 0.5 × 0.2

= 0.1

p(E3, G1)

= 0.25 × 0.2

= 0.05

p(G1)

= 0.05 + 0.1 + 0.05

= 0.2

Between 5 and 15 km (G2)

p(E1, G2)

= 0.25 × 0.6

= 0.15

p(E2, G2)

= 0.5 × 0.6

= 0.3

p(E3, G2)

= 0.25 × 0.6

= 0.15

p(G2)

0.15 + 0.3 + 0.15

= 0.6

More than 15 km (G3)

p(E1, G3)

= 0.25 × 0.2

= 0.05

p(E2, G3)

= 0.5 × 0.2

= 0.1

p(E3, G3)

= 0.25 × 0.2

= 0.05

p(G3)

= 0.05 + 0.1 + 0.05

= 0.2

Marginals for Es

p(E1)

= 0.05 + 0.15 + 0.05

0.05 = 0.25

p(E2)

= 0.1 + 0.3 + 0.1

= 0.5

p(E3)

= 0.05 + 0.15 +

= 0.25

Inspect the joint table with row and column marginals to trace each sum numerically. section 5.4.1

Table 6.1 Example population sizes and joint probability distribution for variables W = {E1, E2, E3} and H = {F1, F2, F3} weights and heights of adult Statsville residents), showing marginal probabilities

Less than 60 kg (E1)

Between 60 and 90 kg (E2)

More than 90 kg (E3)

Marginals for Fs

Less than 160 cm (F1)

pop. = 20,000

p(E1, F1) = 0.2

pop. = 4,000

p(E2, F1) = 0.04

pop. = 2,000

p(E3, F1) = 0.02

pop. = 26,000;

p(F1) = 0.2 + 0.04 + 0.02 = 0.26

Between 160 cm and 183 cm (F2)

pop. = 4,000

p(E1, F2) = 0.04

pop. = 40,000

p(E2, F2) = 0.4

pop. = 4,000

p(E3, F2) = 0.04

pop. = 48,000;

p(F2) = 0.04 + 0.4 + 0.04 = 0.48

More than 183 cm (F3)

pop. = 2,000

p(E1, F3) = 0.02

pop. = 4,000

p(E2, F3) = 0.04

pop. = 20,000

p(E3, F3) = 0.2

pop. = 26,000;

p(F3) = 0.02 + 0.04 + 0.2 = 0.26

Marginals for Es

p(E1)

= 0.2 + 0.04 + 0.02 = 0.26

p(E2)

= 0.04 + 0.4 + 0.04 = 0.48

p(E3)

= 0.02 + 0.04 + 0.2 = 0.26

Total pop. = 100,000;

Total prob = 1

Compare weight and height marginals with their joint cells to investigate dependence. section 6.1.1

How Math and Architectures of Deep Learning covers it

How deep it goes
Works through discrete table sums, normalization, dependence checks, and Bayes denominators; only briefly extends to continuous variables.
Examples
Uses weight-distance tables, weight-height populations, Bayes denominators, and Gaussian mixture component probabilities.
What it assumes
Assumes joint probabilities and random variables while reviewing exhaustive, mutually exclusive events from first principles.
What you can do after
Evaluate joint tables, compute marginal distributions, test independence, and identify Bayesian normalization terms.
How it connects
Connects joint probability, conditional probability, Bayes’ theorem, independence, likelihood, posterior probability, and Gaussian mixture models.

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 Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.