Random sampling is a method of choosing a sample from a larger population by a chance mechanism, so that each member has a known probability of selection. In simple random sampling every member has an equal chance. Variants include stratified sampling, which draws separately from defined subgroups, and sampling with replacement, in which an item can be drawn more than once. Because selection does not depend on the researcher's choices, a random sample avoids selection bias and allows the error of an estimate to be calculated.
In finance, random sampling drives Monte Carlo simulation, where thousands of price paths are drawn from an assumed distribution, and bootstrapping, where past returns are redrawn to gauge how uncertain a backtest result is. One caution applies: market data are ordered in time, so randomly shuffling observations before cross-validation can leak future information into the training data and cause look-ahead bias.