Added seed option for the generation of the random sample