# Tajima's D: Wikis

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

# Encyclopedia

Tajima's D is a statistical test created by and named after the Japanese researcher Fumio Tajima. The purpose of the test is to distinguish between a DNA sequence evolving randomly ("neutrally") and one evolving under a non-random process, including directional selection or balancing selection, demographic expansion or contraction, genetic hitchhiking, or introgression. A randomly evolving DNA sequence contains mutations with no effect on the fitness and survival of an organism. The randomly evolving mutations are called "neutral", while mutations under selection are "non-neutral". For example, you would expect to find that a mutation which causes prenatal death or severe disease to be under selection.

According to Motoo Kimura's neutral theory of molecular evolution, the majority of mutations in the human genome are neutral, ie have no effect on fitness and survival. When looking at the human population as a whole, we say that the population frequency of a neutral mutation fluctuates randomly (ie the percentage of people in the population with the mutation changes from one generation to the next, and this percentage is equally likely to go up or down), through genetic drift.

The strength of genetic drift depends on the population size. If a population is at a constant size with constant mutation rate, the population will reach an equilibrium of gene frequencies. This equilibrium has important properties, including the number of segregating sites S / , and the number of nucleotide differences between pairs sampled (these are called pairwise differences). To standardize the pairwise differences, the mean or 'average' number of pairwise differences is used. This is simply the sum of the pairwise differences divided by the number of pairs, and is signified by π.

The purpose of Tajima's test is to identify sequences which do not fit the neutral theory model at equilibrium between mutation and genetic drift. In order to perform the test on a DNA sequence or gene, you need to sequence homologous DNA for at least 3 individuals. Tajima's statistic computes a standardized measure of the total number of segregating sites (these are DNA sites that are polymorphic) in the sampled DNA and the average number of mutations between pairs in the sample. The two quantities whose values are compared are both method of moments estimates of the population genetic parameter theta, and so are expected to equal the same value. If these two numbers only differ by as much as one could reasonably expect by chance, then the null hypothesis of neutrality cannot be rejected. Otherwise, the null hypothesis of neutrality is rejected.

## Hypothetical example

Lets say that you are a genetic researcher who finds two mutations, a mutation in a gene which causes pre-natal death and a mutation in DNA which has no effect on human health or survival. You publish your findings in a scientific journal, identifying the first mutation as "under negative selection" and the second as "neutral". The neutral mutation gets passed on from one generation to the next, while the mutation under negative selection disappears, since anyone with the mutation cannot reproduce and pass it on to the next generation.

In order to back your discovery with more scientific evidence, you gather DNA samples from 100 people and determine the exact DNA sequence for the gene in each of these 100. Using all 100 DNA samples as input, you determine Tajima's D on both the detrimental mutation and the 'neutral' DNA. If your hypothesis was correct, then Tajima's Test will output "neutral" for the neutral mutation and "non-neutral" for the gene.

## Scientific explanation

Under the neutral theory model, for a population at constant size at equilibrium:

$E[\pi]=\theta=E\left[\frac{S}{\sum_{i=1}^{n-1} \frac{1}{i}}\right]=4N\mu$

for diploid DNA, and

$E[\pi]=\theta=E\left[\frac{S}{\sum_{i=1}^{n-1} \frac{1}{i}}\right]=2N\mu$

for haploid.

In the above formulas, S is the number of segregating sites, n is the number of samples, and i is the index of summation. But selection, demographic fluctuations and other violations of the neutral model (including rate heterogeneity and introgression) will change the expected values of S and π, so that they are no longer expected to be equal. The difference in the expectations for these two variables (which can be positive or negative) is the crux of Tajima's D test statistic.

$D\,$ is calculated by taking the difference between the two estimates of the population genetics parameter $\theta\,$. This difference is called $d\,$, and D is calculated by dividing $d\,$ by the square root of its variance $\sqrt{\hat{V}(d)}$ (its standard deviation, by definition).

