I'm working on a problem where I am trying to generate a random number from a Pareto distribution.
Using some measured data, I have been able to fit a Pareto distribution to this data set with shape/scale values of $4/6820$ using the R library fitdistrplus.
Now I want to, using the above scale and shape values to generate random numbers from this distribution.
Doing some searching here (http://www.ntrand.com/pareto-distribution/) and here (http://www.randomservices.org/random/special/Pareto.html), it mentions that the inverse function or quantile function can be used to generate a random number i.e.
$$x=\frac{b}{(1−U)^{1/a}} \in U(0,1)$$
Using two methods (some C code and Excel formula) I've generated around $1000$ numbers using my shape & scale parameters. However when I import the data back into R and formally validate whether the randomly generated numbers are from a Pareto distribution an Anderson Darling GoF tests tells me that the Pareto distribution is not a good fit, additionally the fitdist library tells me my shape/scale parameters are totally different than the original parameters. (e.g. shape $= 8260157$, scale $= 10834967$)
Any ideas what I am doing wrong here?
Regards Jonathan
codex4 <- rpareto(1000, 4.14104, 6820.53374) I get an the following output in fitdistrplus as follows:shape 3.688942
scale 5915.610140 which is not totally unreasonable. If i plug those values into an AD GoF test i get : data: x4 and ppareto AD = 0.32997, p-value = 0.914 which is an excellent fit – Jonathan Dunne May 09 '16 at 10:22