Let $X_1,...,X_n$ be an i.i.d. sequence and $X_{(1)},...,X_{(n)}$ be the order statistics. Assume that $X_i$ is uniform on $[0,1]$.
Question: How to compute the distribution \begin{align} P(X_i|X_{(j)}) \end{align}
My attempt:
First Approach: This approach follows a post here. Let $N$ be random variable corresponding to the index such that $X_{(j)}=X_N$. Then
\begin{align}
P(X_i|X_{(j)})&= \sum_{k=1}^n P(X_i,N|X_{(j)})\\
&=\sum_{k=1}^n P(X_i|X_{(j)},N=k) P(N=k|X_{(j)})\\
&=P(X_i|X_{(j)},N=i) P(N=i|X_{(j)})+\sum_{k=1: k\neq i}^n P(X_i|X_{(j)},N=k) P(N=k|X_{(j)})\\
&=\delta(X_i-X_{(j)}) P(N=i|X_{(j)})+\sum_{k=1: k\neq i}^n P(X_i|X_{(j)},N=k) P(N=k|X_{(j)})
\end{align}
My questions now are how to compute $P(N=k|X_{(j)})$ and $P(X_i|X_{(j)},N=k)$
Second Approach: Using Bayes rule \begin{align} P(X_i|X_{(j)})=\frac{P(X_{(j)}|X_i) P(X_i)}{P(X_{(j)})}. \end{align} In the above both $ P(X_i)$ and $P(X_{(j)})$ can be found. However, I am not sure how to compute $P(X_{(j)}|X_i)$.
Comment: I would like a thorough answer to this question that explains the details of this problem.