Algorithm Search⌘K

Theoremadvanced

Ewens sampling formula

Also called Ewens distribution.

Under the neutral infinite alleles model, the probability of an allelic partition of a sample of n genes, with theta as the only parameter.

The Ewens sampling formula gives the probability of each way that a sample of nn genes can split into allele classes, when the population follows the neutral infinite alleles model at equilibrium. It has one parameter, the scaled mutation rate θ=4Nu\theta = 4Nu. A strong consequence is that the number of distinct alleles in the sample carries all the information about θ\theta. The same law appears outside genetics, as the law of the cycle type of a random permutation and of the clusters of a Dirichlet process.

Statement

The setting. A sample of nn genes from a large population under the neutral infinite alleles model at stationarity, in the limit N→∞N \to \infty with θ=4Nu\theta = 4Nu fixed. Equivalently, the genealogy of the sample is the Kingman coalescent (time in units of 2N2N generations), and mutations fall on each lineage at rate θ/2\theta/2; each mutation makes a new allele. Let aja_j be the number of alleles that have exactly jj copies in the sample, so ∑jjaj=n\sum_j j a_j = n, and let K=∑jajK = \sum_j a_j be the number of distinct alleles. Write θ(n)=θ(θ+1)⋯(θ+n−1)\theta^{(n)} = \theta(\theta + 1)\cdots(\theta + n - 1).

Theorem (Ewens 1972).

(a) The allele counts have the law

Pr⁡(a1,…,an)=n!θ(n)∏j=1n(θ/j)ajaj!.\Pr(a_1, \ldots, a_n) = \frac{n!}{\theta^{(n)}} \prod_{j=1}^{n} \frac{(\theta/j)^{a_j}}{a_j!}.

(b) The number of alleles has the law Pr⁡(K=k)=∣s(n,k)∣ θk/θ(n)\Pr(K = k) = |s(n, k)|\,\theta^k/\theta^{(n)}, where ∣s(n,k)∣|s(n, k)| is the unsigned Stirling number of the first kind.

(c) Given K=kK = k, the law of (a1,…,an)(a_1, \ldots, a_n) does not depend on θ\theta. So KK is a sufficient statistic for θ\theta.

(d) KK is a sum of independent Bernoulli variables with means θ/(θ+i)\theta/(\theta + i), i=0,…,n−1i = 0, \ldots, n - 1, so

E[K]=∑i=0n−1θθ+i,Var⁡(K)=∑i=0n−1θ i(θ+i)2.\mathbb E[K] = \sum_{i=0}^{n-1} \frac{\theta}{\theta + i}, \qquad \operatorname{Var}(K) = \sum_{i=0}^{n-1} \frac{\theta\,i}{(\theta + i)^2}.

Check values. For n=3n = 3 and θ=2\theta = 2, the profiles (3,0,0)(3, 0, 0) (three different alleles), (1,1,0)(1, 1, 0) and (0,0,1)(0, 0, 1) (one allele) have probabilities 1/31/3, 1/21/2 and 1/61/6. For n=3n = 3 and θ=1\theta = 1 they are 1/61/6, 1/21/2 and 1/31/3. For n=10n = 10 and θ=2\theta = 2, E[K]=4.03975\mathbb E[K] = 4.03975 and Var⁡(K)=1.80763\operatorname{Var}(K) = 1.80763.

In plain words

Take a few genes from a population in which every mutation makes a new variant and no variant is better than another. Some variants appear once in the sample, some twice, and so on. The formula gives the chance of each such pattern. It depends on a single number, which says how often mutations happen compared with how fast chance removes variants. When that number is large, the sample has many variants, most of them seen once; when it is small, most genes carry the same variant. The surprising part is that only the number of different variants tells you about that single number. How the genes are spread among the variants adds nothing, so it can be used to check whether the variants really are neutral.

Proof

Step 1: the coalescent gives an urn. Follow the genealogy of the sample back in time and stop each lineage at its most recent mutation; the sample genes below that mutation, with no other mutation between, form one allele class. With kk lineages, coalescences happen at rate (k2)\binom{k}{2} and mutations at rate kθ/2k\theta/2. So the next event is a mutation with probability θ/(θ+k−1)\theta/(\theta + k - 1) and a coalescence with probability (k−1)/(θ+k−1)(k - 1)/(\theta + k - 1), and by exchangeability the lineages involved are uniform. Read forward, from one lineage up to nn, this is the Hoppe urn (Hoppe 1984): gene k+1k + 1 is a new allele with probability θ/(θ+k)\theta/(\theta + k), and otherwise it copies the allele of one of the first kk genes, chosen uniformly.

Step 2: the urn gives the formula. Fix a partition of the genes 1,…,n1, \ldots, n into kk classes of sizes n1,…,nkn_1, \ldots, n_k. The urn makes exactly this partition with probability

θk∏i=1k(ni−1)!θ(n),\frac{\theta^k \prod_{i=1}^{k} (n_i - 1)!}{\theta^{(n)}},

because the kk first genes of the classes contribute θ\theta each, a gene that joins a class that has mm genes contributes mm, and the denominators are θ,θ+1,…,θ+n−1\theta, \theta + 1, \ldots, \theta + n - 1. This depends only on the class sizes. The number of partitions of {1,…,n}\{1, \ldots, n\} with aja_j classes of size jj is n!/∏j(j!)ajaj!n!/\prod_j (j!)^{a_j} a_j!. Multiplying, and using (j−1)!/j!=1/j(j - 1)!/j! = 1/j, gives (a).

