variance partitioning python