1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<HTML>
<HEAD>
<TITLE>Chi-square and Weights</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<P><font size="+2" color="green">Chi-square and weights</font></P>
<TABLE border="1" width="608">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%" valign="center">
<code>
FIT\WEIGHTS w y=expression<br />
FIT\WEIGHTS\-ZEROS w y=expression<br />
FIT\WEIGHTS\TOLERANCE w eps y=expression<br />
FIT\WEIGHTS\ITMAX w n y=expression<br />
FIT\WEIGHTS\ITMAX\TOLERANCE w n eps y=expression<br />
FIT\WEIGHTS\-ZEROS\ITMAX w n y=expression</code>
</td></tr>
</TABLE>
<P>
The weight at each point defaults to one (<CODE>1</CODE>), if a weight vector
is not entered. Weights only make sense with a normal distribution, and
are ignored when used with the <code>\POISSON</code> qualifier.
<P>
To make use of a weight array, the <code>\WEIGHTS</code> qualifier <EM>must</EM> be entered. If the
<code>\WEIGHTS</code> qualifier is used, the weight vector, <TT>w</TT>, will then be expected. The
weights are assigned to the dependent variable in a one-to-one fashion, that is, the
weight vector must be the same length as the data vector, <TT>y</TT>. If the <code>\ITMAX</code>
qualifier is used, the weight comes before the iteration maximum in the command parameter list. If the
<code>\TOLERANCE</code> qualifier is used, the iteration maximum comes before the tolerance in
the command parameter list.</P>
<P>
By default, the zero elements of the weight vector are used when calculating the number of degrees of
freedom. If the <code>\-ZEROS</code> qualifier is used with the <code>\WEIGHTS</code> qualifier, then
the zero elements of the weight vector will not be used when calculating the number of degrees of
freedom. This could have an affect on the calculation of the confidence level, the
<code>χ<sup>2</sup></code> per degrees of freedom, and <code>E2</code>, the root mean square total
errors of estimate.</P>
<P>
If the <code>\CHISQ</code> qualifier is used, a new scalar, named
<font color="orange"><code>FIT$CHISQ</code></font>, will be made with value equal to the total</p>
<p>
<center><font size="+1"><code>χ<sup>2</sup> = ∑
w<sub>k</sub>[y<sub>k</sub> - <i>f</i>(x<sub>k</sub>,p<sub>min</sub>)]<sup>2</sup></code></font></center></p>
<p>
where <code>w<sub>k</sub></code> represents the optional weight at each data point
<code>y<sub>k</sub></code>, <i>f</i> is the expression to be fitted, and <code>p<sub>min</sub></code>
are the best values of the parameters, <code>p</code>.</P>
<P>
<a href="normaldist.htm"><img src="../shadow_left.gif">
<font size="+1" color="olive">Normal distribution</font></a><br />
<a href="hint.htm"><img src="../shadow_right.gif">
<font size="+1" color="olive">Hint for physicists</font></a></P>
</BODY>
</HTML>
|