We get a lot of questions about random samples and how to create them. So we developed a fast, easy trick for you to generate them in Coda.
But first…
A beginner’s guide to sampling
Let’s say you want to survey your customers to understand how you’re currently meeting their needs and how you could do better. The list of customers you can contact for your survey is the sampling frame, but you probably don’t want to contact the entire list. Instead, you’ll want a smaller list, or a sample.
Samples should be randomly selected to ensure everyone from your sampling frame has an equal opportunity of selection. By generating a random sample, you’re minimizing the bias that results from picking a group out of convenience from your sampling frame.
Random samples make it easy to get feedback from a large population for any of the following:
 Customer satisfaction
 Market research
 Healthcare surveys
 Event planning
 Branding & brand equity
How to generate a random sample
This can sound daunting, but you don’t actually need to be a data analyst to do this. All you need is a list in a Coda doc!
Just add your sampling frame—your customers—into your list. Once you have your sampling frame, you can easily select a random sample of them with the RandomSample() formula. Follow these steps:
 Input the formula: RandomSample(list, count, withReplacement=False, updateContinuously=True)
 Add required inputs

 list  Choose the list to sample from.
 count  Choose the size of the sample.
 Add optional inputs

 withReplacement  Whether to sample with replacement, which allows for repetition in the sample. This input defaults to false.
 updateContinously  If this input is true, the output will change on every doc edit. Otherwise, the item will only be generated once. This input defaults to true.
Now that you have a random sample, send them a survey using a Coda form!
For more information on RandomSample() or other Coda formulas, you can visit our formula documentation: Coda  Formula library.