> #The usual unbiased estimator of the mean,
> #for a SRS of size n = 4 is the mean. I’ll find
> #its exact sample distribution.
>
> pop = c(100, 150, 50, 101, 151, 51)
> require(gtools)
> subsets = combinations(n=6, r=4)
> subsets[] = sapply(subsets, FUN=function(x){pop[x]})
> samp_dist = rowMeans(subsets) # exact sampling distribution of sample means
> samp_dist
[1] 100.25 112.75 87.75 125.50 100.50 113.00 100.50 75.50 88.00 100.75
[11] 113.00 88.00 100.50 113.25 88.25
> mu = mean(samp_dist)
> sigma2_sampling_dist = sum((samp_dist - mu)^2)/length(samp_dist)
> # Note: divided by n because this is a true variance (on a census), not an estimator
> sigma2_sampling_dist
[1] 166.6917
>
>
>
> #Now consider stratification into two strata:
>
> st1 = c(100, 150, 50)
> st2 = c(101, 151, 51)
> # Take a SRS of size two from each stratum. I won’t bother with
> # combinations, as there aren’t many possible samples. Then
> # take the mean of each, followed by the average of these two means.
> sampling_dist1 = c(mean(c(100,150)),mean(c(100,50)),mean(c(150,50)))
> sampling_dist2 = c(mean(c(101, 151)), mean(101c(151, 51)), mean(151c(101, 51)))
> samp_dist2 = rowMeans(cbind(rep(sampling_dist1, each=3),
+ rep(sampling_dist2,times=3)))
> samp_dist2
[1] 100125.5 100113.50 125100.5 100.5 100 88.50 125 75.5 125113.50 125100.5 150 88.50
> mu2 = mean(samp_dist2)
> sigma2_sampling_dist2 = sum((samp_dist2 - mu2)^2)/length(samp_dist2)
> sigma2_sampling_dist2
[1] 277208.77783333
Note that the true variance of the stratification estimator is much larger than the variance of the simple random sample estimator. By the way, if I repeat this for the population $\lbrace 100, 150, 50, 150, 200, 100\rbrace$$\lbrace 100, 150, 50, 170, 220, 120\rbrace$, where the strata are considerably different, I get the stratification estimator working better:
exact variance of SRS estimator: 289.1667 exact
exact variance of stratification estimator: 277 208.77783333