Ivan Johansen | 10 Jul 2006 12:20
Picon
Favicon

Re: Chi-square

Ib wrote:
> I have tried to graph the Chi-square cumulative distribution function.
> 
> My input is
> f(x)=integrate((1/2)^(f/2)/gamma(f/2)*x^(f/2-1)*e^(-x/2),0,x)
> where f is a ”brugerdefineret funktion…”
> It works fine when f>1, but not when f=1.
> I think the problem is x^(f/2-1) when f/2-1 is negative. 

Yes, you cannot raise 0 to a negative power. That would be the same as 
dividing by zero.

> It doesn’t help to 
> change the lower limit to 0.001.

It seems to work fine when I change the lower limit of integrate to 
0.001. But I don't think this makes much sense as the result will vary 
heavily depending on the lower value.

Best regards
Ivan Johansen

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Graph-support mailing list
Graph-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graph-support

Gmane