Adds a function for subsampling

Introduces subsampling to get even sized groups for comparison with a
p-value similar to the p-value of all the data.