How to draw random samples from this distribution $f(x)=2xe^{x^2}$ of size hundred

48 Views Asked by At

How to draw random samples from this distribution $f(x)=2xe^{x^2}$ of size hundred? Please explain I am a beginner

1

There are 1 best solutions below

0
On

I am unclear on exactly what you are asking, but I think you are looking for an Inverse Transform Sampling. The basic idea is that you integrate your function, find its inverse, generate a random number in the range, and put it into the function.