Statistical test for random sample of data I'm trying to determine if some particular measurements - in this case taken from a subset of genes of interest (50 genes) - show a significant difference to the rest of the population (15000 genes), by comparing them to a randomly generated subset of 50 genes from within the population of 15000. I present the data for the test genes alongside the random control set in boxplot form, in R, and do a Wilxocon rank sum test to see if there's a significant difference between the two populations: 
Example code:
sample50 <- genes[sample(1:nrow(genes), 50, replace = FALSE), ]
wilcox.test(test_genes[, 2], sample50[, 2])

However my problem is that my P-value varies a LOT each time I generate a new set of 50 random values to compare my gene set of interest to (presumably because the population is quite variable, and 50 is a relatively small sample). Does anyone know how I would better determine if my test genes are significantly different? I've been told it might be something like Monte Carlo or Bootstrapping for the random sample but I'm unsure how to do this in my case or how to proceed. Many thanks.
 A: 
I've been told it might be something like Monte Carlo 

What you're doing is Monte Carlo, just not set up in what I think is a sensible way.

Bootstrapping 

Bootstrapping is a related form of resampling. It won't really solve the problem here (at least not of itself -- if you do what's necessary to make bootstrapping work well, lo, a similarly sensibly implemented approach to what you are doing will probably work just fine.)


*

*If you have the whole population, why not compare your 50 to the remainder of the population (the other 1450 values)? What's the difficulty?

*If you must sample, why are you not excluding the subset from the population you sample? (there's no point comparing the subset with itself - compare it with everything else; that will answer the substantive question exactly as well but you get the advantage of independence).

*If you must sample, why should the sample size be 50? Why not 100? or 200?

*Of course the p-value will vary a lot. If the null hypothesis is close to true the distribution of p-values should be close to uniform. If you must sample, and for some reason (I cannot fathom one) you can't take a large sample all at once, sample many times and combine p-values (e.g. via Fisher's method).
