# Conditional Variance: Is it a random variable?

Let's X, Y are random variables (i.e. each one maps elements of a sample space to real numbers). In particular, let's X is such that $$X:\Omega \rightarrow \mathcal{R}$$, where $$\Omega=\{\omega_1, ..., \omega_n \}$$ and $$X(\omega_i)=i$$

Then the conditional variance $$Var(Y|X(\omega_i))$$ is a random variable because it maps an element of a sample space of $$\Omega$$ to $$\mathcal{R}$$.

Now consider $$Var(Y|X(\omega_i)=1 \bigcup X(\omega_i)=2)$$ This expression maps a set $$\{\omega_1, \omega_2 \}$$ to $$\mathcal{R}$$. So, it seems no more to satisfy the definition of a random variable. Then what is it? A measure? Perhaps no. Thank you for answering.

• The notation $\mathrm{Var}(Y\,|\,\cdot)$ has several meanings, depending on whether the second argument is an event, random variable, or $\sigma$-algebra. Commented Jun 23, 2019 at 22:41

By definition, $$\textrm{Var}(Y\mid X):=\mathbb E\bigl[\bigl(Y-\mathbb E(Y\mid X)\bigr)^2\mid X\Bigr]=\mathbb E(Y^2\mid X)-\mathbb E(Y\mid X)^2.$$ Thus, the conditional variance is a random variable, in the same way that the conditional expectation $$\mathbb E(Y\mid X)$$ is. Conceptually, the variance is the "same type of object" as the expectation, in this regard.

Now, one may also consider an event $$A\subseteq \Omega$$ (the sample space) and ask what is $$\textrm{Var}(Y\mid A)$$. And it follows the exact same behavior as the conditional expectation, namely that we define $$\textrm{Var}(Y\mid A):=\mathbb E\bigl[\bigl(Y-\mathbb E(Y\mid A)\bigr)^2\mid A\Bigr]=\mathbb E(Y^2\mid A)-\mathbb E(Y\mid A)^2.$$

By definition, $$\mathbb E(Y\mid A):=\frac{\mathbb E(Y\cdot 1_A)}{\mathbb E(1_A)},$$ where $$1_A$$ denotes the indicator of the set $$A$$. It is a random variable taking the value $$1$$ on $$A$$ and $$0$$ off $$A$$. Note also that $$\mathbb E(1_A)=\mathbb P(A)$$, I just wrote it that way in the denominator of the formula for consistency with the numerator.

Per the discussion below, there was an even more basic question that I should clarify. A random variable is a function from the sample space $$\Omega$$ to the real numbers. This means it assigns a real number to each element $$\omega\in \Omega$$. On the other hand, when we condition on an event we obtain a set function on $$\Omega$$, or in other words, a function that assigns values to subsets of $$\Omega$$ and not to individual elements of $$\Omega$$. In this case, being even more precise, we have a partially defined set function which means that not every subset is assigned a value - it is only those subsets which are measurable and are assigned a positive measure for which the conditional variance is defined.

To compare and contrast the two types of mathematical objects, conditional variance with respect to a random variable is a function from $$\Omega$$ to $$\mathbb R$$, whereas conditional variance with respect to an event is a partially defined function from $$P(\Omega)$$ to $$\mathbb R$$ (the power set of $$\Omega)$$.

• Thank you, but this is not an answer to the posed question. A concept of a random variable has a rigorous definition, see it en.wikipedia.org/wiki/Random_variable. The essential part of my question is that according to the definition a r.v. is a map from elements of a sample space (i.e. $\Omega$) to real numbers. But what happens when there is a map from the field to real numbers?
– Bob
Commented Jun 24, 2019 at 3:18
• If you read my answer more closely, you will see that you are conflating two distinct definitions. Commented Jun 24, 2019 at 3:20
• On the one hand, there is a definition that involves conditioning with respect to a random variable. On the other hand, there is the definition that involves conditioning with respect to an event. The two definitions are distinct mathematical objects, but share the same notation. Commented Jun 24, 2019 at 3:21
• The former definition yields a random variable. The latter definition yields a set function whose domain is the collection of all sets which are assigned positive probability. However, it is not necessarily an additive operation and thus is not a measure. Commented Jun 24, 2019 at 3:23
• Since you seemed to have confusion regarding the definitions, I presented both definitions clearly in my answer. In fact, it was unclear to me what exactly you were asking. Was it simply to clarify whether the conditional variance with respect to an event is a measure? If so, there are simple counterexamples of the additivity condition by considering a very small sample space (I believe $\{1,2\}$ is sufficient) Commented Jun 24, 2019 at 3:25

Actually as $$\{ \omega_1, \omega_2 \} \in \Omega \oplus \Omega$$ and that the latter is an equally valid sample space, it would no less satisfy the definition of a random variable.

• In the defined measurable space the $\{\omega_1, \omega_2 \}$ is an element of a field (based on $\Omega$). What let you cast it as a product of two sample spaces?
– Bob
Commented Jun 24, 2019 at 3:21
• Saying that an object satisfies the definition of a random variable, without specifying the $\sigma$-field in question, is meaningless since all functions are random variables when the domain and codomain are equipped with appropriate $\sigma$-fields. Furthermore, one needs to extend Paul's comment to an arbitrary number of copies of $\Omega$ to apply to the general case, in which case one is effectively reinterpreting a set function as a random variable. Which can be done, but destroys the probabilistic meaning of the concept in this case... Commented Jun 24, 2019 at 3:48