Gregor Mendel was fascinated by the natural world and used math, such as statistics, to support his ideas. By carefully observing patterns, he was able to explore meteorology, one of his passions because it involved detailed records. He was curious if traits were passed from parents to offspring through blending (the common belief at the time).
So he did something unusual: he tested it. When he took pure-breeding lines and crossed them for visible markers, he investigated the offspring through several generations. He noted patterns in the ratios of offspring.
If inheritance is a simple dominant/recessive interaction, offspring from crosses between diploid organisms of a known genotype can be easily predicted. Likewise, if you know the ratio of offspring from a cross, you should be able to elucidate the genotypes of the parents.
Hey, you can try it out in the modules at the bottom!
The left link lets you try it out for a monohybrid. The right link is for dihybrid crosses.
Remember that you shouldn't put in every single genotype that would result in the offspring: when asked to put in "all possible" genotypes, you should ensure that ratios are considered: a testcross could theoretically have large numbers of all mutant or all wild-type progeny. Ordinarily, a single phenotype that shows up which contradicts the hypothesis (the proposed genotypes of the parents) would indicate that either the hypothesis is wrong or a new mutation is involved. These exercises, however, are intented to help you master your skills of interpreting the data as they are. Assume no mutations or ratios that are skewed by improbable variability. That is, assume a 3:1 ratio is indeed 3:1 and not due to random variability from some other ratio.