When we perform a chi-square test, the null hypothesis is that the observed value minus the expected value equals zero, which is the same thing as saying that the observed value equals the expected value. Of course, they are not often the same, and the test allows us to determine the probability that the difference arose by chance alone. It is common in biology to choose a probability of 5% as a cut-off. If the probability that the differences arose by chance alone is greater than 5% (p > .05), we accept that the observed and expected are the same. If the probability is less than 5% (p < .05), we decide that some factor other than chance has caused the difference, i.e., that it is real.
Nevertheless, the same rules of probability tell us that if we choose the 5% "confidence level", we will incorrectly conclude that a chance difference has an external cause about 5% of the time. In the box above, you can choose the number of progeny to be generated in a dihybrid cross, and the number of times that the dihybrid cross is generated (each time uses different random numbers). The program then performs the crosses and keeps track of how many of the crosses give p < .05. In theory, you could expect this to occur 5% of the time.