Step 4 - Plugging Numbers Into The Formula
Now we are ready to work with the entire chi-square formula. We will slowly walk you through the formula. Strictly defined, chi-square is the sum (from each phenotypic class) of the squares of observed values minus expected values, divided by expected values. Although this sounds extremely intimidating to many people the first time they see that, it often seems less so after we plug our values into the formula below.
The formula for calculating the X2 value is:
X2 = Σ (observed – expected)2 / expected
From our example, we will expand our table (Table 2). Notice that for each class, we square the deviations and then divide that number by the expected number in that particular class. The final chi-square value is the sum of all the individual class values.
|Class||Observed (O)||Expected (E)||Deviation (O-E)||(O-E)2||(O-E)2/E|
|X2 Sum =||1.2335|
Watch the tutorial video clip below for further explaining where these numbers came from if it is not clear to you.