code: def f_compare(best_fit, new_fit):
      """Return the probability calculated using the F-test.
  
      The null model (i.e., best-fit solution) is compared to an alternate
      model where one or more parameters are fixed.
  
      Parameters
      ----------
      best_fit : MinimizerResult
          The result from the best-fit.
      new_fit : MinimizerResult
          The result from fit with the fixed parameter(s).
  
      Returns
      -------
      float
          Value of the calculated probability.
  
      """
      nfree = best_fit.nfree
      nfix = best_fit.nvarys - new_fit.nvarys
      dchi = new_fit.chisqr / best_fit.chisqr - 1.0
      return f.cdf(dchi * nfree / nfix, nfix, nfree)
  
file_path: lmfit-py/lmfit/confidence.py
imports: from warnings import warn
  import numpy
  from scipy.optimize import root_scalar
  from scipy.special import erf
  from scipy.stats import f
  from .minimizer import MinimizerException
label_desc: Use image node_id 1 for calling a global function with example usage: f_compare(best_fit, new_fit) and returns: f