$D=\frac {d} {\sqrt {\hat{V}(d)} }$

Fumio Tajima demonstrated by computer simulation that the $D\,$ statistic described above could be modeled using a beta distribution. If the $D\,$ value for a sample of sequences is outside the confidence interval then one can reject the null hypothesis of neutral mutation for the sequence in question.

## Statistical test

When performing a statistical test such as Tajima's D, the critical question is whether the value calculated for the statistic is unexpected under a null process. For Tajima's D, the magnitude of the statistic is expected to increase the more the history of the population deviates from a history expected under neutrality. In the example below, we show the calculation of this statistic for some data, and find that it is unusual.

In Tajima's Test, the null hypothesis is neutral evolution.

## Mathematical details

$D=\frac {d} {\sqrt {\hat{V}(d)} } = \frac {\hat{k} - \frac{S}{a_1} } {\sqrt {[e_1S+e_2S(S-1)]} }$

where

 $e_1 = \frac {c_1}{a_1}$ $e_2 = \frac{c_2}{a_1^2+a_2}$ $c_1 = b_1 - \frac {1}{a_1}$ $c_2 = b_2 - \frac{n+2}{a_{1}n} +\frac{a_2}{a_{1}^{2}}$ $b_1 = \frac {n+1}{3(n-1)}$ $b_2 = \frac{2(n^{2}+n+3)}{9n(n-1)}$ $a_1 = \sum_{i=1}^{n-1} \frac{1}{i}$ $a_2 = \sum_{i=1}^{n-1} \frac{1}{i^2}$

$\hat{k}\,$ and $\frac{S}{a_1}$ are two estimates of the expected number of single nucleotide polymorphisms (SNPs)between two DNA sequences under the neutral mutation model in a sample size $n\,$ from an effective population size $N\,$

The first estimate is the average number of SNPs found in (n choose 2) pairwise comparisons of sequences (i,j) in the sample

