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

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalcmagnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 7b07fbe was 940d034, checked in by Paul Kienzle <pkienzle@…>, 8 years ago

remove latex ambiguity

  • Property mode set to 100644
File size: 2.2 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
[5ed76f8]20*  $\chi^2$ (or 'Chi2'; pronounced 'chi-squared')
[ad2ce4e]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
[5ed76f8]34.. math::
[ad2ce4e]35
[940d034]36  \chi^2/N_{pts} =  \sum[(Y_i - \mathrm{theory}_i)^2 / \mathrm{error}_i^2] / N_{pts}
[5ed76f8]37
38This differs slightly from what is sometimes called the 'reduced $\chi^2$'
[ad2ce4e]39because it does not take into account the number of fitting parameters (to
[5ed76f8]40calculate the number of 'degrees of freedom'), but the 'normalized $\chi^2$
41and the 'reduced $\chi^2$ are very close to each other when $N_{pts} \gg
42\text{number of parameters}.
[ad2ce4e]43
[5ed76f8]44For a good fit, $\chi^2/N_{pts}$ tends to 1.
[ad2ce4e]45
[5ed76f8]46$\chi^2/N_{pts}$ is sometimes referred to as the 'goodness-of-fit' parameter.
[ad2ce4e]47
48.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
49
50Residuals
51^^^^^^^^^
52
53A residual is the difference between an observed value and an estimate of that
54value, such as a 'theory' calculation (whereas the difference between an observed
55value and its *true* value is its error).
56
[5ed76f8]57*SasView* calculates 'normalized residuals', $R_i$, for each data point in the
[ad2ce4e]58fit:
59
[5ed76f8]60.. math::
61
62  R_i = (Y_i - Y_theory_i) / (Y_err_i)
[ad2ce4e]63
[5ed76f8]64For a good fit, $R_i \sim 0$.
[ad2ce4e]65
66.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
67
68.. note::  This help document was last changed by Steve King, 08Jun2015
Note: See TracBrowser for help on using the repository browser.