source: sasview/src/sas/sasgui/perspectives/fitting/media/residuals_help.rst @ bacc04b

Last change on this file since bacc04b was 7805458, checked in by smk78, 9 years ago

Removed unit substitutions as these now handled by rst_prolog

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[ad2ce4e]1.. residuals_help.rst
2
3
4.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
5
6.. _Assessing_Fit_Quality:
7
8Assessing Fit Quality
9---------------------
10
11When performing model-fits to some experimental data it is helpful to be able to
12gauge how good an individual fit is, how it compares to a fit of the *same model*
13*to another set of data*, or how it compares to a fit of a *different model to the*
14*same data*.
15
16One way is obviously to just inspect the graph of the experimental data and to
17see how closely (or not!) the 'theory' calculation matches it. But *SasView*
18also provides two other measures of the quality of a fit:
19
20*  |chi|\  :sup:`2` (or 'Chi2'; pronounced 'chi-squared')
21*  *Residuals*
22
23.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
24
25Chi2
26^^^^
27
28Chi2 is a statistical parameter that quantifies the differences between an observed
29data set and an expected dataset (or 'theory').
30
31*SasView* actually returns this parameter normalized to the number of data points,
32*Npts* such that
33
34  *Chi2/Npts* = { SUM[(*Y_i* - *Y_theory_i*)^2 / (*Y_error_i*)^2] } / *Npts*
35
36This differs slightly from what is sometimes called the 'reduced chi-squared'
37because it does not take into account the number of fitting parameters (to
38calculate the number of 'degrees of freedom'), but the 'normalized chi-squared'
39and the 'reduced chi-squared' are very close to each other when *Npts* >> number of
40parameters.
41
[ff42a26]42For a good fit, *Chi2/Npts* tends to 0.
[ad2ce4e]43
[68f5fbb]44*Chi2/Npts* is sometimes referred to as the 'goodness-of-fit' parameter.
[ad2ce4e]45
46.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
47
48Residuals
49^^^^^^^^^
50
51A residual is the difference between an observed value and an estimate of that
52value, such as a 'theory' calculation (whereas the difference between an observed
53value and its *true* value is its error).
54
55*SasView* calculates 'normalized residuals', *R_i*, for each data point in the
56fit:
57
58  *R_i* = (*Y_i* - *Y_theory_i*) / (*Y_err_i*)
59
60For a good fit, *R_i* ~ 0.
61
62.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
63
64.. note::  This help document was last changed by Steve King, 08Jun2015
Note: See TracBrowser for help on using the repository browser.