[R] Chi-square distribution probability density function:
David Winsemius
dwinsemius at comcast.net
Wed Jul 21 19:26:30 CEST 2010
On Jul 21, 2010, at 1:18 PM, Knut Krueger wrote:
> David Winsemius schrieb:
>>
>>
>> And exactly why did you think I offered
>>
>> ?Chisquare
> I was completely on the wrong way, and tried to find a solution with
> the formula instead to substitute the formula.
>
> So I tried to implement pchisq into the formula - and of course I
> got wrong values ...
> p <- function(x) ((0.5^(5/2))/gamma(5/2))*(x^((5/2)-1))*
(2.718281828459^(-x/2))
> integrate(p, 25.508, Inf)
0.0001111 with absolute error < 2.7e-05
Check result>>>>
> pchisq(25.508,5)
[1] 0.9999
> 1-pchisq(25.508,5)
[1] 0.0001111
>
> Thank's Knut
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list