The Fubini-Tonelli Theorem
The rule that lets you compute a double sum or double integral in either order and get the same answer — and the specific condition that has to hold before you're allowed to swap the order of summation in a risk or pricing calculation.
Prerequisites: Monotone and Dominated Convergence Theorems
You are summing a two-dimensional table of numbers — say, expected loss by (scenario, asset) pair — and you want to know: does it matter whether you sum each row first and then add the row totals, or sum each column first and then add the column totals? Usually not. But "usually" is not "always," and the Fubini-Tonelli theorem is the precise statement of exactly when swapping the order is guaranteed to give the same answer, plus a warning about the cases where it silently doesn't.
The analogy: totalling a spreadsheet two ways
Take a spreadsheet grid of numbers, rows and columns. You can total it by summing along each row, then adding the row-sums; or by summing down each column, then adding the column-sums. For a finite grid of ordinary numbers these two totals are obviously the same — addition doesn't care about order. Fubini-Tonelli extends that obvious fact to infinite grids (infinitely many rows, infinitely many columns, or continuous "rows" and "columns" as in a double integral), where the "obviously" stops being obvious: an infinite grid can have row-sums and column-sums that total to different numbers if the entries are allowed to be both positive and negative.
Writing it down
Consider a function of two variables , and the double integral over both variables. Tonelli's part handles non-negative functions: if everywhere, then
In words: for a non-negative grid, integrate however you like, in whichever order, and you always land on the same total — no extra condition needed.
Fubini's part extends this to functions that can be negative, but only under one guardrail: it applies whenever
In words: first check that the absolute values sum to something finite (Tonelli already guarantees this check itself doesn't depend on order, since is non-negative). If that finite check passes, the original signed double integral is also order-independent. If it fails — the absolute values sum to infinity — order can genuinely change the answer, or the integral may not even be well defined.
Worked example 1: joint expectation of independent losses
Two independent loss variables and , each taking values 1, 2, 3 with equal probability . You want . Row-first (condition on , sum over , then over ): for each fixed , (since ). Averaging over : . Column-first (condition on instead): by the identical argument with roles swapped, again. Both orders give , and Fubini-Tonelli guarantees this in advance because all nine pairs are non-negative — Tonelli's part applies with no further check required.
Worked example 2: when the swap actually fails
Consider the doubly-indexed array if , if , and otherwise, for . Sum row first, then add row totals: each row sums to (its cancels the from the row below it, except the pattern is arranged so each individual row nets to zero), giving a grand total of . Sum column first instead: column 1 alone sums to (only the diagonal entry contributes, since there's no row above it to contribute a ), and every subsequent column also nets to , giving a grand total of . Two different orders, two different answers: . Check Fubini's condition: , since there are infinitely many nonzero entries each of size 1. The finiteness check fails, exactly as the theorem warns, and that failure is why order mattered here.
What this means in practice
Fubini-Tonelli is the theorem quietly invoked whenever a quant reorders a nested sum or integral — computing expected P&L by summing over scenarios then assets versus assets then scenarios, or swapping the order of integration in a pricing formula involving two sources of randomness. It is also exactly the justification needed to differentiate under an integral sign, a routine step in deriving Greeks.
Non-negative grids can always be summed in either order (Tonelli). Signed grids can only be safely reordered once you've checked that summing the absolute values gives a finite number (Fubini) — that check is the whole content of the theorem, not a formality.
The classic mistake is swapping the order of an infinite sum or integral involving both positive and negative terms without checking absolute convergence first — assuming that because each individual order "seems to converge," the two orders must agree. As the diagonal-array example shows, they need not: infinite rearrangements of signed series can genuinely change the total, and Fubini's absolute-value check is exactly what rules this out before you trust a swapped calculation.
Related concepts
Practice in interviews
Further reading
- Billingsley, Probability and Measure (ch. 3, 18)
- Folland, Real Analysis (ch. 2)