Science Gateway > Protocols > Cell Biology Protocols - Table of Contents
Star Republic: Guide for Biologists

Chi-square test

c2-test is frequently used in biology to find out whether observed data is different from expected results.

For example in a cross of flies, we found that 23 progenies are female and 47 are male.

ObservedExpectedTotal
Male233558
Female473582
Total7070140

For this simple example, there are only 2 columns (observed and expected) and 2 rows (male and female), thus the degree of freedom

df = (number of columns - 1) * (number of rows - 1) = 1.

c2 is calculated using the following formula:

c2 = S (Observed Value - Expected Value)2 / (Expected Value).

Note in this version of c2-test the expected value is calculated from a hypothesis (i.e., the frequency of male or female progenies should be 0.5).

For the above example, c2 = (23-35)2/35 + (45-35)2/35 = 7.11.

Checking the c2 table

Probability
Degrees of
Freedom
0.9 0.5 0.1 0.05 0.01
1 0.02 0.46 2.71 3.84 6.64
2 0.21 1.39 4.61 5.99 9.21
3 0.58 2.37 6.25 7.82 11.35
4 1.06 3.36 7.78 9.49 13.28
5 1.61 4.35 9.24 11.07 15.09

we find p < 0.01.

Web c2 calculator