There's another way to write the expression for when there are only two alleles at a locus. I show it here because it comes in handy some times.