Newsgroups: bit.listserv.stat-l
Date:         Fri, 6 Nov 1992 15:22:43 MEZ
From:         Suitbert Ertel <SERTEL@DGOGWDG1.BITNET>
Subject:      Chisquare probabilities

********************** Request **************************************
>Date:         Thu, 5 Nov 1992 18:55:27 CST
>From:         SOCLYMAN@MIZZOU1.BITNET
>Subject:      Precision Probability for Chi Square statistics
>
>  I have a set of chi square statistics (goodness of fit measures)
>that I wish to compare.  I have used the PROBCHI function in SAS
>(probability = PROBCHI (value, df)) to estimate the probability
>of each chi square value.  I've run into the problem that the
>function cannot produce a probability value precise enough to
>distinguish between the significance of chi square values.
>For example,
>
>For example,
>   chi-square     df      probability (from probchi)
>      25.62       1       0.00000
>      43.0        3       0.00000
>      48.90       4       0.00000
>     42.80       5       0.00000
>
>Obviously there's not much difference in the "fit" of these
>models, but I would like to be able to distinguish among
>them, if possible.
>  Does anyone know of a way to make probchi give greater
>precision, or of an alternative program, or a *book* or
>(heaven forfend!) a formula for *calculating* the differences
>myself?
>
>Katherine Lyman
>Dept. of Sociology
>U. Missouri-Columbia
<soclyman@mizzou1
********************** Reply **************************************

Why don't you try :
-------------------------------------------------------------
      SC  (Statistical Calculator from Mole Software)
-------------------------------------------------------------
Here is a copy of a log-file obtained by solving you "problem".

> Chisq(25.62,1)             && That's what you type on the blank SC screen
	 4.1570832e-007      && The result you will find underneath
> Chisq(43,3)                && Precise enough?
	 2.4610019e-009
> Chisq(48.9,4)
	 6.1261511e-010
> Chisq(42.8,5)
	 4.0565224e-008
-------------------------------------------------------------
              The syntax of this command:
-------------------------------------------------------------
f  Chisq(x,v) - area to right of x in Chisquare distribution
         x   -> lower limit of integration
           v -> degrees of freedom (may be fractional)
=> area to right of x (probability of Chisquare exceeding x)
m  uses 1-gamma(x/2,v/2) for fractional df
e.g.
   Chisq(1.96 ^ 2, 1)     # about 0.05
   chisqQ(L1,1)           # 1.96 ^ 2 (3.8416)
-------------------------------------------------------------
There is another command providing critical values of Chisquare

f  chisqQ(p,v) - critical value of Chisquare (inverse Chisquare)
          p   -> a probability
            v -> degrees of freedom (may be noninteger)
=> the value that will be exceeded with probability p
e.g.
   chisqQ(0.05,29)  # 0.05 critical value with 29 degrees of freedom
   Chisq(L1,29)     # 0.05
-------------------------------------------------------------
All these commands can be used in easy-to-make programs (C++)
advisable,e.g., if you don't like to input numbers manually...

Mole Software
23 Cable Road
Whitehead, CO.Antrim BT38 9PZ, N.Ireland
e-mail: fbgj23@uk.ac.ulster.ujvax
(Dr. Tony Dusoir)

Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU