Actually, by a robust statistical method. The number of samples is determined from variability of the data and the level of confidence desired. Nine would have yielded lower confidence, 12 higher, and 21 very high. The lower the variability the fewer the samples needed for a given confidence. Rifle shooters fire various numbers of shots per group depending on the confidence they are looking for. A three shot group may be fine for a hunting rifle, but is just getting started for a bench rest gun. Rifle groups are also Rayleigh distributions. You could correctly think of a shotgun pattern as a "500 shot" (however many pellets the shell contained) group.