cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

Random - Sample Size in Table --> Subset ---- What is the function that is used to create the randomness in selections?

I want to know what function/algorithm was used to generate the randomness in selecting the samples when we use the random - sample size option when subsetting a table in JMP.

2 REPLIES 2
peng_liu
Staff

Re: Random - Sample Size in Table --> Subset ---- What is the function that is used to create the randomness in selections?

If you are asking whether it is with or without replacement, the answer is without replacement. If the subset size equals the original size, the result is a random shuffle: https://www.jmp.com/support/help/en/18.1/#page/jmp/create-a-subset-data-table.shtml?os=win&source=ap...

 

MRB3855
Super User

Re: Random - Sample Size in Table --> Subset ---- What is the function that is used to create the randomness in selections?

Hi @CramerRaoError1 : Further to @peng_liu 's comment.  Effectively, it is the same as the following; say you want a random subset of size n.

   1. Assign each row a random number (each Uniformly distributed between 0 and 1).

   2. Sort the Rows by the Uniform number.

   3. Take the top n rows as the random subset of size n, 

There are other methods...but, they all boil down to each sample of size n having equal probability of being selected. So, in that sense, the methods are all equivalent.