StatCrunch logo (home)

< StatCrunch Examples
Data > Sample
  1. Select the columns to be sampled.
  2. Enter an optional Where statement to specify the data rows to be included.
  3. Specify the sample size to be used.
  4. Specify the number of samples to be collected.
  5. Optionally check the Sample with replacement option. By default, the sampling is done without replacement.
  6. Check the Sample all columns at one time option if the goal is to collect a multivariate sample that maintains the row associations in the original columns.
  7. Check the Save row ids for samples option in order to store the row id numbers for the samples that are collected.
  8. Specify how the sample data is to be stored in the data table:
    1. Choosing the Split across columns option will add the samples individually to the data table.
    2. Choosing the Stacked with a sample id option will stack the samples one on top of the other in a single column in the data table. A new column containing sample id numbers will also be added to the data table.
  9. Select the seeding option for the random number generator:
    1. The Use dynamic seed option uses a random number generator that is seeded based on clock time.
    2. The Use fixed seed option guarantees that the results will always be the same for a given user-specified seed.
  10. Click Compute! to generate the samples.
This example collects 100 samples of size 10 with replacement from the Height column, using the data set at www.statcrunch.com/app/?dataid=1052242

Always Learning