Hongmu Notes

random sampling

Open and use: paste the data, set the number or ratio, and immediately get a list of randomly selected samples and line numbers.
100% Browser local processing 0 Data upload

🎲 Sampling settings

💡 Instructions for use

  • Sampling by line number is suitable for "sampling a fixed number of samples"; sampling by proportion is suitable for "sampling a certain proportion of samples", and the proportion is calculated based on the number of sampled rows.
  • The shuffle mode retains all rows and only randomly rearranges the order. It is used for preparation before random sorting and random grouping.
  • When repetition is prohibited, each row can be sampled at most once, and the result can be used directly as a list; when repetition is allowed, it is equivalent to sampling with replacement, and duplicate rows may appear.
  • When retaining the table header, the first row will not participate in sampling, and the results will still start with the table header, making it easy to paste directly back to the spreadsheet software.
  • The result area will provide the number of rows, sampling ratio and selected row number to facilitate one-by-one verification with the original data.
  • The data is only processed in the browser and is not uploaded or saved; if you need to keep the file, please copy or download the results.

Open and use: paste the data, set the number or ratio, and immediately get a list of randomly selected samples and line numbers.

What information does the results area contain?

The extracted sample content (the entire row is retained as it is) and the corresponding original row number list are for easy review and publicity.

At the same time, the sampling caliber (by number or proportion) and the actual number of samples are given to avoid misinterpretation of the results.

Which scenarios are suitable for

Quality inspection, audit inspection, questionnaire sampling, list drawing, random sorting before training grouping.

Occasions that require "fair randomness": drawing lots, awarding awards, and generating random inspection lists, which are more credible than manual selection.

Key points for use

One record per row; be careful not to include extra empty columns and merged cells when pasting from the table.

First confirm the caliber: "how many pieces to draw" use the number of bars, and "how many percent to draw" use the ratio.

Note

The sampling results depend on random sources and are different every time the results are run; record a list of line numbers if they need to be reproducible.

Sampling does not guarantee representativeness: when the data itself is biased, random sampling cannot correct it.

If it needs to be reproducible, save the list of row numbers: the same data may not necessarily extract the same row next time.

📖 Glossary

random sampling
Select a part of the data as a sample according to random rules, and use the sample to reflect the overall situation.
sample size
The number of rows extracted. The larger the sample size, the closer it is to the whole, but the processing cost is also higher.
Sampling proportion
The sample size is a percentage of the number of rows that can be sampled, often used to draw at a fixed ratio.
Sampling with replacement
The row is put back after each draw, so the same row may be drawn repeatedly.
Sampling without replacement
The extracted rows will no longer participate in subsequent extraction, and each row will appear at most once in the results.
sampling bias
Systematic errors occur when the sample does not represent the whole, for example, only data from a certain time period is taken.
stratified sampling
First group the samples by category, and then sample each group separately so that each category is represented in the sample.
shuffle randomly
It only rearranges the order of rows without deleting any rows. It is often used in preparation before random sorting and grouping.
Winning bank number
The serial number of the selected row in the data is used to check with the original data one by one.
Reproducibility
The property of obtaining the same result under the same conditions. Random sampling is not available by default, and the output needs to be saved to reproduce.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

Can the results be reproduced??
The random results are different every time; save the line number list for review.
Will the data be uploaded??
No. Sampling is all done locally in the browser.