A sample of size \(n\) is allocated into the strata using \(x\)-optimal allocation, i.e.
$$n_{h} \propto N_{h}S_{x,U_{h}}$$
where \(N_h\) is the size of the \(h\)th stratum, \(S_{x,U_{h}}\) is the standard deviation of x
in the \(h\)th stratum and \(propto\) stands for ‘proportional to’.
If \(n_{h}>N_{h}\) for at least one stratum, \(n_h\) is set equal to \(N_h\) in those strata and optimal allocation is used again for the remaining strata with the remaining sample size.
Once the \(n_h\) are obtained, the variance of the poststratified estimator under Stratified Simple Random Sampling is computed as: \(V_{STSI}\left[\hat{t}_{HT}\right] = \sum_{h} V_{h}\) with
$$V_{h} = \frac{N_{h}^{2}}{n_{h}}\left(1-\frac{n_{h}}{N_{h}}\right)S_{E,U_{h}}^{2}$$
where \(S_{E,U_{h}}^{2}\) is the variance of E
in the \(h\)th stratum with \(E_{k}=y_{k}-\hat{y}_{k}\).