函数上下积分差异:均匀分布U的CDF求解与二重积分疑惑
Hey there! Let's work through this together—you’re spot-on that this mixes both joint probability and double integrals, so let’s untangle where the confusion might be coming from.
We have two independent uniform random variables $Y_1, Y_2 \sim \text{Uniform}(0,1)$, and we're looking for the CDF of $U = Y_1 + Y_2$. For $1 \leq u \leq 2$, $F_U(u) = P(Y_1 + Y_2 \leq u)$—since the joint PDF is 1 over the unit square $[0,1] \times [0,1]$, this probability is just the area of the region where $y_1 + y_2 \leq u$. The "shaded area" you mention is the complement region ($y_1 + y_2 > u$), so $F_U(u) = 1 - \text{shaded area}$, which is the correct starting point.
First, let's confirm the correct result from your initial approach to use as a reference. You defined:
$$A = \int_{u-1}^{1} {\int_{u-y_1}^{1} 1 dy_2} dy_1$$
Calculating this step-by-step:
- Inner integral over $y_2$: $\int_{u-y_1}^{1} 1 dy_2 = 1 - (u - y_1) = y_1 - u + 1$
- Outer integral over $y_1$:
$$\int_{u-1}^{1} (y_1 - u + 1) dy_1 = \left[ \frac{1}{2}y_1^2 + (1 - u)y_1 \right]_{u-1}^{1}$$
Plugging in the bounds gives us $A = \frac{1}{2}(u-2)^2$, so the CDF is:
$$F_U(u) = 1 - \frac{1}{2}(u-2)^2 = -\frac{1}{2}u^2 + 2u - 1$$
Let's walk through two other valid approaches, and highlight where you might have gone wrong to get mismatched results.
Method 1: Directly Calculate the Valid Region Area (No 1 Minus)
Instead of subtracting the shaded area from 1, we can compute the area of the region where $y_1 + y_2 \leq u$ directly. For $1 \leq u \leq 2$, this region splits into two parts:
- When $y_1$ ranges from 0 to $u-1$, $y_2$ can take any value from 0 to 1 (since $y_1 + 1 \leq u$ here)
- When $y_1$ ranges from $u-1$ to 1, $y_2$ only goes up to $u - y_1$
The integral becomes:
$$F_U(u) = \int_{0}^{u-1} \int_{0}^{1} 1 dy_2 dy_1 + \int_{u-1}^{1} \int_{0}^{u - y_1} 1 dy_2 dy_1$$
Calculating each part:
- First integral: $\int_{0}^{u-1} 1 dy_1 = u - 1$
- Second integral: $\int_{u-1}^{1} (u - y_1) dy_1 = -\frac{1}{2}u^2 + u$
Adding them together gives the same result as before: $-\frac{1}{2}u^2 + 2u -1$. A common mistake here is misdefining the split point (using 1 instead of $u-1$ for the first integral's upper bound), which would overcount the area.
Method 2: Swap Integration Order for the Shaded Area
Your original method integrated over $y_2$ first, but we can swap the order for the shaded region ($y_1 + y_2 > u$). Here, $y_2$ ranges from $u-1$ to 1 (since for $y_2 < u-1$, $y_1$ would need to be greater than 1 to satisfy $y_1 + y_2 > u$, which is impossible). For each $y_2$, $y_1$ ranges from $u - y_2$ to 1.
The integral is:
$$A = \int_{u-1}^{1} \int_{u - y_2}^{1} 1 dy_1 dy_2$$
This is symmetric to your original integral—calculating it gives the same $A = \frac{1}{2}(u-2)^2$, so the CDF matches. A typical error here is setting the lower bound of $y_2$ to 0 instead of $u-1$, which includes invalid area where no $y_1$ can satisfy the inequality.
The random variable logic checks out (since joint PDF is 1, probability = area)—your mismatched results are almost certainly from incorrect integral bounds. The critical step is carefully defining which parts of the unit square actually satisfy the inequality $y_1 + y_2 > u$ (or $\leq u$) for $1 \leq u \leq 2$.
内容的提问来源于stack exchange,提问作者stavro

