Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'RandomChoice' topicStudent Support Forum > General > Archives > "RandomChoice"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'RandomChoice')
Author Date Posted
RandomChoice endriuu 05/30/12 2:43pm
Re: RandomChoice Bill Simpson 05/30/12 4:02pm
Re: Re: RandomChoice endriuu 06/01/12 12:14pm
Re: Re: Re: RandomChoice Bill Simpson 06/01/12 8:03pm
Next Comment >Help | Reply To Topic