A*********u 发帖数: 8976 | 1 ☆─────────────────────────────────────☆
hjdut (hehe) 于 (Wed Jan 23 17:35:28 2008) 提到:
f(x)=3/4*(1-x^2), abs(x)<=1
the algorithm is: generate iid u1,u2,u3 from uniform(-1,1)
if abs(u3)> abs(u2) and abs(u3)>abs(u1), u=u2, otherwise u=u3
how to prove algorithm generates variates from f ?
Thanks
☆─────────────────────────────────────☆
oloolo (黑夜给了我白内障) 于 (Thu Jan 24 15:14:45 2008) 提到:
maybe you can try Inverse Transform Method. consult MonteCarlo-Concept
Algorithms and Applications by Ge | j*****e 发帖数: 182 | 2 u is either the lowest, or the second lowest value out of three values
randomly chosen from U(-1,1).
Use results from order statistics to solve the pdf of U. Note that U is not
U(-1,1). |
|