Notes

Random Sampling

Random sampling is the idea of picking data points in a way that doesn’t “play favorites.” If you want your conclusions to reflect the whole group (not just the easiest-to-reach cases), randomness is your best friend.

What it means (technically)

In random sampling, each unit in the population has a known chance of being selected, and selection is driven by a random mechanism (like a random number generator). The most common form is simple random sampling, where every individual has the same probability of being chosen and every subset of a given size is equally likely. This matters because it helps make your sample unbiased—not perfect, but not systematically skewed.

Why randomness helps

Random sampling turns “messy real life” into something statistics can reason about. It supports:

  • Unbiased estimation of averages, proportions, and model performance.
  • Valid uncertainty statements (standard errors, confidence intervals), because probability theory applies cleanly.
  • Reduced risk that hidden patterns in how you collected data distort results (a.k.a. sampling bias).

Everyday examples

  • House prices: To estimate the average sale price in a city, randomly sample sold homes from the full registry—not just listings from one popular website.
  • Exam scores: To audit grading quality, randomly select papers across all classes, not only the ones submitted early.
  • Medical measurements: To estimate hypertension prevalence, randomly sample patients from a clinic roster, not only those who come in on Mondays.

Where it shows up in AI/ML

Random sampling is everywhere: train/test splits, mini-batches in stochastic gradient descent, bootstrapping for bagging and random forests, and cross-validation folds. If sampling isn’t random (or at least well-controlled), models can look great in evaluation but fail in deployment because the training data didn’t represent the real population.

Random Sampling is selecting observations from a population so each member has a known, typically equal, chance of being chosen. It reduces selection bias and supports valid statistical inference, making estimates and uncertainty measures (e.g., confidence intervals) more reliable. In ML, it helps create representative training/validation splits so performance metrics generalize. Example: randomly sampling 10,000 users from all users to estimate average churn rate.

Imagine you want to know what everyone in a huge jar of mixed candies tastes like, but you can’t eat them all. If you grab a handful without looking, you’re more likely to get a fair mix than if you only pick the candies on top. That “grab without looking” idea is random sampling.

In statistics and AI, random sampling means choosing data points from a larger group so each one has an equal chance of being picked. This helps your sample represent the whole population, reducing “cherry-picking” and making conclusions (or trained models) more trustworthy.