Order Now

Simple Random Sampling in XLSTAT.

Simple Random Sampling in XLSTAT.

There are many ways to take a random sample in Excel using the rand() function, but XLSTAT makes this step a bit easier.

To begin, open up your data set in Excel and click on the XLSTAT tab. Then click:

Preparing Data -> Data sampling

In our case, suppose we would like to choose “Random without Replacement” so that there isn’t a chance of selecting the same sample twice. We would like to sample 1 group of 100 samples, so we can let Number of Samples =1 and Sample size =100. Our data has variable labels and I have no need for the report header. Choosing shuffle is optional.

From there, choose OK, then Continue.

Your sample should then be on the next sheet. From here, the first two rows and the first column are unnecessary.

After deleting the unnecessary rows/columns, you will be left with the following. And then you’re ready to analyze your sample! Have fun!

 

Sampling from Filtered Data:

In the event that you would need to sample from filtered data (if you had to filter by airport, for example), then XLSTAT does that too. Go ahead and use Sort&Filter so that only your airport of choice is shown. Then choose Preparing Data -> Data sampling and repeat all the steps from above. When you click OK, XLSTAT will ask if you only want to sample from the filtered data. Then you can choose option 1.

From there, you should have a random sample from your filtered data.

 

Selecting Multiple Samples:

Suppose that you would like to take multiple samples (from DepDelay perhaps) all at once! This is something that XLSTAT does quite well.

As before, choose Preparing Data -> Data sampling. You may take your sample from the entire data set, as I have done above, or you can sample from a particular column.

Next, in the “Number of Samples” box, select the number of groups you would like to sample. For example, in project 5, you would need to sample 5 groups. Then next to “Sample Size,” type the correct sample size. Initially, in Project 1, the correct sample size would be 4.

If you also click on the “Display side by side” feature, your sample will come in the output shown below.

Now, if you chose to sample from just a column of data and the entire data set (all 40+ columns of data), then on the plus side, your output is presented in this cute little table. On the downside, look at all those green triangles in the upper-left corner of each cell in my table! This is because the numeric output is in a text format. That is not ideal when working with numeric data. I don’t know why XLSTAT thought this would be convenient. Not to worry though, if you highlight all the data in your sample, click the down arrow next to the warning symbol, and choose the “convert to number” option, all will be right in the world.

From there, you can use your data to find averages, sample standard deviations, run an ANOVA, etc. Have fun!

 

Simple Random Sampling in XLSTAT.

 

 

 

Order Now

Calculate Your Order Price


Price (USD)
$