Let's see how this works with some real data from Dobzhansky's work on chromosome inversion polymorphisms in Drosophila pseudoobscura.6
| Genotype | Total | |||
| Number in larvae | 41 | 82 | 27 | 150 |
| Number in adults | 57 | 169 | 29 | 255 |
You may be wondering how the sample of adults can be larger than the sample of larvae. That's because to score an individual's inversion type, Dobzhansky had to kill it. The numbers in larvae are based on a sample of the population, and the adults that survived were not genotyped as larvae. As a result, all we can do is to estimate the relative viabilities.

We can check to see whether this conclusion is statistically justified by comparing the observed number of individuals in each genotype category in adults with what we'd expect if all genotypes were equally likely to survive.
| Genotype | |||
| Expected |
|
|
|
| 69.7 | 139.4 | 45.9 | |
| Observed | 57 | 169 | 29 |
|
|
|||
We can also use our knowledge of how selection works to predict the genotype frequencies at equilibrium:

Now all of those estimates are maximum-likelihood estimates. Doing these estimates in a Bayesian context is relatively straightforward and the details will be left as an excerise.7 In outline we simply
In the end you then have not only viability estimates and their associated uncertainties, but a prediction about the ultimate composition of the population, associated with an accompanying level of uncertainty.