A double integral adds a function over a two-dimensional region. Work through joint probability, changing integration order and a synthetic two-driver expected payment.
Double integral
A double integral adds the values of a function over a two-dimensional region, weighting each small piece by its area. It extends a definite integral from a line interval to a region in the plane:
∬Dg(x,y)dA,dA=dxdy.
For a risk model driven by two uncertain quantities, that region can describe combinations of outcomes: both drivers below a threshold, a combined loss above a limit, or states in which a contract pays. Integrating a joint density over the region gives its probability; integrating payoff times density gives its expected payment. The region and the function being integrated answer different parts of the question.
From small cells to one number
Divide D into small cells of area ΔAij. Evaluate g at a point (xij∗,yij∗) in each cell and add
i,j∑g(xij∗,yij∗)ΔAij.
When these sums approach a common limit as the cells become finer, that limit is the double integral. For a continuous function on a closed rectangle this construction works. If g≥0, its geometric interpretation is the volume under the surface z=g(x,y) and above D. A signed g instead gives a signed accumulation: negative contributions subtract. Taking g=1 gives the area of D. OpenStax develops this construction.
The two integral signs do not mean “integrate the same expression twice in the same variable.” Each coordinate has its own range.
A quarter of the area, an eighth of the probability
Suppose a desk builds a synthetic model with two dimensionless risk-driver scores X and Y, each between zero and one. Higher scores represent larger adverse moves within this toy scenario. Assume the joint probability density
fX,Y(x,y)={x+y,0,0≤x≤1,0≤y≤1,otherwise.
This is an assumed teaching model, not an estimated market distribution. It is nonnegative and normalised:
∫01∫01(x+y)dydx=∫01(x+21)dx=1.
The desk asks for the probability that both scores are at most 0.5. The event is the lower-left square D=[0,0.5]×[0,0.5]. Read the innermost differential first: integrate in y, treating x as fixed, then integrate the resulting function in x:
The region has area 0.25, but its average density is 0.5, giving probability 0.25×0.5=0.125. Assuming probability equals area would silently replace the stated density with a uniform one. The MIT joint-distribution notes distinguish density from probability and explain why probabilities require integration.
Synthetic joint density x plus y on the unit square. Four equal-area quadrants have masses 12.5%, 25%, 25% and 37.5%. The lower-left square has area 0.25 and average density 0.5, so its probability is 0.125.
Original synthetic model, with dimensionless coordinates. Shading represents local density; the percentages represent probability integrated over each quadrant. No empirical fit or independence assumption is used.
Density itself need not lie below one: here it reaches two. Probability is dimensionless and bounded by one; density has reciprocal coordinate-area units. If coordinates were measured in dollars and percentage points, the joint density would be per dollar per percentage point. A density value at one point is not the probability of that exact pair; under this joint density, any single point has probability zero.
It is not uniform. By symmetry, fY(y)=y+1/2 on the same interval. Their product is generally different from x+y, so X and Y are not independent.
Indeed, each individual probability below 0.5 is 3/8. Multiplying them gives 9/64, whereas the correct joint probability is 1/8=8/64. Computing two successive integrals is a method for adding the joint density; multiplying marginal probabilities requires a separate independence justification.
Reversing the order means preserving the region
For a continuous g on a rectangle [a,b]×[c,d], Fubini's theorem permits either order:
∫ab∫cdg(x,y)dydx=∫cd∫abg(x,y)dxdy.
The same principle works beyond continuous rectangle examples with suitable conditions. For a nonnegative measurable integrand, Tonelli's theorem permits either order, possibly with an infinite result. For a signed integrand, absolute integrability is a sufficient condition:
∬D∣g(x,y)∣dA<∞.
These are conditions on the integral, not assumptions about independence. Warnick's Cambridge notes state both results, Appendix B.3.2. Our density is bounded on a finite square, so no convergence issue arises.
For a nonrectangular event, changing order also changes the limits. For example, the triangle D={x≥0,y≥0,x+y≤1} can be written either way:
Replacing those inner limits by one would integrate over the entire square and include outcomes outside the event. Sketching the region before evaluating is often more useful than immediately finding an antiderivative.
Change the integrand to change the question
Under the same joint density, the expected value of a function h(X,Y) is
E[h(X,Y)]=∫01∫01h(x,y)(x+y)dydx,
provided its absolute expectation is finite. A probability uses the density over an event; an expectation additionally weights each state by its outcome. The University of Texas notes show this distinction and the marginalisation formulas.
For example, imagine a hypothetical payment of USD 12,000XY at the scenario horizon. Its expected payment is
The currency units come from the payment function; density times coordinate area supplies a probability weight. This is an expected payment under the assumed scenario distribution. Turning it into a traded contract's price would additionally require appropriate valuation probabilities and discounting. Integrating the payment alone would omit the model's probability weights.
For a fuller treatment of probabilities, marginals and conditional densities, see Joint Densities, Marginals, and Conditioning. The link opens a public preview; the complete lesson requires membership.
Sources
Steven G. Krantz and Harold Parks, Vector Calculus, first edition, CRC Press, 2024, §4.1, especially Theorem 4.1.6: double Riemann sums and iterated integration for continuous functions on rectangles.
Dimitri P. Bertsekas and John N. Tsitsiklis, Introduction to Probability, second edition, Athena Scientific, 2008, §3.4: joint densities, probabilities and marginal densities.