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.
Best Answer
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.