# Intuitively understanding $F_X(X)$ (r.v. as argument) [duplicate]

When considering some cdf $$F_X(x)$$ — e.g. from here — I’m having a hard time trying to understand what $$F_X(X)$$ really means.

Expanding gives $$P(X \leq X)$$, which at first glance should always equal $$1$$; the only other possibility I can think of is $$1/2$$, assuming that the two $$X$$’s are actually different (bad notation?). But then we’d have $$W = F_X(X) = 1$$ (or $$=1/2$$) from the question linked above, which makes no sense.

So how can we understand the quantity $$F_X(X)$$?

This is a case where you are confusing yourself with incorrect use of notation. The function $$F_X: \mathbb{R} \rightarrow [0,1]$$ describes the distribution of the random variable $$X$$, but it does not use this random variable as an implicit or explicit argument. From the probabilistic definition of the CDF, for all $$x \in \mathbb{R}$$ we can validly say that:

$$F_X(x) = \mathbb{P}(X \leqslant x) \ \quad \quad \quad (\text{Valid equation}) \quad \ \ \$$

However, it is not valid to bring the random variable $$X$$ in both as the descriptor in the probabilistic definition of the function and also as its argument value. Doing so leads you to the erroneous equation:

$$F_X(X) = \mathbb{P}(X \leqslant X) \quad \quad \quad (\text{Erroneous equation})$$

You are correct that $$\mathbb{P}(X \leqslant X) = 1$$,$$^\dagger$$ but you are incorrect to equate this expression to the CDF evaluated using the random variable as its input. A better way to proceed is to note that if we let $$Y = F_X(X)$$ then for all $$0 \leqslant y \leqslant 1$$ we have:

\begin{align} F_Y(y) &= \mathbb{P}(Y \leqslant y) \\[6pt] &= \mathbb{P}(F_X(X) \leqslant y) \\[6pt] &= \mathbb{P}(X \leqslant F_X^{-1}(y)) \\[6pt] &= F_X(F_X^{-1}(y)) \\[6pt] &= y, \\[6pt] \end{align}

which is the CDF of the continuous uniform distribution on the unit interval. (In this working I have assumed that $$X$$ is continuous, so that its distribution funciton is invertible. If $$X$$ is not continuous then the resulting distribution is not uniform. In this case the distribution has one or more discrete "lumps" corresponding to the discrete values of the distribution.)

$$^\dagger$$ Indeed, the antisymmetry property of the total order $$\leqslant$$ means that the statement $$X \leqslant X$$ is a tautology. This is an even stronger finding than saying that $$\mathbb{P}(X \leqslant X) = 1$$.

• I understand the algebra of setting $Y = F_X(X)$ and the manipulations that follow. My issue is more...philosophical? As far as I can tell, cdfs are defined like so: $F_X(x) = \Pr(X \leq x)$; so if we cannot equate $F_X(X)$ and $\Pr(X \leq X)$ (and my burning question is "why not?"), does everything not break down? Why should it be valid to set $Y = F_X(X)$ in the first place, if the argument $X$ is a random variable and not a real number? (P.S. Hi from UNSW) Feb 25, 2021 at 3:15
• Well, consider the following similar case. Suppose we define the function $g: \mathbb{R} \rightarrow \mathbb{R}$ by $g(x) \equiv \int_0^x rx \ dr$. Solving this integral gives the simpler form $g(x) = x^3/2$. However, suppose we substitute $x=r$ and assert that $g(r) = \int_0^r r^2 \ dr = r^3/3 \neq r^3/2$. What went wrong there? Why doesn't that work? If you can answer that then you will also see why we can't say that $F_X(X) = \mathbb{P}(X \leqslant X)$.
– Ben
Feb 25, 2021 at 3:42
• Also, in general, if we have a function $f$ and a random variable $X$ then we can form a new random variable $Y=f(X)$ and examine its distribution. (There is a slight technical requirement pertaining to "measurability" of the function, but this is not an issue here.)
– Ben
Feb 25, 2021 at 3:46

For any random variable $$X$$, and any function $$g$$ defined on $$\mathrm{Supp}(X)$$ the support of $$X$$, you can create a new random variable $$Y=g(X)$$. This variable is random because $$X$$ is. The CDF $$F_X$$ maps the set $$\mathrm{Supp}(X)$$ to the interval $$[0,1]$$. Think of $$F_X$$ as some function. You can set $$g = F_X$$ in my example.

Your notation is indeed confusing. I suggest having two identically distributed variables $$X$$ and $$\tilde{X}$$ and thinking about the quantity $$F_X(\tilde{X})$$ which is $$P(X\leq \tilde{X})$$ which is a random variable with support in $$[0,1]$$.

For example, here is an empirical CDF $$\hat{F}$$ for $$\mathcal{N}(1,2.2)$$:

If I now sample new data from the same distribution and plot the histogram of $$U=\hat{F}(X)$$ I get the following:

• Unfortunately, thinking about this quantity as $\mathbb{P}(X \leqslant \tilde{X})$ is also no good, since $\mathbb{P}(X \leqslant \tilde{X}) \geqslant \tfrac{1}{2}$ for any IID random variables $X$ and $\tilde{X}$ (which does not correspond to the uniform distribution).
– Ben
Feb 22, 2021 at 9:07
• Can you provide a hint of the proof that $P(X\leq \tilde{X}) \geq 1/2$ ? Feb 22, 2021 at 9:42
• Hint: Use the condition of exchangeability of IID random variables.
– Ben
Feb 22, 2021 at 21:36