Added calculation for variance within each stratum