Suppose I have a scalar function $g(X,Y)$, where $X$ and $Y$ are jointly distributed with pdf $p(x,y)$. I think the expected value of $g$ is given by
$$ \mathbb{E}[g] = \int_{-\infty}^\infty \int_{-\infty}^{\infty} g(x,y) p(x,y) ,円 dx ,円 dy $$
But what is $\operatorname{Var}[g]$?
-
3$\begingroup$ By definition it's $\operatorname{Var}(g) = E[g^2] - E[g]^2.$ What are you looking for in addition to that? $\endgroup$whuber– whuber ♦2019年08月15日 15:18:31 +00:00Commented Aug 15, 2019 at 15:18
-
$\begingroup$ @whuber Should one call that a definition, or a corollary of the definition? The mean squared deviation from the mean is what variance is. The way you've written it, sometimes called a shortcut, has a danger that when $\operatorname E(g)$ is very big compared to typical deviations from the mean, the information you seek, the variance, gets lost in the rounding error. $\endgroup$Michael Hardy– Michael Hardy2025年11月23日 21:07:10 +00:00Commented 22 hours ago
-
$\begingroup$ @Michael I agree. But many texts do indeed define the variance in this way. This formula drops out of the mgf or cgf, for instance, indicating that at least as a mathematical proposition it's as natural as the mean squared deviation from the mean. $\endgroup$whuber– whuber ♦2025年11月23日 21:35:20 +00:00Commented 21 hours ago
2 Answers 2
Based on the definition, it works out to be
$$ \iint_{-\infty}^\infty g^2(x,y) p(x,y),円 \mathrm dx \mathrm dy - \mathbb{E}[g]^2 $$
which is equivalent to
$$ \iint_{-\infty}^\infty \left( g(x,y) - \mathbb{E}[g] \right)^2 p(x,y) ,円 \mathrm dx \mathrm dy $$
-
$\begingroup$ It seems statisticians frequently write $g^2(x,y)$ for $\big( g(x,y)\big)^2.$ There is a certain danger of misunderstanding here, since sometimes $g^2(x,y)$ means $g(g(x,y)). \qquad$ $\endgroup$Michael Hardy– Michael Hardy2025年11月23日 21:04:59 +00:00Commented 22 hours ago
If one were to work only with the most basic definitions, one would seek the density function \begin{align} f_{g(X,Y)}(w) = {} & \frac d{dw} \Pr(g(X,Y)\le w) \\[8pt] = {} & \iint\limits_{x,y,円:,円g(x,y),円\le,円w} p(x,y),円 d(x,y), \end{align} and then compute $$ \mu = \operatorname E(g(X,Y)) = \int_{-\infty}^{+\infty} w f_{g(X,Y)}(w),円 dw, $$ or, when the distribution is not absolutely continuous, $$ \mu = \operatorname E(g(X,Y)) = \int_{-\infty}^{+\infty} w ,円 dF_{g(X,Y)}(w) $$ (a Riemann–Stieltjes integral, which, in the case of discrete distributions, is merely a sum), and finally $$ \operatorname{var}(g(X,Y)) = \operatorname E\left( \big( g(X,Y) - \mu \big)^2 \right), $$ or the corresponding Riemann–Stieltjes integral.
HOWEVER, one need not work only with the most basic definitions. We also have a consequence of those definitions: $$ \mu = \operatorname E(g(X,Y)) = \iint\limits_{(-\infty,+\infty)^2} g(x,y)p(x,y) ,円 d(x,y) $$ and then $$ \operatorname{var}(g(X,Y)) = \iint\limits_{(-\infty,+\infty)^2} (g(x,y)-\mu)^2 p(x,y) ,円 d(x,y) $$ (or the corresponding Riemann–Stieltjess integral).
-
1$\begingroup$ Many might dispute what you characterize as "the most basic definitions," because $(X,Y):\Omega\to\mathbb R^2$ is a (bivariate) random variable on a probability space $(\Omega,\mathfrak F, \mathbb P)$ and $g:\mathbb R^2\to\mathbb R$ is a measurable function. The random variable denoted by "$g(X,Y)$" means the composition $g\circ (X,Y)$ and its expectation is, as always, $E[g(X,Y)]=\int_\Omega g(X(\omega),Y(\omega)),円\mathrm d\mathbb P(\omega).$ This does not require any distribution function nor any consideration of densities: that's why it's more basic. $\endgroup$2025年11月23日 22:09:23 +00:00Commented 21 hours ago