J*****n 发帖数: 4859 | 1 How to generate the random number following Gamma(k, l)
where, k < 1.
I need algo, not function in the software.
Thank you. |
l*********s 发帖数: 5409 | |
J*****n 发帖数: 4859 | 3
I know it. But in that algo, the second para is set to be 1.
【在 l*********s 的大作中提到】 : http://en.wikipedia.org/wiki/Gamma_distribution#Generating_gamm
|
l*********s 发帖数: 5409 | 4 read again, the first sentence
【在 J*****n 的大作中提到】 : : I know it. But in that algo, the second para is set to be 1.
|
J*****n 发帖数: 4859 | 5
多谢。
不过那个算法,用起来有个问题,在第一个参数小的时候(比如Gamma(0.001,6))
他的误差很大。不知道有什么解决的办法。
【在 l*********s 的大作中提到】 : read again, the first sentence
|
c********d 发帖数: 253 | 6 Use accept-reject algorithm, 用一个别的分布来产生一系列随机数,然后根据一定
的准则来接受或拒绝这些随机数就可以了。google一下细节即可。 |
J*****n 发帖数: 4859 | 7
多谢。
不过那个算法,用起来有个问题,在第一个参数小的时候(比如Gamma(0.001,6))
他的误差很大。不知道有什么解决的办法。
【在 l*********s 的大作中提到】 : read again, the first sentence
|
J*****n 发帖数: 4859 | 8
多谢。
不过那个算法,用起来有个问题,在第一个参数小的时候(比如Gamma(0.001,6))
他的误差很大。不知道有什么解决的办法。
【在 l*********s 的大作中提到】 : read again, the first sentence
|
J*****n 发帖数: 4859 | 9
多谢。
不过那个算法,用起来有个问题,在第一个参数小的时候(比如Gamma(0.001,6))
他的误差很大。不知道有什么解决的办法。
【在 l*********s 的大作中提到】 : read again, the first sentence
|