Rev 3307 | Rev 4328 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3307 | Rev 4161 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | !goto proc |
2 | !goto proc |
3 | !endif |
3 | !endif |
4 | slib_title=Generation of multinomial random data |
- | |
- | 4 | ||
5 | slib_parms=3\ |
5 | slib_parms=3\ |
6 | 1,m\ |
6 | 1,m\ |
7 | ,n\ |
7 | ,n\ |
8 | ,[p1,p2, .. pj] |
8 | ,[p1,p2, .. pj] |
9 | slib_author=Sophie Lemaire et Bernadette PERRIN-RIOU |
9 | slib_author=Sophie Lemaire et Bernadette PERRIN-RIOU |
10 | slib_out=random data of m integers following a multinomial law of parameters n and p=[p_1,...,p_j] (n is an integer and p_i are positive reals of sum <= 1; if the sum of the p_i is less than 1, 1-sum(p_i) is add to the list. |
- | |
11 | - | ||
12 | slib_comment= P(X1=k1,X2=k2,..)=n!/(k1!k2!..)*p1^k1*p2^(k2)... In fact, it is preferable to enter only n-1 p_i because of the tuncature errors : the last one will be add. |
- | |
13 | 10 | ||
14 | slib_example=3,6,[1/3,1/3] |
11 | slib_example=3,6,[1/3,1/3] |
15 | !exit |
12 | !exit |
16 | 13 | ||
17 | :proc |
14 | :proc |