> For the complete documentation index, see [llms.txt](https://katt.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://katt.gitbook.io/wiki/math/sampling.md).

# Meaningful Sampling

How to Get a Representative Sample

In nearly any real-world case, information on the entire population will not be available. Instead, statisticians try to get a representative sample of the total population, so descriptive statistics of the sample to generalize to the population.

Finding the right sample size is pretty simple, and a lot of online sites like (this)\[<https://www.surveysystem.com/sscalc.htm>] will do the calculation for you.

Some definitions to keep in mind:

* *Margin of Error* is how far off the descriptive statistics of the sample might be from the population's descriptive statistics.
* *Confidence Interval* is how replicatable the results will be. For example, a confidence interval of 95% means that 19 times of 20, the results are good. This can be hacked, (relevant xkcd)\[<https://xkcd.com/882/>].
* *Population Size* is (WYSIWYG)\[<https://en.wikipedia.org/wiki/WYSIWYG>]. That said, sometimes this will need to be estimated since the true population size may not be known.
* *Likely Sample Proportion* is a little tricky. This can be estimated with a pilot study, or left at 0.5 to have the most conservative estimate.
