Measuring and Analyzing the Within Group Homogeneity of Multi-category Variables