View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 2.72 KB File ID: #41775 Version: 1.0



James Conder (view profile)


Test whether addition of model parameters is warranted by improvement of data misfits.

| Watch this File

File Information

This function uses an F-test to determine the likelihood that an observed improvement of a fit to data warrants the use of additional parameters.

>> [ p, Fstat, df1, df2 ] = ftest(n,np1,np2,chi1,chi2)

The function requires five inputs: n is the number of data to be fit. np1 & np2 are the numbers of free parameters used in the two models. chi1 and chi2 are sums of the squares of the misfits to the data for the two models.

Primary output is p. p is the probability (between 0 and 1) that the improvement of the fit is due to chance. Therefore a small value of p means a high confidence that the additional parameters are warranted.

Function written for (and examples may be found in):
Anderson, K.B., and Conder, J.A., 2011, Discussion of Multicyclic Hubbert modeling as a method for forecasting future petroleum production, Energy and Fuels,

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
26 Jan 2017 Peter Sandor

20 May 2013 Ai Lishu

Contact us