... population:1
At each locus I'm talking about. Remember, I'm only talking about one locus at a time, unless I specifically say otherwise. We'll see why this matters when we get to two-locus genetics in a few weeks.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... populations,2
$p_1 = 2(50)/200 = 0.5$, $p_2 = (2(25) + 50)/200
= 0.5$.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... females.3
It would be easy enough to relax this assumption, but it makes the algebra more complicated without providing any new insight, so we won't bother with relaxing it unless someone asks.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... sperm.4
We are also assuming that we're looking at offspring genotypes at the zygote stage, so that there hasn't been any opportunity for differential survival.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... population,5
Not just the offspring from these matings
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... generation.6
There may be some that come reasonably close, but none that fulfill them exactly.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... magnitude.7
Actually, there's a ninth assumption that I didn't mention. Everything I said here depends on the assumption that the locus we're dealing with is autosomal. We can talk about what happens with sex-linked loci, if you want. But again, mostly what we get is algebraic complications without a lot of new insight.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... paragraph.8
Chances are $N_{aa}$, $N_{ao}$, $N_{bb}$, and $N_{bo}$ won't be integers. That's OK. Pretend that there really are fractional animals or plants in your sample and proceed.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... but9
Yes, truth is sometimes stranger than fiction.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... frequencies.10
I should point out that this method assumes that genotypes are found in Hardy-Weinberg proportions.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... example:11
This is the default example available in the Java applet at http://darwin.eeb.uconn.edu/simulations/em-abo.html.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... pick.12
Technically, we treat $\mbox{P}(K=k\vert p)$ as a function of $p$, find the value of $p$ that maximizes it, and call that value $\hat p$.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....13
You'll be relieved to know that in this case, $\hat p =
k/N$.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... inference.14
If you'd like a little more information on why a Bayesian approach makes sense, you might want to take a look at my lecture notes from the Summer Institute in Statistical Genetics.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... cuspidatum15
A few of you may recognize that I didn't choose that species entirely at random, even though the ``data'' are entirely fanciful.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... data.16
If we had prior information about the likely values of $p$, we'd pick a different prior distribution to reflect our prior information. See the Summer Institute notes for more information, if you're interested.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... results:17
This code and other WinBUGS code used in the course can be found on the course web site by following the links associated with the corresponding lecture.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... error.18
If you're interested in what MC error means, ask. Otherwise, I don't plan to say anything about it.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... interval.19
If you don't understand why that's different from a standard confidence interval, ask me about it.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... 0.57].20
See the Summer Institute notes for more details on why the Bayesian estimate of $p$ is different from the maximum-likelihood estimate. Suffice it to say that when you have a reasonable amount of data, the estimates are barely distinguishable.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... group:21
This is almost the last time! I promise.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... frequencies:22
Assuming genotypes are in Hardy-Weinberg proportions. We'll relax that assumption later.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... alleles.23
It produces a Dirichlet(1,1,1), if you really want to know.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.