I sample independently $n$ data points following normal distribution with $\mu = 0$ and $\sigma = 1$. Then I divide the sample into two groups $G_1$ and $G_2$ of sizes $g_1$ and $g_2$ respectively ($g_1 + g_2 = n$). What is the probability that all the values in the group $G_2$ will be greater than any of the value in $G_1$?

The interest arises from the fact that if I analyze a huge data set consisting of a tremendous amount of variables what is the chance that some of the variables (if I assume their independence) will be potentially significant.


Thanks for nice answers and comments. I think, I stated my question wrongly. I know exactly how I will divide my sample into two groups $G_1$ and $G_2$. So, the division is not random.

Regarding the comment about the connection between the first and the second paragraph: If I have a large data set, I would like to estimate how many variables could behave "significant" at random (for example, if I apply univariate rank test for every variable). I sample every variable from the aforementioned normal distribution. When sampling is finished, I divide the sample always in the same way to $G_1$ and $G_2$. At the end I probably get a table corresponding to $p$ sampling procedures of $n$ values that I divide into $2$ groups. One thing, I'm interested in small $n$ and almost equal $g_1$ and $g_2$.

  • $\begingroup$ I answered the probability question asked in the first paragraph, but I don't understand the connection to the motivation presented in the second paragraph. $\endgroup$ Commented Jul 28, 2015 at 14:07
  • 2
    $\begingroup$ I am unable to see the connection between the question asked in the first paragraph and the application described in the second. Could you explain what one has to do with the other? $\endgroup$
    – whuber
    Commented Jul 28, 2015 at 14:48
  • $\begingroup$ Is the "large-data" tag actually relevant? I can't see that it can be, so I have removed it. But revert me if there is something I'm misunderstanding. ("'Large data' refers to situations where the number of observations (data points) is so large that it necessitates changes in the way the data analyst thinks about or conducts the analysis.") $\endgroup$
    – Silverfish
    Commented Jul 28, 2015 at 16:01
  • 1
    $\begingroup$ How you divide the sample? Also if it is only about correcting p-values, then you should check multiple-comparisons tagged questions. $\endgroup$
    – Tim
    Commented Jul 28, 2015 at 17:28
  • $\begingroup$ It is not about correcting p-values and multiple comparisons. The most important for me to calculate the probability described in the first part of the question. If I have two groups of let's say 10 values in each, what is the probability that any of the 10 values from the 2nd group will be bigger than any of the 10 values from the 1st group. $\endgroup$
    – Kirill
    Commented Jul 28, 2015 at 17:38

3 Answers 3


Since the datapoints are drawn independently from a continuous distribution, probability of obtaining equal values is $0$ and thus the question is equivalent to "What is the probability that $g_2$ largest values are assigned to group $G_2$".

Assuming $g_1$ and $g_2$ are constants and the random partition into groups is independent of the values, all ${{g_1+g_2}\choose{g_2}}$ partitions into groups of sizes $(g_1,g_2)$ are equally likely, while exactly one of them satisfies the condition. Thus the probability is \begin{equation} \frac{1}{{g_1+g_2}\choose{g_2}} = \frac{g_1!\,g_2!}{(g_1+g_2)!}. \end{equation}

  • 2
    $\begingroup$ +1 The pithiness of the explanation, which clearly states its assumptions, makes this a remarkably good answer. $\endgroup$
    – whuber
    Commented Jul 28, 2015 at 14:46
  • $\begingroup$ Thanks for your answer. I added some explanation to my question above. I guess, it does not change the calculation of the probability given your answer? $\endgroup$
    – Kirill
    Commented Jul 28, 2015 at 15:26

I would rather comment, but lack the reputation to do so. As such, this is not a complete answer.

It is equivalent to say "What is the probability that the minimum member of $G_2$ is larger than the maximum member of $G_1$?". This sounds like a job for order statistics! In case you are unfamiliar, order statistics are simply your data ordered by magnitude (look it up on wikipedia for a longer explanation. As such, the first order statistic is the minimum, and, in your case, the $g_1^{th}$ order statistic is the max of $G_1$, and likewise, $g_2^{th}$ order statistic the max of $G_2$.

If you would like, you can compute, for $x_1$, $x_2$ ... $x_{g_1}$ from $G_1$ and $y_1$,$y_2$...$y_{g_2}$ from $G_2$, $P(x_{g_1} < y_1)$, which will give you an exact answer in terms of $g_1$ and $g_2$. As Tim stated, the probability will be very small for any sizable $n$.

  • $\begingroup$ That's a good point. So far, I did not think about it this way. $\endgroup$
    – Kirill
    Commented Jul 28, 2015 at 15:29

You have two samples $G_1$ and $G_2$ taken from the same population (assuming that you divide your initial sample randomly), this means that as your sample grows you expect each of those two sample to be more and more similar to the initial population. This means that as your sample grows, probability of all value from $G_2$ being grater than any value of $G_1$ gets closer and closer to $0$. This is true no matter what was the distribution since you expect those two samples to be more and more similar to each other as your samples grow.

You can show this with simple simulation:

out <- list()

fun <- function(n) {
  X <- rnorm(n)
  index <- 1:(n/2)
  all(max(X[-index]) < X[index]) # we need to check only if all
                                 # the values are greater than max

for (n in c(4, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6))
  out[[as.character(n)]] <- mean(replicate(1000, fun(n)))

##      X4   X10 X100 X1000 X10000 X1e.05 X1e.06
## 1 0.161 0.004    0     0      0      0      0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.