# How can I show that this random variable $Z_n\sim \operatorname{Uni}(0,1)$?

Let us consider $$X_1,...,X_n$$ iid random variables which are distributed with respect to some density $$f(x)$$. Let $$R_n:=R(X_1,...X_n)$$ be some continuous random variable which depends on $$X_1,...,X_n$$ and define $$Z_n:=F_{R_n}(R_n)$$ where $$F_{R_n}(t)=\Bbb{P}(R_n\leq t)$$. I want to show that $$Z_n\sim \operatorname{Uni}(0,1)$$.

Im a bit confused about $$Z_n$$ because if I replace it with the definition I would get $$Z_n=F_{R_n}(R_n)=\Bbb{P}(R_n\leq R_n)=1$$. This is my first confusion. But the second one is that I don't see a way to show that this random variable is uniformly distributed. I thought about showing that for all $$q\in (0,1)$$ $$\Bbb{P}(Z_n\leq q)=q$$ but this does not went well.

Can maybe someone help me?

• The discussion about $X_i$ and $R_n$ is actually unnecessary. Note that $R_n$ is some random variable and $F_{R_n}$ is its cumulative distribution function. In this case, the random variable $Z:= F_{R_n}(R_n)$ is always uniform. See stats.stackexchange.com/questions/161635/… Jun 6 at 19:12
• @Levent But why is $Z$ not constantly equal to $1$ Jun 6 at 19:14
• That is a confusion about notation. $Z_n=F_{R_n}(R_n)=1$ is not correct because $F_{R_n}$ takes numbers as inputs, not random variables. What is meant there is the following: Sample $R_n$, say you got the number $r$. Feed it to, $F_{R_n}$, i.e., $F_{R_n}(r)=\mathbb{P}(R_n\leq r)$. This is a number between $[0,1]$ and you consider it as a sample of $Z_n$. Jun 6 at 19:17
• @Levent Ah so it only means that $Z_n$ takes values in $[0,1]$. I think I got it thanks a lot! Jun 6 at 19:20
• It has to: The function $F_{R_n}$ only takes values in $[0,1]$. Jun 6 at 19:21

To better illustrate the following explanation, consider that the CDF of $$R_n$$ is represented by the figure below.

One important detail is that the definition of $$X_n$$ does not matter at all in this problem, so we will just ignore all information about the RV $$X$$.

To solve this problem, it is important to understand the definition of the random variable $$Z_n$$.

$$Z_n$$ is a (non-linear) transformation of $$R_n$$, so we will obtain the CDF of $$Z_n$$ from $$R_n$$ itself. Let $$F_{Z_n}(t) = P(Z_n \le t)$$. denotes the CDF of $$Z_n$$ calculated in a point $$t \in (0,1)$$.

Now, take a fixed $$t \in (0,1)$$. Since $$R_n$$ is a continuous RV, exists a $$r_t \in \mathbb{R}$$ such $$F_{R_n}(r_t) = t$$.

Note that $$Z_n = t$$ is equivalent $$R_n = r$$ for an $$r$$ such to $$F_{R_n}(r) = t$$. In that way, $$Z_n = t \iff R = r_t$$.

For this reason:

$$F_{Z_n}(t) = P(Z_n \le t) = P(R_n \le r_t) = F_{R_n}(r_t) = t$$

Therefore, $$F_{Z_n}(t) = t$$, which implies that $$Z_n \sim Unif(0,1)$$.