We fit the model using the EM algorithm. We initialize μk and π(k) to their prior means. The EM algorithm iterates between the E-step where we assign the genotypes using Equation 2 and the M-step where we re-estimate the model parameters. At each iteration, we evaluate the complete data log-posterior and the algorithm terminates when this quantity no longer increases. The M-step equations are standard conjugate updating equations: (3) where I(Gi=k) is an indicator function to signal that Gi is assigned to state k at position i, and: (4)