You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

函数上下积分差异:均匀分布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.

Background Recap

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.

Benchmark Calculation (Your Original Method)

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:

  1. Inner integral over $y_2$: $\int_{u-y_1}^{1} 1 dy_2 = 1 - (u - y_1) = y_1 - u + 1$
  2. 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$$
Two Alternative Methods (And Common Pitfalls)

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:

  1. First integral: $\int_{0}^{u-1} 1 dy_1 = u - 1$
  2. 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.

Key Takeaway

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 10:05:09