Figure 1: Two examples of calculating codon volatility.
From: Detecting selection using a single genome sequence of M. tuberculosis and P. falciparum

The volatility of each codon depends only on the structure the genetic code. The codon CGA, encoding arginine, has eight potential ancestor codons; that is, non-stop codons that differ from CGA by one point mutation. Four of the potential ancestor codons of CGA encode an amino acid different from arginine. Thus the volatility of CGA equals 4/8. The codon AGA also encodes arginine but has a volatility of 6/8. There are 22 codons that have at least one synonym with a different volatility. We use volatility to quantify the chance that the most recent accepted mutation to a site caused an amino-acid change. Letters in parentheses are one-letter amino-acid codes.