In case of the genes that assort independently in a test cross, the phenotypic ratio is 1: 1: 1: 1. In the given case, the total number of phenotypes is 400, thus, every phenotype should be 100 each. Since that is not the case, it may be concluded that the genes are not assorting independently.
Thus, to determine the chi-square = (observed-expected)^2 / expected.
By putting the values, we get the values of chi-square as
AB = 4.84
Ab = 3.24
aB = 3.61
ab = 4.41
Thus, the chi-square value will be the addition of the individual values that comes out to be 16.1. Here there are three degrees of freedom (Number of classes-1). Observing at the P table, this puts the value of P < 0.005.
A large chi-square value suggests that independent assortment actually did not occur as the expected and the observed values were very distinct.