且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python中的Beta二项式函数

更新时间:2023-01-11 19:15:14

维基说,复合分布函数由

f(k|n,a,b) = comb(n,k) * B(k+a, n-k+b) / B(a,b)

其中B是beta函数,a和b是原始Beta参数,n是二项式参数。 k是您的x,而p消失是因为您对p的值进行积分以获得该值(卷积)。
就是说,您不会在scipy中找到它,但是只要您来自scipy的beta函数

where B is the beta function, a and b are the original Beta parameters and n is the Binomial one. k here is your x and p disappears because you integrate over the values of p to obtain this (convolution). That is, you won't find it in scipy but it is a one-liner provided you have the beta function from scipy.