Tutorials › Statistical Theory I - Probability and Distribution Theory › Differentiating Joint CDFs to Recover Densities

Joint Distribution Representations · Tutorial 215 of 994

Differentiating Joint CDFs to Recover Densities

Learn when differentiating a joint CDF recovers its density, what regularity the calculation needs, and how atoms or singular probability can escape it.

Intermediate 9 min read

What You'll Learn

  • Relate rectangular increments of a joint CDF to integrals of a joint density.
  • Distinguish an almost-everywhere density recovery from a classical pointwise mixed derivative.
  • Check sufficient conditions for differentiating first in one coordinate and then the other.
  • Compute mixed derivatives for uniform and exponential examples.
  • Recognize why atoms and curve-supported probability are not recovered as area densities.

From CDF Increments to Density

A joint CDF records probabilities in lower-left rectangles. A joint density, by contrast, describes probability per unit area. Differentiation can connect these representations, but the connection requires care: a density is defined only up to changes on sets of area zero, and a CDF can also arise from probability concentrated at points or along curves, where no ordinary area density describes the law.

For a random vector \((X,Y)\), its joint CDF is \(F(x,y)=P(X\leq x,Y\leq y)\). If the joint law has density \(f\), then for \(a<b\) and \(c<d\), the probability of a rectangle is the integral of \(f\) over that rectangle. Taking a small rectangle around \((x,y)\) therefore gives a local average of the density. When \(f\) is continuous there, that average approaches \(f(x,y)\).

Definition: The joint law of \((X,Y)\) has a joint density \(f\) with respect to area if \(f\) is a nonnegative measurable function, \(\int_{\mathbb R^2} f(u,v)\,du\,dv=1\), and for every Borel set \(A\subseteq\mathbb R^2\), \(P((X,Y)\in A)=\int_A f(u,v)\,du\,dv\). In particular, $$ F(x,y)=\int_{-\infty}^{x}\int_{-\infty}^{y} f(u,v)\,dv\,du. $$

This representation immediately gives the rectangular increment formula. For positive \(h\) and \(k\),

$$ F(x+h,y+k)-F(x,y+k)-F(x+h,y)+F(x,y) =\int_x^{x+h}\int_y^{y+k} f(u,v)\,dv\,du. $$

The left side is a double difference of CDF values; the right side is the probability of \((x,x+h]\times(y,y+k]\). Dividing by \(hk\) yields the average value of \(f\) over that rectangle. It does not, by itself, assert that either iterated classical partial derivative exists.

Theorem: Suppose the joint law has density \(f\), and choose a representative of \(f\) that is continuous at \((x,y)\). Then $$ \lim_{h\downarrow 0,\ k\downarrow 0} \frac{F(x+h,y+k)-F(x,y+k)-F(x+h,y)+F(x,y)}{hk}=f(x,y). $$ Proof: By the rectangular increment formula, the quotient is $$ \frac{1}{hk}\int_x^{x+h}\int_y^{y+k} f(u,v)\,dv\,du. $$ Its difference from \(f(x,y)\) has absolute value at most $$ \sup_{\substack{x\leq u\leq x+h\\ y\leq v\leq y+k}} |f(u,v)-f(x,y)|. $$ Continuity at \((x,y)\) makes this supremum tend to zero as \(h,k\downarrow0\). Thus the quotient tends to \(f(x,y)\). \(\square\)

The theorem identifies a limit of rectangular averages, not necessarily an iterated derivative. At almost every point, an integrable density is a Lebesgue point: its average absolute deviation from its value over shrinking squares tends to zero. The Lebesgue differentiation theorem therefore gives recovery of \(f(x,y)\) from square-shaped rectangular increments at almost every \((x,y)\). This is an almost-everywhere statement. It does not guarantee that classical partial derivatives exist at every point, or that an iterated derivative can be obtained by differentiating in either order.

When an Iterated Mixed Derivative Exists

