{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Distributions: Population, Empirical, Sampling\n",
"\n",
"The population, sampling, and empirical distributions are important concepts that guide us when we make inferences about a model or predictions for new observations. {numref}`Figure %s ` provides a diagram that can help distinguish between them. The diagram uses the notions of population and access frame from {numref}`Chapter %s ` and the urn model from {numref}`Chapter %s `. On the left is the population that we are studying, represented as marbles in an urn with one marble for each unit. We have simplified the situation to where the access frame and the population are the same; that is, we can access every unit in the population. (The problems that arise when this is not the case are covered in {numref}`Chapters %s ` and {numref}`Chapter %s `.) The arrow from the urn to the sample represents the design, meaning the protocol for selecting the sample from the frame. The diagram shows this selection process as a chance mechanism, represented by draws from an urn filled with indistinguishable marbles. On the right side of the diagram, the collection of marbles constitutes our sample (the data we got). \n",
"\n",
"```{figure} SamplingTriptych.png\n",
"---\n",
"name: triptych\n",
"---\n",
"\n",
"Diagram of the data generation process\n",
" \n",
"```\n",
"\n",
"We have kept the diagram simple by considering measurements for just one feature. Below the urn in the diagram is the *population histogram* for that feature. The population histogram represents the distribution of values across the entire population. On the far right, the *empirical histogram* shows the distribution of values for our actual sample. Notice that these two distributions are similar in shape. This happens when our sampling mechanism produces representative samples. \n",
"\n",
"We are often interested in a summary of the sample measurements, such as the mean, median, slope from a simple linear model, and so on. Typically, this summary statistic is an estimate for a population parameter, such as the population mean or median. The population parameter is shown as $ \\theta^* $ on the left of the diagram; on the right, the summary statistic, calculated from the sample, is $ \\hat{\\theta} $.\n",
"\n",
"The chance mechanism that generates our sample might well produce a different set of data if we were to conduct our investigation over again. But if the protocols are well designed, we expect the sample to still resemble the population. In other words, we can infer the population parameter from the summary statistic calculated from the sample. The *sampling distribution* in the middle of the diagram is a *probability distribution* for the statistic. It shows the possible values that the statistic might take for different samples and their chances. In {numref}`Chapter %s `, we used simulation to estimate the sampling distribution in several examples. In this chapter, we revisit these and other examples from earlier chapters to formalize the analyses. \n",
"\n",
"One last point about these three histograms: as introduced in {numref}`Chapter %s `, the rectangles provide the fraction of observations in any bin.\n",
"In the case of the population histogram, this is the fraction of the entire population; for the empirical histogram, the area represents the fraction in the sample; and for the sampling distribution, the area represents the chance the data generation mechanism would produce a sample statistic in this bin.\n",
"\n",
"Finally, we typically don't know the population distribution or parameter, and we try to infer the parameter or predict values for unseen units in the population. At other times, a conjecture about the population can be tested using the sample. Testing is the topic of the next section. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}