CDF's in GSL
Jason Hooper Stover
jason@sakla.net
Sat Aug 30 17:32:00 GMT 2003
On Fri, Aug 29, 2003 at 12:49:17PM -0400, Rajarshi Guha wrote:
> Hello,
> I'm trying to to a chi square goodnes of fit on some of my data.
>
> As far as I understand I need to use assume a distribution and calculate
> the CDF. When I looked up the available CDF's I see that each
> distribution provides two of them: P(X) & Q(x)
>
> I'm a little confused as to which one I should be using. The manual
> states that CDF's are clculated seperately for the upper and lower tails
> - but how do I decide which CDF to use?
The usual way to run a goodness-of-fit test is to compute
pval = Pr(Xsq>t) = gsl_cdf_chisq_Q(t,nu), where t is the test statistic you
compute from your data and nu = degrees of freedom of t.
Then reject the null hypothesis if pval < Pr(type 1 error).
-Jason
>
> A related question is that when I report the final chi sq value the dof
> is defined by (number of non empty cells) - (number of params in the
> distribution) + 1
>
> So say I use the gaussian CDF - that would imply that it is a two
> parameter distribution. Is this correct. If so why does
> gsl_ran_gaussian() take only one parameter?
>
> Thanks,
>
> -------------------------------------------------------------------
> Rajarshi Guha <rajarshi@presidency.com> <http://jijo.cjb.net>
> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
> -------------------------------------------------------------------
> 186,282 miles per second:
> It isn't just a good idea, it's the law!
More information about the Gsl-discuss
mailing list