Variety, diversity are comparable when they are used in reference to a group, class, or complex whole and denote the state or quality of being composed of different parts, elements, or individuals.
Variety may imply that the things which differ, whether they are fundamentally similar or completely dissimilar, are related because they contribute to the same end or play a part in the formation of the same whole.
Diversity , though often used interchangeably with variety , distinctively stresses the marked difference or divergence of the individuals, parts, or elements, and seldom suggests even a class or categorical likeness.