Consider2 models A and B. Model A (5 free parameters) is nested within B (6 freeparameters). Imagine that we do an experiment and acquire data from N = 21participants. We fit models A and B to each individual dataset by minimizingPearson's chi-square statistic. Chi-square values are generally lower for modelB than model A, indicating a better goodness-of-fit for model B. I would liketo test whether the improvement in goodness-of-fit for Model B is significantby doing a chi-square test for nested models. I am not sure about how toperform this test. I think I have to compute the difference chi-sq (modelA) -chi-sq (modelB). Remember that the sample size N = 21, so I get 21 chi-squaredifference values. These values should be generally positive, because thegoodness-of-fit is generally worse for model A. The difference should follow achi-square distribution with a number of degrees of freedom df(diff) = df(modelB) - df(model A) = 1. Am I correct? What can I donext ?