NotASmurf said:
Thanks for the reply, but they are all from the same distrubution, we know that X1, X2..Xk are bigger than t, but Xk+1,Xk+2..Xn are smaller, we know all the Xi's, but NOT t, I seek to "determine" t, ie P(t = x).
Obviously if more of than half of the Xi's are bigger than t, it is more likely t is smaller than the median etc, I seek to build a distribution out of this
OK. You cannot hope to have the samples ##X_1, X_2, \ldots,X_n## come out in descending values: there is no reason why we cannot have ##X_1 < X_2## and ##X_2 > X_3,## for example. However the so-called
order statistics ##X_{(1)}, X_{(2)}, \ldots X_{(n)}## are, by definition, the ##X_i## values re-sorted into ascending order. That is, ##X_{(1)} = ## smallest of ##S \equiv \{X_1, X_2, \ldots, X_n\},## ##X_{(2)} = ## second smallest of ##S##, all the way up to ##X_{(n)} = ## largest of ##S##. Although you want the ##X## values sorted into descending order, the standard probabilistic formulas apply to them in ascending order. For that reason, I am going to suppose that you want ##X_{(k)} < t < X_{(k+1)}##, so the first ##k## of them are less than ##t## and the remaining ##n-k## of them are ##> t##.
The question only makes sense to me if you fix the values of ##n## and ##k##, and in that case you want to know
$$P(X_{(k)} < T < X_{(k+1)})$$ where ##T## is another independently-generated sample point from the same distribution ##F## as the ##X_i.##
That is a classical problem: if the random variables ##X_i## are continuous, with probability density function ##f(x)## and (cumulative) distribution function ##F(x) = \int_{-\infty}^x f(t) \, dt## then, for any pair ##u < v## the event ##E_{u,v} = \{ X_{(k)} < u \} \cap \{X_{(k+1)} > v \}## occurs whenever ##k## if the ##X_i## are ##< u## and the remaining ##n-k## of them are ##> v##. The ones that are to be ##< u## can be chosen from the sample in ##{ n \choose k }## ways (binomial coefficient), hence
$$P(E_{u,v}) = {n \choose k} F(u)^k (1-F(v))^{n-k} $$ This implies that
$$P(X_{(k)} < T < X_{(k+1)}| T=t) = {n \choose k} \int_{u=-\infty}^t \int_{v=t}^\infty F(u)^k (1-F(v))^{n-k} \, du \, dv \\
\hspace{4ex} = {n \choose k} \left[ \int_{-\infty}^t F(u)^k \, du \right] \, \left[ \int_t^\infty (1-F(v))^{n-k} \, dv \right] $$
The answer to your question (if I have interpreted it correctly) is
$$\text{ans.} = \int_{-\infty}^\infty P(X_{(k)} < T < X_{(k+1)}| T=t) \, f(t) \, dt$$ In other words, if we set
$$A_k(t) = \int_{-\infty}^t F(u)^k \, du \;\; \text{and} \;\; B_{n-k}(t) = \int_t^\infty (1-F(v))^{n-k} \, dv$$ then we have
$$\text{ans.} = {n \choose k} \int_{-\infty}^\infty A_k(t) B_{n-k}(t) f(t) \, dt.$$ If the ##X_i## and ##T## all come from the same ##N(\mu,\sigma)## there will not be any closed-form formula for the answer (even ##F(x)## itself has no closed-form formula in terms of standard, elementary functions). Probably you would need to use numerical integration methods for a given example, and perhaps be satisfied with graphical results. However, as indicated in some of the on-line articles about order statistics, if the sample ##n## is large you might be able to employ reasonable normal-distribution approximations to some of the quantities, and so get a bit further towards a usable formula.
For more about order statistics, see
https://en.wikipedia.org/wiki/Order_statistic
and
https://www2.stat.duke.edu/courses/Spring12/sta104.1/Lectures/Lec15.pdf