Comparing the means of two populations is useful in some instances. What other information and why is needed to ensure the comparison is valid

Comparing the means of two populations is useful in some instances. What other information and why is needed to ensure the comparison is valid statistically?