# What is the difference between “almost surely” property of a measurable function and the property which holds “on the support of a random variable”?

Consider a random variable $X: \Omega \to \mathbb{R}$ on $(\Omega, \mathcal{F}, P)$ and a measurable function $g:\mathbb{R} \to \mathbb{R}$.

And let's choose some function property, for example continuity.

Does the sentence "function $g$ is continuous almost surely" (i.e. $g$ is continuous at every point of $B \subset \mathbb{R}, \, P(X \in B) = 1$) mean the same as "function $g$ is continuous on the support of $X$"?

This looks like to be true when $X$ is a discrete random variable but what about other possible cases (continuous r.v.)? And what if we choose another function property (monotonicity, differentiability, etc.)?

No, these mean different things. If the support of $X$ is $B$ then $B$ must be closed, but this is not the case if we merely assume $P(X\in B)=1$.
For an example, let $\{q_k\}$ be an enumeration of the rationals and suppose $P(X=q_k)=2^{-k}$, $k\ge1$. Then the support of $X$ is $\mathbb R$, since $P(X\in U)>0$ for all non-empty open sets $U$, but $X$ only takes values in $\mathbb Q$. It is not difficult to give an example of a function $g$ which is continuous at $x$ for every $x\in\mathbb Q$, but is not continuous on all of $\mathbb R$. In fact, we could even construct such a $g$ for which the set on which is continuous is "small" in some sense. For instance, let $I=\bigcup_k(q_k-2^{-k}\varepsilon,q_k+2^{-k}\varepsilon)$ where $\varepsilon>0$ is small, and let $g(x)=\mathbf1_{I}(x)$. Then $g$ is continuous at $x$ if and only if $x\in I$; in particular $g$ is continuous on $\mathbb Q$ and so is continuous almost surely with respect to the law of $X$, but the Lebesgue measure of $I$ is no larger than $2\varepsilon$, which is small.
On the other hand, if a property holds on the support of a probability measure $\mu$, then it also holds $\mu$-almost surely. This is because $\mu(\operatorname{supp}\mu)=1$.
• Thanks! here on MSE I found a nice definition of the support of a r.v.: "the smallest closed set $C$ such that $P(X \in C) = 1$". You showed that we can find such not closed set $B \subset C, \, P(X \in B) = 1$ that $g$ will be continuous on $B$ but not continuous on $C$. I guess that we can also find set $A \supset C, \, P(X \in A) = 1$ and then there will be difference between continuity almost surely (on $A$) and continuity on the support of $X$ (on $C$) too. – Rodvi Nov 28 '17 at 21:29
• Well if a function is continuous on $A$ then it is also continuous on $C$ since $A\supset C$. As I explained in the last paragraph, we do have that if a property holds on the support of a probability measure, then it holds almost surely. – Jason Nov 29 '17 at 0:26