I am a newcomer to measure-theoretic probability theory, and I have some confusion with how the notion of variance is handled in this framework. Intuitively speaking, for a measurable function $f:\mathbb{R}\to\mathbb{R}$ and a random variable $X$, if $Var(X)=0$, then $Var(f(X))$ should be $0$, and when $Var(X)\to 0$, the same should happen to $Var(f(X))$. However, mathematically there seems to be some intricate issues involved with this intuition. For example, let's take $X\sim\mathcal{N}(0,\sigma^2)$. The variance of $f(X)$ is defined by $$Var(f(X))=\int_{\mathbb{R}}f(x)^2\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{x^2}{2\sigma^2}}dx - (\int_{\mathbb{R}}f(x)\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{x^2}{2\sigma^2}}dx)^2$$ Two issues:
- $Var(f(X))$ is simply undefined when $\sigma=0$!!
- When we let $\sigma\to0$, by dominated convergence and with some manipulations, we can see that $Var(f(X))$ approaches $0$. See, for example: Proof that the limit of the normal distribution for a standard deviation approximating 0 is the dirac delta function.. But this only works for $f$ belonging to the Schwartz space. So I am quite confused about this limitation, since we are restricted to such a small class of measurable functions, while intuitively $Var(f(X))$ should go to $0$ as $Var(X)\to 0$ for any $f$ that's not "crazily behaving".
Now I am very confused about how variance in measure-theoretic probability works. When we talk about $\lim_{Var(X)\to0}Var(f(X))$, are we really stuck with $f$ being a Schwartz function? What about issue 1.? Any help on clearing my confusion is greatly appreciated!
For your first point, your formula for variance (and analogs for expectation) holds when the law of $X$ arises from the density $f$ (with respect to Lebesgue measure). There are more general definitions of expectation and variance than the ones you have given. If $\sigma=0$, then $X$ is a degenerate random variable i.e. constant with probability one. It follows that $X$ does not have a density with respect to Lebesgue measure.