In Sec. , we argued that in order to compare the median income of residents of China and Vatican we should take 50 random samples from each of these two countries, rather than taking 100 UIS samples from China and Vatican together (or, even worse, from the world's population).
This problem naturally arises in the field of survey sampling. The most common solution is stratified sampling [1]}, [2]}, [3]}, where nodes \(V\)  are partitioned into a set \(\mathcal {C}\)  of non-overlapping node categories (or “strata”), with \(\bigcup _{C\in \mathcal {C}}C = V\) . Next, we select uniformly at random \(n_i\)  nodes from category \(C_i\) . We are free to choose the
allocation \((n_1,n_2,\ldots ,n_{|\mathcal {C}|})\) , as long as we respect the total budget of samples \(n\!=\!\sum _i n_i\) .
