e>posterior_prob_assignment=function(x,P,w)</code>, to compute the posterior probability that each individual came from each population, given the genotypes <code>x</code>, the allele frequencies <code>P</code> and the mixture proportions <code>w</code>. Apply your function to the simulated data.</p></li>
<li><p>Write a function <code>posterior_param_allele_frequencies=function(x,z,a)</code> to compute the parameters of the beta posterior in each population at each locus. Here <code>a</code> is a vector of 