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