Set a threshold for a sequence I am now having a sequence of numbers, e.g. $x_1, x_2,\dots , x_N$, ($0\leq x_i\leq 1$), which may represent the correlation between a couple of measurements. I want to set a threshold for this sequence, that for $x_i$ which are greater than the threshold may have a significant difference with $x_j$ which are smaller than the threshold.
Or in another form, assuming these values are obtained from a distribution which is unknown, I want to determine a threshold, that $\Pr(x_i > \text{threshold}) = 0.1$, any non-parametric method can determine this threshold? 
 A: Setting a threshold $x_{thr}$, such that the two subsets are significantly different is a bad practice.
Given a sequence $x=\{x_1, x_2, \ldots, x_n\}$, you can always find a threshold $x_{thr}$, such that $X'=\{x|x \geq x_{thr}\}$ will be significantly different from $X''=\{x|x \geq x_{thr}\}$, for instance, applying a Wilcoxon–Mann–Whitney U two-sample test .
Here an example of a sequence of 1000 values sampled from the same distribution with 95% of thresholds generating significantly different subsets (even after Bonferroni correction!)
# Sample from a Normal distribution - no differences
x <- rnorm(1000, mean=0, sd=0.5)
# Remove the values outside [-1, 1]
x <- x[abs(x)<=1]
x <- sort(x)

# Plot histogram of x
hist(x)


# Thresholds from min(x) to max(x) by 0.1
x_thr <- seq(x[2], x[length(x)], by=0.1)
p_values <- numeric(length(x_thr))
for (i in 1:length(x_thr)) {
  p_values[i] <- wilcox.test(x[x < x_thr[i]], x[x >= x_thr[i]])$p.value
}

# Fraction of significant subsets
sum(p.adjust(p_values, "bonferroni") < 0.05) / length(p_values)
#> [1] 0.95

Created on 2020-07-20 by the reprex package (v0.3.0)
