Nonrandom mating changes the ratios of genotypes in a population by altering the frequency of heterozygotes, which are the genotypes formed by the combination of two different alleles. This is because nonrandom mating can lead to inbreeding, which increases the frequency of homozygotes and decreases the frequency of heterozygotes. In contrast, allele frequencies remain unchanged in nonrandom mating without selection. The Hardy-Weinberg principle assumes that all alleles are mixed randomly, and nonrandom mating can disrupt this equilibrium, leading to deviations from expected genotype frequencies. However, it does not change allele frequencies, as allele frequencies are not affected by nonrandom mating.