# What is a real-valued random variable?

This question arose when someone (and surely not the least!) commented that something like $\left(X\mid Y=y\right)$ , i.e. $X$ under condition $Y=y$, where $X$ and $Y$ are real-valued random variables and $P\left\{ Y=y\right\}>0$, is not a well defined random variable. To see if he is right I need the definition of real-valued random variable. Is there a commonly accepted one? Constructing an answer for myself (see below) I come to a definition such that $\left(X\mid Y=y\right)$ is a well defined real-valued random variable.

In my view a real-valued random variable can be defined as a quadruple $\left(\Omega,\mathcal{A},P,X\right)$ where $\left(\Omega,\mathcal{A},P\right)$ is a probability space and $X:\Omega\rightarrow\mathbb{R}$ is a measurable function. Here $\mathbb{R}$ is equipped with the Borel $\sigma$-algebra. The quadruple is abbreviated by $X$.

Now let $\left(\Omega,\mathcal{A},P,X\right)$ and $\left(\Omega,\mathcal{A},P,Y\right)$ be random variables according to this definition and for $y\in\mathbb{R}$ such let it be that $P\left\{ Y=y\right\} >0$. Then $\left(X\mid Y=y\right)$ can be recognized as random variable $\left(\Omega,\mathcal{A},Q,X\right)$ where $Q\left(A\right):=P\left(A\cap\left\{ Y=y\right\} \right)/P\left\{ Y=y\right\}$ on $\mathcal{A}$.

I also tag categories because my definition is interpreting the real valued random variable somehow as an arrow in a category. An arrow is determining for its domain.

• When you denote $X$ the random variable $(\Omega ,\mathcal A,P,X)$ how would you denote the r.v. $(\Omega ,\mathcal A,Q,X)$ where $Q$ is an other measure than $P$ ? Because as far as I know, the fact that $X$ is a random variable depend on $\mathcal A$ only. So if you change only $Q$, then $X$ is still a random variable. So according to your notation, $X=(\Omega ,\mathcal A,P,X)=(\Omega ,\mathcal A, Q,X)=X$. This look a bit strange to me. Commented May 15, 2019 at 16:02
• Now, a good idea behind, would be to identify $(\Omega ,\mathcal A,P,X)$ as the equivalence class of $X:\Omega \to \mathbb R$ with the equivalence relation : having the same law. So, with this relation, $(\Omega ,\mathcal A,P,X)\neq (\Omega ,\mathcal A,Q,X)$, and probably $[(X|Y=y)]=(\Omega ,\mathcal A,Q,X)$ where $Q$ is the measure defined in your post and $[X]$ denote the class of $X$. Commented May 15, 2019 at 16:04
• And to make a connection with the answer you gave in my previous question : we would see $X|Y=y$ not as a random variable that have density function $f_{X|Y=y}$ but rather as the equivalence class of random variable that generate the density $f_{X\mid Y=y}$. Commented May 15, 2019 at 16:07
• On your first comment: $X$ is not more than an abbreviation of random variable $(\Omega,\mathcal A,P,X)$. Just as if we can write $f$ for a function $f:A\to B$ without further specifying its domain $A$ and codomain $B$. In situations where it leads to ambiguity (if e.g. we also have $(\Omega,\mathcal A,Q,X)$) then the abbreviation must not be used. Further $P\neq Q$ implies that $(\Omega,\mathcal A,P,X)\neq(\Omega,\mathcal A,Q,X)$. So there are two different random variables. Commented May 15, 2019 at 16:41
• On your second and third comment: and what about $(\Omega,\mathcal A)$? There are more possibilities to choose that space. We could even choose for $(\mathbb R,\mathcal B(\mathbb R))$ and identify $X$ as the probability space with measure $B\mapsto P(X\in B)$. I cannot recognize any "added value" of this kind of constructions and would plead for keeping them apart: random variables and their distributions. Commented May 15, 2019 at 16:49

Your conception of "real-valued" is right. The problem with your definition is that $P(Y=y)$ is generally $0$, assuming that the joint distribution is smooth. So your definition rests on dividing by zero.

It may seem easy to fix this by using a limiting definition instead, but as the Borel-Kolmogorov paradox shows, the "obvious" way to do this does not lead to a well-defined probability distribution. Or, more precisely, the probabilities you get that way depend not only on what null set the condition is, but also on how you approximate it.

• Do you agree that my definition does work under the extra condition that $P\left\{ Y=y\right\} >0$? In other words: if $P\left\{ Y=y\right\} >0$ then we can look at $(X\mid Y=y)$ as a well defined real valued random variable. I understand indeed that it does not work if $P\left\{ Y=y\right\} =0$. Commented Oct 21, 2013 at 20:44
• @drhab: Yes, if $P(Y=y)>0$, then your definition will work -- except for the inconvenience of producing a random variable in a different probability space than the one you started out with. But when the variables are real-valued, the "default working assumption" usually is that they are smoothly distributed, such that events of measure 0 have probability 0 too. Commented Oct 21, 2013 at 20:47

Everything in your very clear question is standard except the mention that "The quadruple is abbreviated by $X$". It is not.

Instead the random variable $X$ is a function $X:\Omega\to\mathbb R$ (more generally, $X:\Omega\to S$ for some measurable space $(S,\mathcal S)$). Thus, to change the probability measure on the measurable space $(\Omega,\mathcal A)$ which is the source set of $X$ is entirely legal (and actually a game probabilists love to play) and exactly what you describe since your $Q$ is another probability measure on $(\Omega,\mathcal A)$ defined as $Q=P[\ \mid Y=y]$.

The new probability measure $Q$ on $(\Omega,\mathcal A)$ yields a new distribution $Q_X$ of each random variable $X$, defined on $\mathcal B(\mathbb R)$ by $Q_X[B]=Q[X\in B]=P[X\in B\mid Y=y]$ just like the distribution $P_X$ of $X$ with respect to $P$ is defined by $P_X[B]=P[X\in B]$.

To sum up, I never saw the convention $(X\mid Y=y)=(\Omega,\mathcal A,Q,X)$, which seems to be based on the highly noncanonical convention that $X=(\Omega,\mathcal A,P,X)$ (are we allowed to iterate? :-)), and I fail to see its advantages.

• In category $\mathbf{Top}$ arrows are said to be continuous functions $f:X\rightarrow Y$ where $X$ and $Y$ are topological spaces. But defining them just like this brings trouble. The homsets are demanded to be disjoint and for that you must define an arrow in $\mathbf{Top}$ as a triple $\left(X,f,Y\right)$. It is common to abbreviate this arrow as $f$. Keeping in mind what you are talking about here is enough and ambiguity does not get much chance. Commented Oct 22, 2013 at 9:24
• I agree that advantages are not easy to find, but to say that $X$ abbreviates $\left(\Omega,\mathcal{A},P,X\right)$ is definitely not the same thing as accepting the (indeed rejectable) convention that $X=\left(\Omega,\mathcal{A},P,X\right)$. Commented Oct 22, 2013 at 9:39