|
| Function | Chi-square merit function. |
|
| Syntax C/C++ | #include <VFstd.h>
float VF_chi2( fVector X, fVector Y, fVector InvVar, ui size ); |
| C++ VecObj | #include <OptiVec.h>
T vector<T>::chi2( const vector<T>& Y, const vector<T>& InvVar ); |
| Pascal/Delphi | uses VFstd;
function VF_chi2( X, Y, InvVar:fVector; size:UIntSize ): Single; |
|
| Description | c2 = sum( 1/si2 * (Xi - Yi)2 ).
The c2 (chi-square) merit function is most often used to judge the quality of a fit. One vector (either X or Y) represents experimental values that are obtained with individual standard deviations sigmai, the other contains the values predicted on the basis of a theory or a model. If the experimental data are "normally" distributed, and if s (sigma) is the correct measure for the quality of these data, then c2 is a measure for the quality of the fit. Rather than the standard deviations themselves, the routine needs the inverse of their squares (i.e., the inverse of the variances) to be passed as the vector InvVar. |
|
|
| Return value | chi2 merit function. |
|
|