Rev 20 | Rev 4330 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 4161 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | !goto proc |
2 | !goto proc |
3 | !endif |
3 | !endif |
4 | slib_title=Generation of random numbers with a discrete law |
- | |
- | 4 | ||
5 | slib_parms=3\ |
5 | slib_parms=3\ |
6 | 1,m\ |
6 | 1,m\ |
7 | ,[p1,p2,..pj]\ |
7 | ,[p1,p2,..pj]\ |
8 | ,[v1,v2,..vj] |
8 | ,[v1,v2,..vj] |
9 | slib_author=S. Lemaire and Bernadette Perrin-Riou |
9 | slib_author=S. Lemaire and Bernadette Perrin-Riou |
10 | slib_out=random data of m numbers following the law [p_1,p_2,..p_j]\ |
- | |
11 | on the values [v_1,v_2,..v_j] (p_i are positive reals of sum 1) |
- | |
12 | - | ||
13 | 10 | ||
14 | slib_comment= P(X=v_i)=p_i |
11 | slib_comment= P(X=v_i)=p_i |
15 | 12 | ||
16 | slib_example= 5,[0.5,0.5],[3,7]\ |
13 | slib_example= 5,[0.5,0.5],[3,7]\ |
17 | 5,[1/3,1/3,1/3],[pile,face,tranche] |
14 | 5,[1/3,1/3,1/3],[pile,face,tranche] |