Genetic crosses

Checks whether the offspring you counted fit the ratio Mendelian genetics predicts, using a chi-square goodness-of-fit test.

The biology

Each fly carries two copies of every autosomal gene. When parents are crossed, each passes one copy at random, so offspring phenotypes fall into predictable ratios: a monohybrid cross of two heterozygotes gives 3 : 1 (dominant : recessive), a dihybrid cross 9 : 3 : 3 : 1, a test cross to a homozygous recessive 1 : 1.

X-linked genes such as white (w1118) break the symmetry between sexes, because males have one X. That is why reciprocal crosses with white give different results in sons and daughters: score each sex as its own category.

How to use it
  1. Pick the cross, or choose Custom and type your own ratio.
  2. Name each phenotype class and type how many offspring you scored in it.
  3. The table, chart and test update as you type. Download the CSV for your report.
Reading the results

Expected is what the ratio predicts for your total. The chart puts observed and expected side by side.

If p ≥ 0.05, your counts are consistent with the predicted ratio: the differences are the size chance alone would usually produce. If p < 0.05, they are not, which can mean linkage, a lethal genotype, mis-scored flies, or a wrong assumption about the parents' genotypes.

The statistics χ² = Σ (observed − expected)² / expected degrees of freedom = number of classes − 1

The p-value is the chance of a χ² at least this large if the ratio were true. A good fit never proves the hypothesis; it only fails to reject it.

Tips & common mistakes
  • Every expected count should be 5 or more; with fewer flies the test is unreliable (a warning appears).
  • Use raw counts, never percentages.
  • Score virgin-collected crosses only: a non-virgin female can carry sperm from her brothers.

Observed vs expected

1 · Cross

2 · Counts

3 · Export