In: Statistics and Probability
Generate a random variable with Pareto(a, b) distribution with PDF given by f(x) = (aba)/(xa+1)
By using R code
n=100
a=2
b=3
x={}
for(i in 1:n)
{ u=runif (1)
x[i]=b/(1-u)^(1/a)
}
x #100 random numbers
[1] 4.438007 4.109028 4.087269 3.073480 4.028701 3.019166 4.406113 [8] 3.843584 3.463991 3.076578 14.059280 3.862273 5.081540 3.739576 [15] 3.891572 3.623041 5.370899 3.261677 4.026012 29.844569 5.517689 [22] 7.897716 5.642491 7.050867 3.060313 9.431027 4.152227 5.181548 [29] 3.315387 3.722130 15.705937 3.230649 3.545882 6.126841 4.023591 [36] 3.064140 3.883466 4.725636 3.098183 4.208045 3.385089 9.631301 [43] 9.066154 4.097367 7.428448 4.195657 3.768385 35.018389 4.112516 [50] 6.099770 3.016190 3.245830 3.928198 4.295770 4.433111 3.872509 [57] 3.842630 7.775654 3.078793 10.185651 3.220501 28.174114 3.603175 [64] 6.925029 5.342879 3.218503 18.927356 5.010576 3.086248 7.418161 [71] 4.734602 4.019675 9.244882 3.455527 4.104277 13.259686 5.184171 [78] 21.918495 3.196370 3.219295 4.097550 3.939188 3.164819 3.427731 [85] 3.766181 3.588791 3.517475 5.696494 3.035002 4.916829 3.172269 [92] 7.045089 3.339530 4.564480 6.498619 3.070068 3.186289 3.182966 [99] 9.297420 3.887957