A more correct way of calculating ip-variance