In a dihybrid cross involving seed colour (yellow Y dominant over green y) and seed shape (round R dominant over wrinkled r), two heterozygous plants (YyRr) were crossed. The F2 generation produced the following phenotypes:
- Yellow, round: 315
- Yellow, wrinkled: 108
- Green, round: 101
- Green, wrinkled: 32
The expected ratio for independent assortment is 9:3:3:1. The formula for the chi-squared test is: χ² = Σ((O - E)² / E).
Describe how you would use a chi-squared test to determine whether the genes for seed colour and seed shape are linked. Include in your answer the null hypothesis, steps to calculate expected numbers, degrees of freedom, and how you would interpret the result.