var_by_pooling function

Variance estimate by pooling