Genetics Simulation: Fruit Fly Crosses & Chi-Square
Cross fruit flies for two generations. Do the counts fit 3:1?
Mendelian inheritance predicts crisp offspring phenotypic ratios—such as 3:1 in an autosomal monohybrid F2 cross (60 normal : 20 vestigial per sex in an ideal 160-fly sample)—while reciprocal crosses reveal X-linked traits when male and female offspring ratios diverge. In this interactive 3D genetics simulation, students breed Drosophila fruit flies, classify F1 and F2 phenotypes, and test genetic hypotheses with chi-square statistics.
- 11 languages
- Laptop · tablet · phone
- Members
Create a free account to get 2 lifetime Free Lab Passes for any labs in the library. The course guide on this page stays free.

Inside this lab
- 1
Preview
- Driving question
- What you will predict
- Equipment and safety
- 2
Lab
- Lock in prediction
- Run the experiment, measure and replay
- Your notebook fills in as you go
- 3
Check
- Did the lab agree with you?
- Claim, evidence, reasoning
- Check questions and a printable lab report
How this genetics simulation tests Mendelian ratios and sex linkage
Breeding Drosophila fruit flies across P, F1, and F2 generations turns Punnett-square predictions into quantitative sample counts. Comparing monohybrid autosomal crosses (3:1 expected; ideal 60:20 per sex in a 160-fly sample), reciprocal eye-color crosses (X-linked), and dihybrid crosses lets you use chi-square statistics to distinguish real inheritance mechanisms from random sampling noise.
Apparatus, safety notes, and step-by-step procedure
- Apparatus: 3D Drosophila breeding vials with selectable wild-type and mutant strains (e.g., normal vs. vestigial wings, red vs. white eyes), male/female sorter, anesthetic/microscope classification stage, generation counter (
P,F1,F2, test cross), and chi-square notebook. - Safety note (for physical lab prep): In a real biology lab, use Drosophila anesthesia (such as FlyNap or CO2) only in well-ventilated spaces, keep vials upright, and wash hands after handling media.
- Open the 3D breeding bench in Ideal mode and cross pure-breeding wild-type (normal-wing) flies with vestigial-wing flies (
Pgeneration). - Inspect and tally the F1 offspring by phenotype and sex to identify which wing allele is dominant.
- Cross F1 males and F1 females to generate the F2 generation (
160flies in the ideal reference) and record counts separately for females and males (60normal /20vestigial females;60normal /20vestigial males). - Verify the overall
3:1ratio (120:40) and confirm that male and female ratios match—consistent with an autosomal recessive wing trait. - Run a reciprocal cross on the eye-color trait (white-eyed female × red-eyed male vs. red-eyed female × white-eyed male) and compare F1 male vs. female phenotypes to detect X-linked inheritance.
- Set up a dihybrid cross tracking two traits simultaneously, compute expected
9:3:3:1counts, and check whether the two loci assort independently. - Switch to Real mode (stochastic sampling) on the monohybrid F2 cross, collect a finite sample, and compute chi-square:
X^2 = sum((O - E)^2 / E)withdf = classes - 1. - Compare your calculated
X^2against thep = 0.05critical value (3.84fordf = 1;7.81fordf = 3) to decide whether to retain or reject your genetic model.
Recording table and model reference data
Model reference data — run your own trials in the 3D lab. Values below reflect Ideal deterministic expected counts for the course's
160-fly F2 autosomal wing cross (3:1ratio).
| Trial | Independent Variable (Cross & Generation) | Dependent Variable (Offspring Counts by Phenotype & Sex) | Units | Observation |
|---|---|---|---|---|
| Ref 1 | Ideal F2 wing cross (vg/+ × vg/+), females | 60 normal-wing, 20 vestigial-wing | flies | Exact 3:1 phenotypic ratio among females |
| Ref 2 | Ideal F2 wing cross (vg/+ × vg/+), males | 60 normal-wing, 20 vestigial-wing | flies | Identical 3:1 ratio across sexes confirms autosomal locus |
| Ref 3 | Reciprocal X-linked eye cross (X^w X^w × X^W Y) | All F1 females red-eyed; all F1 males white-eyed | flies | Criss-cross sex asymmetry diagnoses X-linked inheritance |
| Your Trial | Record cross, parental sex, generation, mode | Record O, E, (O-E)^2/E, total X^2, df | flies | Never pool male and female counts before checking sex linkage |
Lab report outline (blank template)
- Title: State the traits and inheritance mode investigated (autosomal monohybrid, X-linked reciprocal, or dihybrid chi-square).
- Purpose: Define how breeding crosses and chi-square analysis test Mendelian inheritance models.
- Hypothesis: Write explicit expected genotypes and phenotypic ratios (
3:1,1:1, or9:3:3:1) for F1 and F2 offspring. - Variables: Identify parental strain genotypes and cross direction (independent); observed offspring phenotype and sex counts (dependent); sample size and mode (controlled).
- Data Table: Log phenotypic class, sex, Observed (
O), Expected (E), and(O - E)^2 / Efor every cross. - Analysis & Calculation: Draw Punnett squares for each cross, calculate total
X^2anddf, and compare againstp = 0.05critical thresholds. - Conclusion & Sources of Error: Explain whether data support autosomal vs. X-linked inheritance and discuss how small sample size or chance sampling fluctuation in Real mode affects
X^2without invalidating Mendel's laws.
Continue exploring genetics and evolution
Examine gamete crossing over in Meiosis & Crossing Over, track allele frequencies over time in Population Genetics & Drift, or browse Biology Simulations.
Common questions
How do you distinguish an autosomal trait from an X-linked trait in fruit fly crosses?
Run reciprocal crosses (swapping which parent sex carries the mutant allele): autosomal traits give matching F1 and F2 ratios in both directions and across both sexes, whereas X-linked traits show sex-specific criss-cross inheritance.
Why do real F2 fruit fly counts rarely match an exact 3:1 or 9:3:3:1 ratio?
Fertilization combines gametes randomly, so finite samples show binomial sampling variation around expected ratios; a chi-square goodness-of-fit test determines whether deviations are consistent with chance.
How do you calculate chi-square for a genetic cross?
For every phenotypic class, compute (Observed - Expected)^2 / Expected and sum across all classes; compare the total against the critical value for degrees of freedom df = (number of classes - 1) at p = 0.05.
What does an F1 generation reveal when crossing two pure-breeding strains?
If all F1 offspring display one parent's phenotype uniformly (for an autosomal cross), that phenotype is dominant and the hidden parental trait is recessive.
How does a test cross reveal an unknown dominant individual's genotype?
Cross the unknown individual with a homozygous recessive partner: a 100% dominant offspring ratio indicates homozygous dominant (AA), while a 1:1 dominant-to-recessive ratio indicates heterozygous (Aa).
Why do linked genes on the same chromosome deviate from a 9:3:3:1 dihybrid ratio?
Genes located close together on the same chromosome fail to assort independently during meiosis, producing an excess of parental phenotypes and fewer recombinant offspring.
Related interactive labs
- Members
BiologyMeiosis & Crossing Over
Follow bead chromosomes through meiosis, then score spore sacs from a fungus cross.
- Members
BiologyLactase & Lactose Tolerance
Why can some adults digest milk while others can't?
- Members
BiologyPopulation Genetics, Drift & Speciation
Run island populations for 50 generations.