next up previous index
Next: Fitting in Maple Up: Fitting Previous: Fitting in Maxima

   
A Summary of $\chi ^2$ Fitting Formulas

To wrap up, let us summarise what we have accomplished  so far:

 
$\displaystyle S_\sigma$ = $\displaystyle \sum_i^N \frac{1}{\sigma_i^2}$ (2.1)
Sx = $\displaystyle \sum_i^N \frac{x_i}{\sigma_i^2}, \qquad
S_y
= \sum_i^N \frac{y_i}{\sigma_i^2}$ (2.2)
Sxx = $\displaystyle \sum_i^N \frac{x_i^2}{\sigma_i^2}, \qquad
S_{xy}
= \sum_i^N \frac{x_i y_i}{\sigma_i^2}$ (2.3)
a = $\displaystyle \frac{S_{xx}S_y - S_x S_{xy}}
{S_\sigma S_{xx} - \left(S_x\right)...
...uad
b = \frac{S_\sigma S_{xy} - S_x S_y}
{S_\sigma S_{xx} - \left(S_x\right)^2}$ (2.4)
$\displaystyle \sigma_a$ = $\displaystyle \sqrt{\sum_{k=1}^N \left(\sigma_k \frac{\partial a}{\partial y_k}...
...xx} - x_k S_x}
{\sigma_k^2 \left(S_{xx} S_{\sigma} - \left(S_x\right)^2\right)}$ (2.5)
$\displaystyle \sigma_b$ = $\displaystyle \sqrt{\sum_{k=1}^N \left(\sigma_k \frac{\partial b}{\partial y_k}...
...S_\sigma - S_x}
{\sigma_k^2 \left(S_{xx} S_\sigma - \left(S_x\right)^2 \right)}$ (2.6)
$\displaystyle \chi^2$ = $\displaystyle \sum_{i=1}^N \left(\frac{y_i - a - b x_i}{\sigma_i}\right)^2$ (2.7)
Q = $\displaystyle \frac{1}{\Gamma\left(\frac{N-2}{2}\right)}
\int_{\chi^2/2}^\infty e^{-t} t^{\frac{N-2}{2} - 1} \, \textrm{d} t$ (2.8)

where Q is the so called goodness of fit and $\Gamma$ is the Euler gamma  function. Q  is the probability that a value of $\chi ^2$ as poor as the one obtained in your calculations, using your values of xi and yi, would have occurred by chance. The value of Q is between 0 and 1. The closer Q is to 1, the more trustworthy is your theory which has assumed a linear dependence of y on x.


next up previous index
Next: Fitting in Maple Up: Fitting Previous: Fitting in Maxima
Zdzislaw Meglicki
2001-02-26