qualify_to_groups function

Qualify observations to groups for normalization