liveBook · Manning

Statistical sample

As explained in Statistics Every Programmer Needs

A sample is a subset of a population observed for the purpose of statistical analysis.

A statistical sample is a subset of a population observed to support statistical analysis. Samples let inferential statistics generalize from measured data to a larger population while quantifying uncertainty. section 1.1.4

In quality control, a sample can represent a batch of production measurements. Grouping observations by sample supports monitoring both process averages and variability with control charts. section 14.3

Piston-ring batches

A pandas data frame contains 200 piston-ring diameter measurements divided equally among 40 samples. Each sample identifies five measurements; descriptive statistics summarize their distribution before quality-control analysis. section 14.3

>>> print(pistons.head(10))
   diameter  sample
0    74.030       1
1    74.002       1
2    74.019       1
3    73.992       1
4    74.008       1
5    73.995       2
6    73.992       2
7    74.001       2
8    74.011       2
9    74.004       2

Inspect the first ten observations to see how individual diameter measurements receive sample identifiers. section 14.3

How Statistics Every Programmer Needs covers it

How deep it goes
Defines population generalization and demonstrates sample grouping, but stops short of sampling-design theory.
Examples
Uses piston-ring diameters arranged as 40 batches of five measurements each.
What you can do after
Evaluate grouped manufacturing measurements and prepare them for descriptive or control-chart analysis.
How it connects
Connects samples with populations, inferential statistics, descriptive statistics, and control charts.

Also explained in

Compare how 7 books explain statistical sample →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.