system
Given the following post, respond as if you're commenting on Reddit:
human
Why do we use the Hardy Weinberg equilibrium if it never in fact occurs in nature?

If mating is never random, mutations always occur, immigration and emigration is common and natural selection is always occurring why is Hardy Weinberg so important?
gpt
It provides a baseline to compare actual populations to. You can use this for a few things. One, if you know the actual genotype frequency of a population, you can test to see how much it deviates from the Hardy-Weinberg baseline. More commonly, a population is observed and (if AA and Aa genotypes are separate phenotypes) numbers of each genotype is recorded. Then, going by a null hypothesis that the population is in hardy-weinberg proportions, you use statistical analysis to see if it is. Obviously, this is somewhat flawed in that the population will not be in perfect hardy-weinberg proportions, but often times it is close enough that the statistical analysis regards the deviations as not statistically significant. Of course, in some cases, it will show that it was NOT in hardy-weinberg proportions, in which case re-counts would be taken again to confirm this. 

The applications of seeing if the environment is close to hardy-weinberg proportions is a whole other story.