Estimating Genetic Similarities within and between Populations