This functions calculates the value of the expected heterozygosity for each site and then computes the mean of those values in order to obtain the mean expected heterozygosity within each population.
meanExpected_Het(Pop_Pi)
if the input is a single matrix, the output will be a vector where the first entry is the mean expected heterozygosity of the first population and the n entry is the mean expected heterozygosity of the nth population. If the input is a list, the output will also be a list, with each entry corresponding to a different locus. Each of those entries will be a vector with the mean expected heterozygosity per population for that locus.
is a matrix or list of allele frequencies. When dealing with a single locus, this input is a matrix and when dealing with multiple loci it is a list. Each entry of that list is a matrix representing a different locus. Each row of that matrix should correspond to a different population and each column to a different SNP.