Step 3: the number of alleles. Summing the probability of Step 2 over all partitions into kk classes gives θk/θ(n)\theta^k/\theta^{(n)} times ∑∏i(ni−1)!\sum \prod_i (n_i - 1)!. This sum counts the permutations of nn elements with kk cycles (each class of size mm can be made into a cycle in (m−1)!(m - 1)! ways), which is ∣s(n,k)∣|s(n, k)|. This proves (b).

Step 4: sufficiency. Dividing (a) by (b), the factors θk\theta^k and θ(n)\theta^{(n)} cancel:

Pr⁡(a∣K=k)=n!∣s(n,k)∣∏j1jajaj!,\Pr(a \mid K = k) = \frac{n!}{|s(n, k)|} \prod_j \frac{1}{j^{a_j} a_j!},

which does not depend on θ\theta. This proves (c).

Step 5: moments. In the urn, gene i+1i + 1 starts a new allele with probability θ/(θ+i)\theta/(\theta + i), independently of the earlier steps, and KK is the number of genes that do. This proves (d). □\square

Consequences

Random permutations. With θ=1\theta = 1, θ(n)=n!\theta^{(n)} = n!, and the formula is ∏j1/(jajaj!)\prod_j 1/(j^{a_j} a_j!), Cauchy's formula for the share of permutations with aja_j cycles of length jj. So the allele counts of a sample with θ=1\theta = 1 have the law of the cycle type of a uniform random permutation. For n=4n = 4 the five profiles have probabilities 1/241/24, 1/41/4, 1/81/8, 1/31/3 and 1/41/4, and KK takes the values 1, 2, 3, 4 with probabilities 1/41/4, 11/2411/24, 1/41/4 and 1/241/24.

Independent Poisson counts. Let Z1,…,ZnZ_1, \ldots, Z_n be independent with ZjZ_j Poisson with mean θ/j\theta/j. Then Pr⁡(Z=a)\Pr(Z = a) is proportional to ∏j(θ/j)aj/aj!\prod_j (\theta/j)^{a_j}/a_j!, so the formula is the law of ZZ given ∑jjZj=n\sum_j jZ_j = n. As n→∞n \to \infty, the number of alleles with jj copies tends to a Poisson variable with mean θ/j\theta/j, for each fixed jj. In particular, a large sample has about θ\theta singletons; for n=10n = 10 and θ=2\theta = 2 the exact mean number of singletons is nθ/(θ+n−1)=20/11n\theta/(\theta + n - 1) = 20/11.

Estimating theta. By (c), all the information about θ\theta is in KK. The log-likelihood is kln⁡θ−ln⁡θ(n)k \ln \theta - \ln \theta^{(n)}, and the maximum likelihood estimate solves k=∑i=0n−1θ^/(θ^+i)k = \sum_{i=0}^{n-1} \hat\theta/(\hat\theta + i). For n=10n = 10 and k=4k = 4, θ^=1.956\hat\theta = 1.956. The Fisher information is Var⁡(K)/θ2≈ln⁡n/θ\operatorname{Var}(K)/\theta^2 \approx \ln n/\theta, so the variance of the estimate falls only like θ/ln⁡n\theta/\ln n: a much larger sample gives little more precision. This is a property of the model, not of the estimator.

Tests of neutrality. Because the law of the counts given KK does not involve θ\theta, one can test neutrality without estimating θ\theta. The Ewens-Watterson test compares the homozygosity ∑i(ni/n)2\sum_i (n_i/n)^2 of the sample with its law given KK (Ewens 2004, Section 11.2.2): too even counts point to balancing selection, too uneven ones to purifying selection or a population expansion.

Clustering. The Hoppe urn without the special role of mutation is the Chinese restaurant process, and (b) is the law of the number of clusters in a sample from a Dirichlet process with concentration θ\theta (Antoniak 1974).

Tightness

Large N and small u. The formula is exact for the coalescent limit. For a finite Wright-Fisher population it is an approximation. For a sample of two genes it gives Pr⁡(same allele)=1/(1+θ)\Pr(\text{same allele}) = 1/(1 + \theta); the exact Wright-Fisher value is the equilibrium homozygosity of the infinite alleles model. With 2N=202N = 20 and u=0.05u = 0.05 (θ=2\theta = 2) that value is 0.3163890.316389, against 1/31/3 from the formula: 5 percent off. With N=50N = 50 and u=0.001u = 0.001 it is 0.8331250.833125 against 0.8333330.833333.

Neutrality. With selection the formula fails. Under heterozygote advantage the allele counts are more even than it predicts, and under purifying selection there are too many rare alleles.

Equilibrium and constant size. The population must have been at equilibrium for a time of order NN generations. After a recent expansion, the sample has too many alleles seen once; after a bottleneck, too few alleles. Population structure also changes the law.

New alleles only. If mutation can make an allele that already exists, as in a stepwise model of microsatellites or in electrophoretic classes of proteins, the formula does not hold. In particular, KK is then not sufficient for θ\theta.

History

Ewens (1972) found the formula and its consequences for estimation and testing; Karlin and McGregor (1972) gave a second proof in the same year. Kingman (1978, 1982) placed it in his theory of partition structures and explained it through the coalescent. Hoppe (1984) gave the urn. Antoniak (1974) found the same law independently in Bayesian statistics, and Watterson (1977) built the test of neutrality on the conditional law given KK.

References

  1. Ewens 1972, the formula for the allele counts of a sample, the sufficiency of the number of alleles and the estimate of theta
  2. Hoppe 1984, the urn that draws a sample with the law of the formula
  3. Warren J. Ewens, Mathematical Population Genetics I, Theoretical Introduction, 2nd edition, Springer, 2004, Section 3.6 (infinitely many alleles models, p. 111), Section 9.5 (sample properties of the infinitely many alleles model, p. 301) and Section 11.2.2 (the Ewens and Watterson tests, p. 349)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/98RRBF/text.yaml