$\hat{k}= \frac { \sum\sum_{i

The second estimate is derived from the expected value of $S\,$, the total number of polymorphisms in the sample

$E(S)=a_1M\,$

Tajima defines $M=4N\mu\,$, whereas Hartl & Clark use a different symbol to define the same parameter $\theta=4N\mu\,$.

## Historical example

The genetic mutation which causes sickle-cell anemia is non-neutral because it affects survival and fitness. People homozygous for the mutation have the sickle-cell disease, while those without the mutation (homozygous for the wild-type allele) do not have the disease. People with one copy of the mutated allele (heterozygous) do not have the disease, but instead are resistant to malaria. Thus in Africa, where there is a prevalence of the malaria parasite Plasmodium falciparum that is transmitted through mosquitos Anopheles, there is a selective advantage for heterozygous individuals. Meanwhile, in countries such as the USA where the risk of malaria infection is low, the population frequency of the mutation is lower.

## Example

Suppose you are a geneticist studying an unknown gene. As part of your research you get DNA samples from four random people (plus yourself). For simplicity, you label your sequence as a string of zeroes, and for the other four people you put a zero when their DNA is the same as yours and a one when it is different. (For this example, the specific type of difference is not important.)

Position 12345 67890 12345 67890
Person Y 00000 00000 00000 00000
Person A 00100 00000 00100 00010
Person B 00000 00000 00100 00010
Person C 00000 01000 00000 00010
Person D 00000 01000 00100 00010

Notice the four polymorphic sites (positions where someone differs from you, at 3, 7, 13 and 19 above). Now compare each pair of sequences and get the average number of polymorphisms between two sequences. There are "five choose two" (ten) comparisons that need to be done.

Person Y is you!

You vs A
Person Y 00000 00000 00000 00000
Person A 00100 00000 00100 00010
3 polymorphisms
You vs B
Person Y 00000 00000 00000 00000
Person B 00000 00000 00100 00010
2 polymorphisms
You vs C
Person Y 00000 00000 00000 00000
Person C 00000 01000 00000 00010
2 polymorphisms
You vs D
Person Y 00000 00000 00000 00000
Person D 00000 01000 00100 00010
3 polymorphisms
A vs B
Person A 00100 00000 00100 00010
Person B 00000 00000 00100 00010
1 polymorphism
A vs C
Person A 00100 00000 00100 00010
Person C 00000 01000 00000 00010
3 polymorphisms
A vs D
Person A 00100 00000 00100 00010
Person D 00000 01000 00100 00010
2 polymorphisms
B vs C
Person B 00000 00000 00100 00010
Person C 00000 01000 00000 00010
2 polymorphisms
B vs D
Person B 00000 00000 00100 00010
Person D 00000 01000 00100 00010
1 polymorphism
C vs D
Person C 00000 01000 00000 00010
Person D 00000 01000 00100 00010
1 polymorphism

The average number of polymorphisms is ${3 + 2 + 2 + 3 + 1 + 3 + 2 + 2 + 1 + 1\over 10} = 2$.

The lower-case d described above is the difference between these two numbers—the average number of polymorphisms found in pairwise comparison (2) and the total number of polymorphic sites (4). Thus d = 2 − 4 = − 2.

Since this is a statistical test, you need to assess the significance of this value. A discussion of how to do this is provided below.

## Significance

A negative Tajima's D signifies an excess of low frequency polymorphisms, indicating population size expansion and/or positive selection. A positive Tajima's D signifies low levels of both low and high frequency polymorphisms, indicating a decrease in population size and/or balancing selection. However, calculating a conventional "p-value" associated with any Tajima's D value that is obtained from a sample is impossible. Briefly, this is because there is no way to describe the distribution of the statistic that is independent of the true, and unknown, theta parameter (no pivot quantity exists). To circumvent this issue, several options have been proposed.

Tajima (1989) found an empirical similarity between the distribution of the test statistic and a beta distribution with mean zero and variance one. He estimated theta by taking Watterson's estimator and dividing it the number of samples. Simulations have shown this distribution to be conservative (Fu and Li, 1991) , and now that the computing power is more readily available this approximation is not frequently used.

A more nuanced approach was presented in a paper by Simonsen et. al. These authors advocated constructing a confidence interval for the true theta value, and then performing a grid search over this interval to obtain the critical values at which the statistic is significant below a particular alpha value. An alternative approach is for the investigator to perform the grid search over the values of theta which they believe to be plausible based on their knowledge of the organism under study. Bayesian approaches are a natural extension of this method.

A very rough rule of thumb to significance is that values greater than +2 or less than -2 are likely to be significant. This rule is based on an appeal to asymptotic properties of some statistics, and thus +/- 2 does not actually represent a critical value for a significance test.

Finally, genome wide scan's of Tajima's D in sliding windows along a chromosomal segment are often performed. With this approach, those regions that have a value of D that greatly deviates from the bulk of the empirical distribution of all such windows are reported as significant. This method does not assess significance in the traditional statistical test, but is quite powerful given a large genomic region, and is unlikely to falsely identify interesting regions of a chromosome if only the greatest outliers are reported.

## References

[1] Statistical Method for Testing the Neutral Mutation Hypothesis by DNA Polymorphism. Fumio Tajima. Genetics, 123: 585-595.
[2] Principles of Population Genetics, 4th ed. Daniel L. Hartl & Andrew G. Clark. Sinauer Associates, Inc. 2007
[3] Properties of Statistical Tests of Neutrality for DNA Polymorphism Data, Genetics, 1995

## Computational tools for Tajima's D test

• [4] DNAsp (Windows)
• [5] Variscan (Mac OS X, Linux, Windows)
• [6] Arlequin (Windows)
• [7] Online view of Tajima'S D values in human genome
• [8] Online computation of Tajima's D
• MEGA4