Noninteger binomial coefficients
Moderators: EViews Gareth, EViews Moderator
Noninteger binomial coefficients
how can i calculate the value of C(5,0.5)? @binom function expects integer values for both n and k.
Re: Noninteger binomial coefficients
The following piece of code uses the generalized version of the computation of binomial coefficents and should do the trick for you:
Code: Select all
call gbinom(5,0.5)
subroutine gbinom(scalar n,scalar k)
scalar gbcoef = @exp(@gammalog(n+1)-@gammalog(k+1)-@gammalog(n-k+1))
endsubRe: Noninteger binomial coefficients
great, thanks!!
Who is online
Users browsing this forum: No registered users and 2 guests
