When fitting experimental data to mathematical models, one often is confronted with the question of whether a more complicated model (e.g. one with more diffusion times) represents a “better fit.” Answering this question is a seven step process:
It should be pointed out that the F-test does not enable us to compare different models with the same number of parameters and, therefore, the same degrees of freedom (e.g. one component diffusion with system response correction vs. two component diffusion without system response correction). Fundamentally, the F-test asks whether the addition of parameters statistically improves the fit.
The following examples will walk you through the process of applying the above model comparison procedure.
Below, we have provided an example of applying the above procedure to the process of fitting fluorescence correlation spectroscopy (FCS) data to two models: one component diffusion without system response correction and one component diffusion with system response correction.
The FCS model with the fewest parameters is that of one component diffusion:
In Figure 1, we show a correlation function obtained for Rhodamine 6G in a 10% glycerol, 90% water solution (blue). The one-component fit to this correlation curve is shown in red.
The results of the fit are:
where Degrees of Freedom is equal to the number of data points - (number of parameters - 1), that is, 176-(2-1)=175, and SSE is the sum of the squares of the residuals.
We look at the fit. It does a reasonable job of fitting the data in the beginning, then systematically over estimates the curve, and finally under estimates it. This is most clearly seen in the residuals (Figure 2), which are the differences between the data and the fitted curve. The residuals of a good fit fluctuate randomly and tightly about zero. In our data, we instead see large systematic variations, so we conclude that this model is not the best fit to our data and move on to Step 3.
The net effect of the systematic variations in the one-component fit is that the obtained τD of 1.1 msec is faster than the value expected. We are expecting a number in excess of 3.0 msec because the beam radius is 1.8 um for the system used and the diffusion coefficient of Rhodamine 6G is ~2.8 cm2/sec. Because the results do not make physical sense, so we reject this fit and move on to Step 4.
We refit the data to the more complex model of one-component diffusion with system reponse:
The resulting fitted curve is shown in Figure 3.
The results of the fit are:
where A is a system response correction factor and TauC is the correlation time of the system response.
The degrees of freedom are reduced by two because we have added the parameters τC and A.
The residuals of the fit to the model of one-component with system response are shown in Figure 4, below.
The fit looks reasonable (Figure 3), except perhaps near the end. And this is confirmed by the fact that the residuals (Figure 4) are more tightly varying about zero.
We look at the fitted parameters. The τD of 3.3 ms is just what we are expecting from what we know of the physical characteristics of the sample, so we don't reject this fit yet.
We need, of course, to put our intuition on firm statistical grounds, so we perform an F-test to compare the two fits. The F-test asks the question: "What is the probability, p, that adding these two parameters improves the SSE by random chance?" We will set our threshold at < .05, or 5%, to consider the improvement real. One calculates the F-value with the following equation:
where we have used DoF to denote degrees of freedom and model 2 is the more complex model. Note that it is assumed that SSE for model two is smaller than SSE for model one. If not, F is negative and you have not improved the fit.
We can find the probability, p, associated with our F-value by consulting a table of F-values (see for instance F-value table) or using a calculator such as F-test Probability Calculator. To use these tools, we define the numerator degrees of freedom, DoFn to be DoF2 - DoF1 and the denominator degrees of freedom, DoFd to be DoF2. In general, the smaller the F-value is, the more likely it is that the improvement is due to random chance. This means that large F-values indicate a higher probability that the more complex model is correct.
In the present example, F = 26.6. Using a calculator, we see that for DoFn = 2, DoFd = 173, and F = 26.6, p < 1x10-10. We therefore conclude that the addition of parameters is justified and choose the more complex model. (Alternatively, we can look up the F-value corresponding to p = 0.05, F0.05, for our DoF values. Since our value of F = 26.6 is greater than F0.05 = 3.05, we can conclude that the more complex model is correct.)
Below, we have provided an example of applying the above procedure to the process of fitting fluorescence correlation spectroscopy (FCS) data to two models: one component diffusion with system response correction and two component diffusion with system response correction.
We fit the data to the simpler model of one-component diffusion with system reponse, using the following equation:
The resulting fitted curve is shown in Figure 1.
The results of the fit are:
where Degrees of Freedom is equal to the number of data points - (number of parameters - 1), that is, 176-(2-1)=175, and SSE is the sum of the squares of the residuals.
The residuals of the fit to the model of one-component with system response are shown in Figure 2, below.
The fit looks reasonable (Figure 1), except perhaps near the end.
We look at the fitted parameters. The τD of 3.3 ms is just what we are expecting from what we know of the physical characteristics of the sample, so we don't reject this fit yet.
Recalling how the residuals deviate systematically for long times in Figure 2, we fit the data to a two component fit with system response. The resulting fitted curve is shown in Figure 3, below.
The residuals of the fit to the model of two component with system response are shown in Figure 4, below.
The fitted curve looks quite reasonable and does not have the residuals do not show systematic deviations at long times as seen with the one component fit with system response (Figure 1).
The results of the fit using the two component model with system response are shown below:
The fit produces a τD1 that is slightly faster than the last fit, 2.3 ms, and a τD2 of 230ms that corresponds to 4% of the population. This could be some kind of slow moving aggregate or a small amount of bleaching, so, we do not reject it outright.
The F-test asks the question: "What is the probability, p, that adding these two parameters improves the SSE by random chance?" We will set our threshold at < .05, or 5%, to consider the improvement real. One calculates the f-value with the following equation:
where we have used DoF to denote degrees of freedom and model 2 is the more complex model. Note that it is assumed that SSE for model two is smaller than SSE for model one. If not, F is negative and you have not improved the fit.
We can find the probability, p, associated with our F-value by consulting a table of F-values (see for instance F-value table) or using a calculator such as F-test Probability Calculator. To use these tools, we define the numerator degrees of freedom, DoFn to be DoF2 - DoF1 and the denominator degrees of freedom, DoFd to be DoF2. In general, the smaller the F-value is, the more likely it is that the improvement is due to random chance. This means that large F-values indicate a higher probability that the more complex model is correct.
In the present example, F = 1.36 Using a calculator, we see that for DoFn = 2, DoFd = 171, and F = 1.36, p = 0.26. The addition of parameters is not justified using a criterion of p < .05. We, thus, conclude that the best fit is to the single component diffusion with system response correction and do not choose the more complex model. (Alternatively, we can look up the F-value corresponding to p = 0.05, F0.05, for our DoF values. Since our value of F = 1.36 is less than F0.05 = 3.05, we can conclude that the less complex model is correct.)