octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binocdf accuracy


From: Marco Caliari
Subject: Re: binocdf accuracy
Date: Mon, 08 Jul 2013 15:45:37 +0200 (CEST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Dear all,

I think the problem is not in betainc, but in the line

cdf(k) = 1 - betainc (p, tmp + 1, n - tmp);

in betaocdf (1-something_very_small). What about to replace this line with

cdf(k) = quadgk(@(t) t.^tmp.*(1-t).^(n-tmp-1),p,1)/beta(tmp+1,n-tmp)

?
If n or p are not scalar, unfortunately the previous line requires a loop.

Marco


reply via email to

[Prev in Thread] Current Thread [Next in Thread]