way to partition sampling resources among groups that vary in their means, variance and costs, see "optimum allocation". The problem of stratified sampling in the case of unknown class priors (ratio of subpopulations in the entire population) can have a deleterious effect on the performance of any analysis on the dataset, e.g. classification. In that regard, minimax sampling ratio can be used to make the dataset robust with respect to uncertainty in the underlying data generating process. Combining sub-strata to ensure adequate numbers can lead to Simpson's paradox, where trends that exist in different groups of data disappear or even reverse when the groups are combined. Mean and standard error The mean and variance of stratified random sampling are given by: where, number of strata the sum of all stratum sizes size of stratum sample mean of stratum number of observations in stratum sample standard deviation of stratum Note that the term ( − ) / ( − ), which equals 1 − , is a finite population correction and must be expressed in "sample units". Foregoing the finite population correction gives: where the = / is the population weight of stratum . Sample size allocation For the proportional allocation strategy, the size of the sample in each stratum is taken in proportion to the size of the stratum. Suppose that in a company there are the following staff: male, full-time: 90 male, part-time: 18 female, full-time: 9 female, part-time: 63 total: 180 and we are asked to take a sample of 40 staff, stratified according to the above categories. The first step is to calculate the percentage of each group of the total. % male, full-time = 90 ÷ 180 = 50% % male, part-time = 18 ÷ 180 = 10% % female, full-time = 9 ÷ 180 = 5% % female, part-time = 63 ÷ 180 = 35% This tells us that of our sample of 40, 50% (20 individuals) should be male, full-time. 10% (4 individuals) should be male, part-time. 5% (2 individuals) should be female, full-time. 35% (14 individuals) should be female, part-time. Another easy way without having to calculate the percentage is to multiply each group size by the sample size and divide by the total population size (size of entire staff): male, full-time = 90 × (40 ÷ 180) = 20 male, part-time = 18 × (40 ÷ 180) = 4 female, full-time =