n***l 发帖数: 9 | 1 Pareto Distribution has the form
P = 1 - (b/x)^a.
with mean
E = ab/(a - 1).
Let b = 1, and E = 128, then we can derive a = 128/127.
So P = 1 - (1/x)^(128/127).
I wanted to generate 10^7 numbers that follow the distribution
and so use MatLab to generate it. As with other distributions,
here P = rand(10^7, 1), and we can use the inverse function or
even the exp-log expression to do it. But to my surprise, the
average number of the obtained 10^7 numbers is just around 20,
far from the expected 128. | w**a 发帖数: 1024 | 2 你的10e7个number不是Pareto 分布,
先产生10e7个随机数,然后在算幂是不对吧
你可以用软件R,或者Metroplis-Hasting 算法。
【在 n***l 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Pareto Distribution has the form : P = 1 - (b/x)^a. : with mean : E = ab/(a - 1). : Let b = 1, and E = 128, then we can derive a = 128/127. : So P = 1 - (1/x)^(128/127). : I wanted to generate 10^7 numbers that follow the distribution : and so use MatLab to generate it. As with other distributions, : here P = rand(10^7, 1), and we can use the inverse function or : even the exp-log expression to do it. But to my surprise, the
|
|