This is an example of statistical inference.
Inference tries to reach conclusions for an entire population by observing data from a sample. In order to do so, is important that the sample has been randomly selected from the population it represents, to avoid biases that might lead to wrong conclusions.