Expectation of the max operator

156 Views Asked by At

For some $n-$dimensional distribution ${\cal D}$ and a vector $a \in \mathbb{R}^n$ can we exactly compute,

$$\mathbb{E}_{x \sim {\cal D}} [ \max \{0, a^\top x \} ] $$

?

  • At least for the Gaussian distribution on $\mathbb{R}^n$ is this known?
  • At least for say the uniform distribution on $S^{n-1}$?
2

There are 2 best solutions below

0
On

If the distribution $f$ is isotropic (that is, $f = f(r)$), this can be calculated exactly whenever $E(|\mathbf{x}|)$ can using $n$-dimensional spherical coordinates. Let $r$ represent the radial coordinate, $\theta$ represent the polar angle, and $\Omega$ represent the remaining spherical angles, which form the surface of a unit sphere in $n-1$ dimensions. Without loss of generality, assume $\mathbf{a}$ is parallel to the polar axis. Then $\mathbf{a}\cdot \mathbf{x} = ar\cos\theta$ and \begin{multline} E(\max\{\mathbf{a}\cdot\mathbf{x},0\}) = \int (\mathbf{a}\cdot\mathbf{x})f d^n\mathbf{x} \\= \int_0^\infty\int_0^\pi\left[\int_0^{2\pi}\right]^{n-2}\max\{ar\cos\theta,0\} f(r)r^{n-1}\sin^{n-2}\theta \,d^{n-2}\Omega \,d\theta\, dr. \end{multline} where $r^{n-1}\sin^{n-2}\theta\, d^{n-2}\Omega\,d\theta\,dr$ is the n-dimensional spherical volume element. Since the factors all depend on one variable, we can separate this integral. Since $\cos\theta < 0$ for $\theta > \pi/2$, we have \begin{multline} ...= a\int_0^\infty rf(r)r^{n-1}dr\int_0^{\pi/2}\cos\theta\sin^{n-2}\theta d\theta\left[\int_0^{2\pi}\right]^{n-2}d^{n-2}\Omega \\= \frac{2a\pi^{(n-1)/2}}{(n-1)\Gamma((n-1)/2)}\int_0^\infty r^n f(r)dr = \frac{a\pi^{(n-1)/2}}{\Gamma((n+1)/2)}\int_0^\infty r^nf(r)dr \end{multline} where we have used $\int_0^{\pi/2}\sin^{n-2}\theta\cos\theta\,d\theta = 1/(n-1)$ and the fact that a sphere in $n$ dimensions has surface area $2\pi^{n/2}/\Gamma(n/2)$.

Lastly, from $$ E(|\mathbf{x}|) = \int |\mathbf{x}|f d^n \mathbf{x} = 2\frac{\pi^{n/2}}{\Gamma(n/2)}\int_0^\infty r^nf(r)dr $$ (again using the $n$-dimensional surface area formula), we have $$ E(\max\{\mathbf{a}\cdot\mathbf{x},0\}) =\frac{a\pi^{(n-1)/2}}{\Gamma((n+1)/2)}\int_0^\infty r^nf(r)dr = \frac{a}{2\sqrt{\pi}}\frac{\Gamma(n/2)}{\Gamma((n+1)/2)}E(|\mathbf{x}|) $$ which is the general form for an isotropic distribution $f$.

0
On

$\ \mathbb{E}_{x \sim {\cal D}} [ \max \{0, a^\top\hspace{-0.2em} x \} ]\ $ can also be calculated exactly whenever $\ \cal D=\mathcal{N}_n(\mu,\,\Sigma)\ $ is multivariate normal. In this case $\ a^\top\hspace{-0.2em}x \sim\mathcal{N}_1(a^\top\hspace{-0.2em}\mu,\,a^\top\Sigma a)\ $, so putting $\ \alpha=a^\top\hspace{-0.2em}\mu\ $ and $\ \sigma=\sqrt{a^\top\Sigma a}\ $, we get \begin{eqnarray} \mathbb{E}_{x \sim {\cal D}} [ \max \{0, a^\top\hspace{-0.2em} x \} ]&=&\frac{1}{\sqrt{2\pi}\sigma}\int_{-\infty}^\infty\max \{0, y\}e^{-\frac{\left(y-\alpha\right)^2}{2\sigma^2}}dy\\ &=& \frac{1}{\sqrt{2\pi}\sigma}\int_0^\infty ye^{-\frac{\left(y-\alpha\right)^2}{2\sigma^2}}dy\\ &=& \frac{1}{\sqrt{2\pi}}\int_{-\frac{\alpha}{\sigma}}^\infty\left(\alpha+\sigma z\right)e^{-\frac{z^2}{2}}dz\\ &=& \alpha\left(1-\mathcal{N}_1(0,\,1)\left(-\frac{\alpha}{\sigma}\right)\right)+\frac{\sigma}{\sqrt{2\pi}} e^{-\frac{\alpha^2}{2\sigma^2}} \end{eqnarray}