How do I select a random sample in Google Sheets? 2

How do I select a random sample in Google Sheets?

To select a random sample in Google Sheets, first open your spreadsheet and highlight the column or row that contains the data you want to sample. Then, go to the “Data” tab and click on “Randomize Range.” This will automatically select a random sample of the data in the highlighted column or row. You can also specify the number of samples you want to select by clicking on “Options” and entering the desired number. This feature is useful for creating unbiased and representative samples for data analysis and research purposes.

Select a Random Sample in Google Sheets


Often you may want to select a random sample from a dataset in Google Sheets. Fortunately this is easy to do using the RAND() function, which generates a random number between 0 and 1.

The following step-by-step example shows how to use this function to select a random sample in Google Sheets.

Step 1: Create a Dataset

First, we’ll enter the values of a dataset into a single column:

Step 2: Create a List of Random Values

Next, type =RAND() into cell B2. This creates a random value between 0 and 1.

Copy and paste this formula into every remaining cell in column B:

Step 3: Copy & Paste the Random Values

Next, highlight the values in column B and click Ctrl + C. This will copy all of the values. Next, right click on cell C2 and choose Paste special > Paste values only.

Note that the values in column B may change once you do this, but don’t worry about this.

Lastly, highlight the values in column C and drag them to replace the values in column B.

Step 4: Sort by the Random Values

Next, highlight cells A2:B16. Then click the Data tab along the top ribbon, then click Sort range.

The values will be sorted based on the random number, from smallest to largest:

Step 5: Select the Random Sample

Lastly, choose the first rows to be in your random sample. For example, if you want a random sample of size 5, then choose the first 5 raw data values to be included in your sample.

In this example, our random sample would include the first 5 values: 5, 20, 14, 13, 8.

The following tutorials explain how to select a random sample from a dataset using other statistical software:

Cite this article

stats writer (2024). How do I select a random sample in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-select-a-random-sample-in-google-sheets/

stats writer. "How do I select a random sample in Google Sheets?." PSYCHOLOGICAL SCALES, 15 May. 2024, https://scales.arabpsychology.com/stats/how-do-i-select-a-random-sample-in-google-sheets/.

stats writer. "How do I select a random sample in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-select-a-random-sample-in-google-sheets/.

stats writer (2024) 'How do I select a random sample in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-select-a-random-sample-in-google-sheets/.

[1] stats writer, "How do I select a random sample in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, May, 2024.

stats writer. How do I select a random sample in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top