Measuring poverty within and between in population subgroups