Calculate the significance using the F test
calc_ftest(dof_1, stat_1, dof_2, stat_2);
The calc_ftest command computes the significance using the F test with the degrees of freedom of the simple model (dof_1) and its best-fit statistic (stat_1), the degrees
of freedom of the complex model (dof_2) and its best-fit statistic (stat_2).
- dof_1: degrees of freedom of the simple model
- stat_1: best-fit statistic of the simple model
- dof_2: degrees of freedom of the complex model
- stat_2: best_fit statistic of the complex model
The F-test is a model comparison test. Model comparison
tests are used to select from two competing models that which best describes a
particular dataset. A model comparison test statistic, T, is created from the
best-fit statistics of each fit; as with all statistics, it is sampled from a
probability distribution p(T). The test significance is defined as the integral of
p(T) from the observed value of T to infinity. The significance quantifies the
probability that one would select the more complex model when in fact the null
hypothesis is correct. A standard threshold for selecting the more complex model is
significance > 0.05 (the "95% criterion" of statistics).
The F-test may be used if:
-
the simpler of the two models is nested within the other, i.e., one can obtain
the simpler model by setting the extra parameters of the more complex model to
default values, often zero or one;
-
those normal distributions are not truncated by parameter space boundaries;
-
and the best-fit statistics for each fit individually are sampled from the
chi-square distribution.
If these conditions are fulfilled, then the observed F statistic is sampled from the
F distribution, whose shape is a function of dof_1 and dof_2. (The tail integral may
be computed analytically using an incomplete beta function; see any basic statistics
text for details.) If these conditions are not fulfilled, then the F-test
significance may not be accurate.
sherpa> calc_ftest(2, 20.28, 34, 33.63);
Calculate the F statistic for where the simple model has 2 degrees of freedom and a best-fit statistic of 20.28 and the complex model has 34 degrees of freedom and a best-fit statistic of 33.63.
- py.sherpa
-
get_staterror,
get_syserror
- sl.sherpa
-
calc_data_sum,
calc_data_sum2d,
calc_kcorr,
calc_mlr,
calc_model_sum2d,
calc_source_sum2d,
clean,
contour,
contour_data,
contour_ratio,
copy_data,
dataspace1d,
dataspace2d,
delete_data,
get_axes,
get_bkg_plot,
get_counts,
get_data,
get_data_plot,
get_default_id,
get_dep,
get_dims,
get_error,
get_filter,
get_rate,
get_ratio,
get_resid,
get_specresp,
get_staterror,
get_syserror,
group,
histogram1d,
histogram2d,
image_data,
list_data_ids,
list_response_ids,
load_ascii,
load_data,
plot_data,
rebin,
set_data,
ungroup,
unpack_ascii,
unpack_data
|