返回题库

最小化期望绝对偏差:最优常数

Minimizing Expected Absolute Deviation

专题
Probability / 概率
难度
L4

题目详情

对具有密度 f(x)f(x) 的连续随机变量 XX,哪个常数 cc 能最小化期望绝对偏差 E[∣X−c∣]\mathbb{E}[|X-c|]?

英文原题

For a continuous random variable XX with probability density function f(x)f(x), what value of the constant cc minimizes the expected absolute deviation, E[∣X−c∣]\mathbb{E}[|X - c|]?

解析

令 FF 为 XX 的分布函数。考虑目标函数

ϕ(c)=E[∣X−c∣]=∫−∞∞∣x−c∣f(x) dx.\phi(c)=\mathbb{E}[|X-c|]=\int_{-\infty}^{\infty}|x-c|f(x)\,dx.

对连续分布可对 cc 求导(或用次梯度),得到

ϕ′(c)=P(X≤c)−P(X≥c)=2F(c)−1.\phi'(c)=\mathbb{P}(X\le c)-\mathbb{P}(X\ge c)=2F(c)-1.

最小点满足 ϕ′(c)=0\phi'(c)=0,即 F(c)=1/2F(c)=1/2。

因此使 E[∣X−c∣]\mathbb{E}[|X-c|] 最小的 cc 是 XX 的任一中位数:

c∈{m:F(m)=1/2}.\boxed{c\in\{m: F(m)=1/2\}}.

英文解析

Let FF be the cumulative distribution function of XX. Consider the objective function

ϕ(c)=E[∣X−c∣]=∫−∞∞∣x−c∣f(x) dx.\phi(c)=\mathbb{E}[|X-c|]=\int_{-\infty}^{\infty}|x-c|f(x)\,dx.

For a continuous distribution, we can differentiate ϕ\phi with respect to cc (or use the subgradient), yielding

ϕ′(c)=P(X≤c)−P(X≥c)=2F(c)−1.\phi'(c)=\mathbb{P}(X\le c)-\mathbb{P}(X\ge c)=2F(c)-1.

The minimizer satisfies ϕ′(c)=0\phi'(c)=0, which implies F(c)=1/2F(c)=1/2.

Thus, the value of cc that minimizes E[∣X−c∣]\mathbb{E}[|X-c|] is any median of XX:

c∈{m:F(m)=1/2}.\boxed{c\in\{m: F(m)=1/2\}}.