Calculate phenotypic ratios from observed phenotype counts, with percentages, the closest classic genetic ratio, and chi-square fit.

Enter 2–50 nonnegative values separated by commas, spaces or semicolons. Counts must be whole numbers; no thousands separators.

Labels and prespecified expected ratio
Optional comma-separated labels, one per class.

Optional, such as 3:1. Choose before examining the counts; preserve phenotype order.

Calculator Functions

FunctionWhat it doesWhat it requires
Observed countsReduces counted offspring in each phenotype class to the simplest whole-number ratio, and can test the counts against an expected ratioRequires 2 to 50 whole-number counts in class order. Class labels and an expected ratio such as 3:1 are optional
Relative frequenciesReduces proportions or percentages for each phenotype class to a ratioRequires 2 to 50 values with up to six decimal places. Class labels are optional

Values can be separated by commas, spaces or semicolons. Both functions also give each class as a percentage of the total, the ratio relative to the smallest class and, for two, three or four classes, the classic Mendelian ratio the data sit closest to.

Phenotypic Ratio Formulas

Ratio = n1 ÷ g : n2 ÷ g : …
niCount in phenotype class i
gGreatest common divisor of all the counts

A phenotypic ratio lists how many offspring show each phenotype, in a fixed class order, reduced to the smallest whole numbers. Counts of 30 and 10 share a divisor of 10 and reduce to 3 : 1.

Observed counts

The ratio formula above applies directly. Real counts rarely share a large divisor, so 315, 108, 101 and 32 stay as 315 : 108 : 101 : 32. The percentages and the ratio to the smallest class show the pattern instead.

Share = ni ÷ N × 100
Relative = ni ÷ nmin

N is the total count and nmin is the smallest class. For the four counts above the shares are 56.65%, 19.42%, 18.17% and 5.76%, and the ratio to the smallest class is 9.84 : 3.38 : 3.16 : 1, close to 9 : 3 : 3 : 1.

With an expected ratio entered, the calculator runs a chi-square goodness-of-fit test.

χ² = Σ (O − E)² ÷ E [1]
E = N × w ÷ Σw

O is the observed count in a class, E is the expected count and w is that class’s weight in the expected ratio. The degrees of freedom are the number of classes minus one, since the ratio is fixed in advance and nothing is estimated from the data [1]. The expected ratio is rejected at the 0.05 level when χ² is larger than the critical value: 3.841 for 1 degree of freedom, 5.991 for 2, 7.815 for 3 and 9.488 for 4 [2]. Against 9 : 3 : 3 : 1, the counts above give expected values of 312.75, 104.25, 104.25 and 34.75 and χ² = 0.47, well under 7.815, so the ratio is not rejected.

The calculator shows no decision when any expected count is below 5, because the test needs a large enough sample for the chi-square approximation to hold [1]. It carries critical values for 1 to 9 degrees of freedom.

Relative frequencies

Decimals are first scaled to whole numbers by the same power of ten, then reduced the same way. Proportions of 0.75 and 0.25 become 75 and 25, which reduce to 3 : 1. This function reports shares and the closest classic ratio only. It runs no chi-square test, because the test needs actual counts.

Closest classic ratio

When no expected ratio is entered, the calculator compares the data with textbook ratios and names the nearest. For two classes these are 1:1, 3:1, 9:7, 13:3 and 15:1. For three they are 1:2:1, 9:3:4, 12:3:1 and 9:6:1, and for four, 9:3:3:1. The 9:7, 15:1, 9:3:4 and 12:3:1 ratios come from two interacting genes and are sums of the 9:3:3:1 classes of a dihybrid cross: complementary gene action, duplicate gene action, recessive epistasis and dominant epistasis [3]. The comparison sorts the classes by size and ignores their labels, so it is a hint to check, not a test.

Limits of This Estimate

  • A ratio does not identify the genetics behind it. Different crosses and gene interactions can produce the same numbers.
  • The chi-square decision assumes independent offspring and an expected ratio chosen before looking at the counts. Picking the ratio that fits best and then testing it overstates the agreement.
  • Failing to reject a ratio is not proof of it. Small samples can fit several ratios at once.

Sources