MAT 240 Random Sampling in Excel Tutorial
MAT 240 Random Sampling in Excel Tutorial
This tutorial will guide you though the steps necessary to collect a random sample of a data set to put on
a new sheet.
1. Open your data set in Excel. Be sure the Analysis toolpak is enabled. Steps for how to do this are
available on the Microsoft support site.
2. To find a random sample, you first need to insert the =rand() function an empty column next to
your data. In the example being shown, it is column G. To do this, select the target cell and type
in =rand() then press enter.
3. Double click the Fill handle (little square icon) at the bottom right side of the highlighted cell to
copy the formula through to the bottom of the data set. This will copy this formula to each row
of data.
4. Sort your new column to rearrange the data into a random order. To do this, select the data
within your column, then click the Sort & Filter button from the Home ribbon and choose Sort
Smallest to Largest.
5. A dialog box will open asking if you what you want to do. Select to Expand the selection and
click Sort.
6. Capture your sample size by selecting the amount of rows you are sampling. A sample of 50
would mean you should select the first 50 rows of data.
a. By selecting only the first cell of data in the first column and dragging down, Excel will
count the number of rows for you.
b. Once you have the correct number of rows, then drag to the right to highlight all the
data in the appropriate number of rows.
7. Cut and paste this selected data set onto a new sheet and you will have your random sample
separated from the main data set.
8. In the Descriptive statistics window, select input range field, then select all your numerical data
10. You now should see a new sheet with just your descriptive statistics listed in a chart. Change the
titles of the columns to their respective names from your data: median listing price, median dollars
per square foot, median square feet. And remove any extraneous information that is not needed for
this project.