
Chi-Square Tests Using Google Sheets
Using Google Sheets for Chi-Square Tests
First, open a new Google spreadsheet. You will create a table that has the frequency of each allele as rows and the generations (generation 0, or the start, and generation 150) as columns.
Once you’ve created your table, you should fill in the total count of each allele in the appropriate cell. In your earlier tables, you recorded the allele proportions, but the chi-square formula requires the actual number of each allele.
The formula for calculating allele frequency is (total number of fish)*(allele proportion).
So, if you start with 200 koi fish and an allele proportion of 0.5 for R, the total number of R alleles present in the population is 200. (Remember, each koi fish has 2 alleles, so a population of 200 fish means 400 alleles, and half of them are R to start.) A population of 75 koi fish means a total of 150 alleles.
Type in the number of R and r alleles for both the starting population (generation 0) and the ending population (generation 150).
Next, type in the formula to run a chi-square test. In Google Sheets, the formula follows the convention
=CHISQ.TEST(observed_ values_range, expected_ values_range)
The observed_range are the allele frequencies at generation 150. The expected_range are the allele frequencies at the start (generation 0).

In the cell where the formula is typed, Google Sheets will return the p-value for your chi-square test. A p-value greater than 0.05 suggests that your koi fishpond population is indeed at equilibrium. :::
Run a chi-square test for both trial 1a and 1b and record your p-values for each.