Help me to solve this problem please..
Let $Y_{(1)}, Y_{(2)}, Y_{(3)}, Y_{(4)}, Y_{(5)}$ denote the order statistics of a random sample of size 5 from a distribution having p.d.f. $f(y) = e^{(-y)}, 0 < y < \infty$, zero elsewhere. Show that $Z_1 = Y_{(2)}$ and $Z_2 = Y_{(4)} − Y_{(2)}$ are independent. Hint: First find the joint p.d.f. of $Y_{(2)}$ and $Y_{(4)}$.
I am proving this for general $n$, in your case $n=5$.
Let $Y_1,Y_2,\ldots,Y_n$ be a random sample from exponential distribution with mean $1.$ Then joint probability density of order statistics $Y_{(1)},Y_{(2)},\ldots,Y_{(n)}$ is $$f_{Y_{(1)},Y_{(2)},\ldots,Y_{(n)}}(y_1,y_2,\ldots,y_n)= n! e^{-\sum_{i=1}^{n}y_i}, 0\leq y_1\leq y_2\leq \cdots \leq y_n \leq \infty$$ Let us consider transformation
$$Z_1=nY_{(1)}, Z_2=(n-1)(Y_{(2)}-Y_{(1)}), Z_3=(n-2)(Y_{(3)}-Y_{(2)}),\ldots,Z_n= Y_{(n)}-Y_{(n-1)}$$
$$\Rightarrow Y_{(1)}=\frac{Z_1}{n}, Y_{(2)}=\frac{Z_1}{n}+\frac{Z_2}{n-1},\ldots, Y_{(n)}=\frac{Z_1}{n}+\frac{Z_2}{n-1}+\frac{Z_3}{n-2}+\cdots+Z_n$$
Jacobian of above transformation is $\frac{1}{n!}$.
So joint probability density function of $Z_1,Z_2,\ldots,Z_n$ is given by
$f_{Z_1,Z_2,\ldots,Z_n}(z_1,z_2,\ldots,z_n)= e^{-\sum_{i=1}^n z_i}; 0\leq z_1,z_2,\ldots,z_n\leq \infty $.
This follows, using factorization theorem, $Z_1,Z_2,Z_3,\ldots,Z_n$ are identically and independently distributed as exponential variate with mean $1.$
$\Rightarrow Z_i=(n-i+1)(Y_{(i)}-Y_{(i-1)}) \stackrel{\text{iid}}{\sim} \operatorname{exp}(1)$; $i=1,2,3,\ldots,n$.
Hence, $Y_{(2)}=\frac{Z_1}{n}+\frac{Z_2}{n-1}$ and $Y_{(4)}-Y_{(2)}=\frac{Z_3}{n-2}+\frac{Z_4}{n-3}$ are independent.
Ref: "Order Statistics & Inference" by Balakrishnan & Cohen. https://www.amazon.com/Order-Statistics-Inference-Estimation-Methods/dp/149330738X