| Author |
Comment/Response |
endriuu
|
05/30/12 2:43pm
I've a problem. I want generate a set of number according Yule - Simon Distribution. For example:
I've got a set of number:
A={1,2,3,4,5}
I want to add new element to the list with probability than I chose:
1 with 1/6
2 with 1/6
3 with 1/6
4 with 1/6
5 with 1/6
6 (new element from oudside) with 1/6.
Assume that I've choosen 2. Then I've got a the list
A={1,2,2,3,4,5}.
Now, I`ve got a new set A, and go repeat:
A={1,2,2,3,4,5}
I want to add new element to the list with probability than I chose:
1 with 1/7
2 with 2/7
3 with 1/7
4 with 1/7
5 with 1/7
6 (new element from oudside) with 1/7.
Assume that I've choosen 6. Then I've got a the list
A={1,2,2,3,4,5,6}.
Now, I`ve got a new set A, and go repeat:
A={1,2,2,3,4,5,6}
I want to add new element to the list with probability than I chose:
1 with 1/8
2 with 2/8
3 with 1/8
4 with 1/8
5 with 1/8
6 with 1/8
7 with (new element from oudside) with 1/8.
URL: , |
|