Is the value of probability invariant of function of a random variable Consider two random variables following a common distribution F. Is $P(X_{1} > X_{2}) = P(f(X_{1})>f(X_{2}))$ for any function f?
 A: Let $X_1, X_2$ be two independent random variables each with pmf
$$ P_{X}(x)=  
\begin{cases} 
\frac{1}{2} & x =1 \\
\frac{1}{2} & x =-1 \\
\end{cases} $$ 
Then $\mathsf P(X_1>X_2)=0.25$ but $\mathsf P\big(X_1^2>X_2^2\big)=0$
A: No.  That equation does not hold in general.  Although that equation does not hold in general, it does hold for monotonically increasing functions.  If $f$ is monotone increasing (e.g., exponential or logarithmic functions) then you have the event equivalence:
$$\{ X > Y \} \quad \quad \iff \quad \quad \{ f(X) > f(Y) \}.$$
In this case the underlying events are equivalent and so the probability equation you give holds regardless of the distribution of $X_1$ and $X_2$.  Note also that there are some special combinations of a distribution $F$ and a function $f$ for which your probability equation holds, but it will not hold as a general property unless $f$ is a monotonically increasing function.
A: A simple counterexample for any $X_i$ with $P(X_i > 0) = 1$ is the function $f(x) = x^{-1}$. It reverses inequalities, hence $P(f(X_1) > f(X_2)) = P(X_1 < X_2)$, which is in general different from $P(X_1 > X_2)$.
