[R] Chi-square distribution probability density function:

David Winsemius dwinsemius at comcast.net
Wed Jul 21 14:02:07 CEST 2010


On Jul 21, 2010, at 6:52 AM, Knut Krueger wrote:

> Hi to all I found
> an formular of an **
> ***p-Value Calculator for the Chi-Square test*
> *http://www.danielsoper.com/statcalc/calc11.aspx*
> *with the formula*
> *http://www.danielsoper.com/statkb/topic11.aspx*
> *what's the gamma function of this formula in r?*
> *df=5*
> *ch2=25.50878*
> *the following code does not give the result  <0.001 for the values  
> above *
> *p= ((0.5^(df/2))/gamma(df))*(ch2^((df/2)-1))* (2.718281828459^(- 
> ch2/2))
> or is there any other error?

Check your implementation of that formula. You made an error in the  
gamma argument.

See also:

?Chisquare
?gamma
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list