I'm reading hands on machine learning with SciKit-Learn and TensorFlow by Aurélien Géron and came across this passage on page 51:
For example, the US population is composed of 51.3% female and 48.7% male, so a well-conducted survey in the US would try to maintain this ratio in the sample: 513 female and 487 male. This is called stratified sampling: the population is divided into homogeneous subgroups called strata, and the right number of instances is sampled from each stratum to guarantee that the test set is representative of the overall population. If they used purely random sampling, there would be about 12% chance of sampling a skewed test set with either less than 49% female or more than 54% female.
It is not at all clear to me, how the 12% figure quoted above, is calculated. Could someone shed some light on this?