From a Joint Density to Risk Summaries
When two losses are modeled together, their joint density describes not only the possible size of each loss but also how the losses occur in combination. Integrating that density over suitable regions gives marginal distributions, conditional distributions, moments, and probabilities of joint events. The key is to use the correct support and integration limits at each step.
Throughout this tutorial, \(X\) and \(Y\) denote continuous paired losses measured in a fixed common unit. The examples use hypothetical models. They do not represent observed company or industry data.
The support matters: when it is triangular or otherwise restricted, the integration limits can depend on the value of the other variable. A conditional mean follows by weighting the possible conditional values by their conditional density. A joint-event probability is found by integrating over the event’s region within the support, not by automatically multiplying marginal probabilities.
Worked Calculations
Worked Example: Marginals, a Conditional Mean, and a Joint Event
Suppose hypothetical loss amounts \(X\) and \(Y\), each measured in one fixed unit, have joint density \(f_{X,Y}(x,y)=x+y\) on \(0<x<1,\ 0<y<1\), and zero elsewhere. Find both marginal densities, \(E[X]\), \(E[Y\mid X=1/2]\), and \(P(X>1/4,\ Y>1/4)\). The model is a continuous distribution on the unit square; no other parameters are needed.
Method and normalization check. Integrate over the square:
Thus the stated function is a valid density. Integrating out \(Y\) gives \(f_X(x)=\int_0^1(x+y)\,dy=x+1/2\), for \(0<x<1\). By symmetry, \(f_Y(y)=y+1/2\), for \(0<y<1\).
Mean of \(X\). The marginal density gives
The joint density is symmetric in \(x\) and \(y\), so the same calculation gives \(E[Y]=7/12\).
Conditional mean. At \(x=1/2\), \(f_X(1/2)=1\), so the conditional density is \(f_{Y\mid X}(y\mid 1/2)=1/2+y\) for \(0<y<1\). Its integral is \(1/2+1/2=1\). Therefore
Joint event. The event is the square \(1/4<x<1,\ 1/4<y<1\). Integrating both terms of the density over that square,
Check. The answer is between zero and one, and the two equal contributions, one from \(x\) and one from \(y\), are both included. The common mistake is to report only one contribution, \(45/128\), as the entire probability.
Worked Example: Conditional Density and Covariance on a Triangular Support
Consider hypothetical paired losses with joint density \(f_{X,Y}(x,y)=2\) on \(0<y<x<1\), and zero elsewhere. Find the marginal densities, \(E[Y\mid X=x]\), the covariance, and \(P(X>1/2,\ Y>1/4)\). The support is the triangle below the diagonal of the unit square.
Method and normalization check. For each \(x\), \(y\) ranges from zero to \(x\). Thus \(\int_0^1\int_0^x2\,dy\,dx=\int_0^1 2x\,dx=1\).
Marginals. Integrate over the limits set by the triangle:
Conditional mean. For \(0<x<1\), division by \(f_X(x)=2x\) gives \(f_{Y\mid X}(y\mid x)=1/x\) on \(0<y<x\). This integrates to one, and
Covariance. First calculate the marginal means:
For the product moment, integrate over the triangular support:
Joint event. When \(x>1/2\), the event also requires \(y>1/4\), while support requires \(y<x\). Hence
Check. The result is a valid probability, and the conditional density’s range \(0<y<x\) matches the triangular support. Using \(0<y<1\) for the conditional calculation would ignore the support restriction.
Worked Example: Uniform Marginals with Dependence
Let hypothetical losses \(X\) and \(Y\) have density \(f_{X,Y}(x,y)=1+(2x-1)(2y-1)\) on the unit square and zero elsewhere. Find the marginal densities, \(E[Y\mid X=3/4]\), \(\operatorname{Cov}(X,Y)\), and \(P(X>1/2,Y>1/2)\). This is a specified continuous model with no parameters beyond its displayed density.
Method and validity check. Since each factor \(2x-1\) lies between \(-1\) and \(1\), their product is at least \(-1\), so the density is nonnegative. Also, \(\int_0^1(2x-1)\,dx=0\), making the integral of the product term over the square zero. The constant term integrates to one.
Marginals and conditional mean. Integrating over \(y\) eliminates the product term, so \(f_X(x)=1\); likewise, \(f_Y(y)=1\). Thus \(f_{Y\mid X}(y\mid x)=1+(2x-1)(2y-1)\). At \(x=3/4\),
Covariance. The uniform marginals give \(E[X]=E[Y]=1/2\). The product moment is
It follows that \(\operatorname{Cov}(X,Y)=5/18-1/4=1/36\).
Joint event. Over \(1/2<x<1,\ 1/2<y<1\), the constant term contributes \(1/4\). The product term contributes the product of two equal integrals:
Check. Each marginal is uniform, but the joint probability \(5/16\) differs from the product \(1/4\) of the marginal exceedance probabilities. Uniform marginals alone do not establish independence.
Why the Integral Formulas Work
A marginal probability density must account for every possible value of the variable being removed. For example, the probability that \(X\) falls in a small interval around \(x\) is obtained by accumulating joint probability over all permitted \(y\)-values. Dividing that accumulated density by the interval width leads to the marginal integral. The same idea explains event probabilities: integrate the density over every point in the event and support intersection.
The conditional-density formula follows by expressing the joint density as a marginal density times a conditional density. In differential form, \(f_{X,Y}(x,y)=f_X(x)f_{Y\mid X}(y\mid x)\) wherever \(f_X(x)>0\). Dividing by \(f_X(x)\) gives the conditional density, which must integrate to one over the conditional support.
The covariance formula also has a direct justification. By definition, covariance is \(E[(X-E[X])(Y-E[Y])]\). Expanding the product and using linearity of expectation gives
For a continuous pair, the required moments are obtained from the joint density: \(E[XY]=\iint_Dxyf_{X,Y}(x,y)\,dx\,dy\). This is valid when the relevant expectations exist; in the bounded examples above, all moments are finite.
Practical Checks and Common Traps
A reliable calculation follows a fixed sequence: identify the support, verify the density, set integration limits, and then evaluate the requested quantity. For conditional calculations, also check that the resulting conditional density integrates to one. For a joint event, sketching the support and event can prevent integrating over impossible combinations.
Translate inequalities such as \(0<y<x<1\) into the actual limits of integration.
Remove a variable for a marginal, divide by a positive marginal for a conditional density, or integrate over the event region for a joint probability.
Confirm density normalization, probability bounds, and consistency of the integration region with the support.
A frequent exam trap is to replace a joint-event probability with a product of marginal probabilities. That product is justified only when the relevant events are independent. In the unit-square example with density \(x+y\), \(P(X>1/2)=\int_{1/2}^1(x+1/2)\,dx=5/8\), while \(P(Y>1/4)=\int_{1/4}^1(y+1/2)\,dy=27/32\). Their product is \(135/256\), approximately \(0.5273\). But the joint probability is
The two answers differ, so multiplying the marginals gives the wrong calculation here. This check also illustrates why each term of the density must be integrated over the full event region.
Check Your Understanding
For each hypothetical density, identify the relevant support before integrating. Answers are provided for checking.
- Suppose \(f_{X,Y}(x,y)=2\) on \(0<y<x<1\), zero elsewhere. Find \(f_X(x)\), \(E[X]\), and \(E[Y\mid X=x]\). (Answer: \(f_X(x)=2x\) for \(0<x<1\), \(E[X]=2/3\), and \(E[Y\mid X=x]=x/2\).)
- Suppose \(f_{X,Y}(x,y)=1+(2x-1)(2y-1)\) on the unit square. Find both marginal densities and \(P(X>1/2,Y>1/2)\). (Answer: \(f_X(x)=f_Y(y)=1\) on \((0,1)\), and the probability is \(5/16=0.3125\).)
- Suppose \(f_{X,Y}(x,y)=x+y\) on the unit square. Calculate \(P(X>1/2,Y>1/4)\) by integrating the joint density over the event. (Answer: \(33/64=0.515625\).)
- Suppose \(f_{X,Y}(x,y)=2\) on \(0<x<y<1\), zero elsewhere. Calculate \(E[X]\), \(E[Y]\), \(E[XY]\), and \(\operatorname{Cov}(X,Y)\). (Answer: \(E[X]=1/3\), \(E[Y]=2/3\), \(E[XY]=1/4\), and \(\operatorname{Cov}(X,Y)=1/36\).)
- Suppose \(f_{X,Y}(x,y)=2\) on \(0<y<x<1\). Find \(P(Y>0.4\mid X>0.6)\) by first calculating the numerator and denominator probabilities. (Answer: \(P(Y>0.4,X>0.6)=0.32\), \(P(X>0.6)=0.64\), so the conditional probability is \(0.5\).)
- Suppose \(f_{X,Y}(x,y)=x+y\) on the unit square. Find \(E[XY]\) and \(\operatorname{Cov}(X,Y)\), using the marginals to obtain the means. (Answer: \(E[XY]=1/3\), \(E[X]=E[Y]=7/12\), and \(\operatorname{Cov}(X,Y)=-1/144\).)