A common pointwise calculation first differentiates \(F\) in \(x\), then differentiates the result in \(y\). For this argument, \(\partial_xF(x,y')\) must exist not just at \(y\), but for \(y'\) near \(y\). The following sufficient conditions make that requirement explicit.

Theorem: Let \(f\) be a joint density and let \(F\) be its joint CDF. Define \(q_{y'}(u)=\int_{-\infty}^{y'} f(u,v)\,dv\). Suppose there is a neighborhood \(J\) of \(y\) such that, for every \(y'\in J\), \(q_{y'}(u)\) is finite for \(u\) near \(x\) and is continuous as a function of \(u\) at \(x\). Suppose also that \(v\mapsto f(x,v)\) is integrable on bounded intervals near \(y\) and continuous at \(y\). Then the iterated derivative exists and $$ \partial_y(\partial_xF)(x,y)=f(x,y). $$ Proof: Fix any \(y'\in J\). For \(h\) small enough that \(x+h\) is in the stated neighborhood, the density representation and integration over the strip give $$ F(x+h,y')-F(x,y')=\int_x^{x+h}q_{y'}(u)\,du. $$ Continuity of \(q_{y'}\) at \(x\) implies that this integral divided by \(h\) tends to \(q_{y'}(x)\) as \(h\to0\), from either side. Hence \(\partial_xF(x,y')=q_{y'}(x)\) for every \(y'\in J\). In particular, as a function of \(y'\) near \(y\), the first partial derivative is the integral \(\int_{-\infty}^{y'} f(x,v)\,dv\). For sufficiently small nonzero \(t\), $$ \frac{\partial_xF(x,y+t)-\partial_xF(x,y)}{t} =\frac{1}{t}\int_y^{y+t} f(x,v)\,dv. $$ Continuity of \(f(x,\cdot)\) at \(y\) makes this average tend to \(f(x,y)\), including when \(t<0\). This proves the asserted iterated derivative. \(\square\)

The assumptions are sufficient conditions, not necessary ones. They also clarify why simply applying the one-dimensional fundamental theorem of calculus twice can be unsafe: the first differentiation must be justified throughout a neighborhood in the second coordinate. A density may be changed on a set of area zero without changing the joint law, so a pointwise formula for a classical derivative requires a suitably regular representative and suitable local conditions.

Worked Calculations

Worked Example: Uniform Density on a Square

Let \((X,Y)\) have density \(f(x,y)=1\) for \(0<x<1\) and \(0<y<1\), and \(f(x,y)=0\) elsewhere. For \(0<x<1\) and \(0<y<1\), integration gives $$ F(x,y)=\int_0^x\int_0^y 1\,dv\,du=xy. $$ Therefore, at every point in the interior of the square, $$ \partial_xF(x,y)=y,\qquad \partial_y\{\partial_xF(x,y)\}=1=f(x,y). $$ The normalization check is \(\int_0^1\int_0^1 1\,dy\,dx=1\). The calculation illustrates pointwise recovery where the density is continuous. It makes no claim that the same classical derivative formula applies at the boundary, where the piecewise CDF changes form.

Worked Example: Independent Exponential Coordinates

Suppose \(X\) and \(Y\) are independent, with exponential rates \(2\) and \(3\), respectively. Their joint density is \(f(x,y)=6e^{-2x-3y}\) for \(x>0,y>0\), and zero otherwise. For positive \(x,y\), direct integration gives $$ F(x,y)=\left(\int_0^x 2e^{-2u}\,du\right) \left(\int_0^y 3e^{-3v}\,dv\right) =(1-e^{-2x})(1-e^{-3y}). $$ First differentiate with respect to \(x\): $$ \partial_xF(x,y)=2e^{-2x}(1-e^{-3y}). $$ Then differentiate this expression with respect to \(y\): $$ \partial_y\{\partial_xF(x,y)\} =2e^{-2x}\,3e^{-3y} =6e^{-2x-3y}=f(x,y). $$ The hypotheses hold at every interior point of the positive quadrant: the density is continuous there, and the required line integrals are finite and continuous in \(x\). The resulting density integrates to \((\int_0^\infty 2e^{-2x}\,dx)(\int_0^\infty 3e^{-3y}\,dy)=1\).

Why Differentiation Can Fail

A joint CDF need not come from a density. If probability is concentrated on a set of area zero, an area integral cannot represent that probability: integrating any density over such a set gives zero. Ordinary mixed derivatives can miss this probability entirely, even if they exist away from the set.

Worked Example: A Point Mass

Let \(P(X=0,Y=0)=1\). Its joint CDF is \(F(x,y)=\mathbf{1}\{x\geq0,\ y\geq0\}\), where \(\mathbf{1}\) is the indicator function. Away from the coordinate boundaries, \(F\) is locally constant, so its ordinary mixed derivative is zero wherever those derivatives are taken. But the probability of \((-\varepsilon,\varepsilon]\times(-\varepsilon,\varepsilon]\) is \(1\) for every \(\varepsilon>0\). If a joint density existed, the probability of the singleton \(\{(0,0)\}\) would be the integral of that density over a set of area zero, hence would be \(0\), a contradiction. The law has an atom, not a joint density.

Worked Example: Probability Concentrated on a Diagonal

Let \(U\) be uniform on \((0,1)\) and set \(X=Y=U\). For \(x,y\in\mathbb R\), $$ F(x,y)=P(U\leq \min(x,y)) =\begin{cases} 0,&\min(x,y)\leq0,\\ \min(x,y),&0<\min(x,y)<1,\\ 1,&\min(x,y)\geq1. \end{cases} $$ On the open region \(0<x<y<1\), \(F(x,y)=x\), whose mixed derivative is zero; on \(0<y<x<1\), \(F(x,y)=y\), also with mixed derivative zero. Yet \(P(X=Y)=1\). The diagonal has area zero, so no joint density can assign it positive probability through an area integral. Here the law is singular: it is concentrated on a curve rather than at a point or spread over area.

These examples show why “differentiate the CDF” is not a universal method for finding a joint density. It is valid when the law has an absolutely continuous component described by a density and when the required differentiation conditions hold. If the law has point or curve components, ordinary mixed derivatives do not recover those components as an area density. Earlier material on rectangle increments provides a way to read probability from finite differences of the CDF without assuming a density.

Common Mistake

  • Wrong reasoning: “I found \(\partial_xF(x,y)=q_y(x)\) at this \(y\), so I can differentiate that expression in \(y\).” This only establishes the first partial at one value of \(y\); it does not establish that \(\partial_xF(x,y')\) exists nearby or equals \(q_{y'}(x)\).
  • Correction: To take \(\partial_y\{\partial_xF\}(x,y)\), first justify the identity \(\partial_xF(x,y')=q_{y'}(x)\) for every \(y'\) in a neighborhood of \(y\). The theorem above gives one set of sufficient conditions. Also distinguish a mixed derivative from a limit of rectangular averages, and do not infer an area density when probability may be concentrated on a null set.
Key takeaway: Rectangular CDF increments divided by area are local averages of a density. They converge to the density at continuity points, and square averages recover it at almost every point. Classical iterated mixed derivatives need additional local regularity; neither form of ordinary differentiation turns atoms or curve-supported probability into a joint density.

Check Your Understanding

Use the distinction between rectangular increments, ordinary derivatives, and probability concentrated on null sets.

  1. For a joint density \(f\), what probability does the double CDF increment over \((x,x+h]\times(y,y+k]\) represent?
  2. Why does continuity of \(f\) at \((x,y)\) imply that the corresponding increment divided by \(hk\) tends to \(f(x,y)\)?
  3. Why must \(\partial_xF(x,y')\) be justified for nearby \(y'\) before differentiating it with respect to \(y\)?
  4. Can an ordinary mixed derivative away from the diagonal identify the law of \((U,U)\) when \(U\) is uniform on \((0,1)\)? Explain.
  5. Why can no joint density represent a point mass of positive probability?