Generate data from a new distribution (Generalized Exponential Dist)

Good day to you all.
I want to generate random numbers from the Generalized exponential distribution but I could not find it on MATHEMATICA. Also, I would like to know how to generate random numbers from any distribution that is not registered on MATHEMATICA.

Thanks a lot.

Hi Ramy,

Take a look at ProbabilityDistribution.

In[2]:= genExpDist =
ProbabilityDistribution[(1 - E^(-[Lambda] x))^[Alpha], {x, 0,
Infinity}]

Out[2]= ProbabilityDistribution[(1 - 
   E^(-\[FormalX] \[Lambda]))^\[Alpha], {\[FormalX], 0, \[Infinity]}]

In[7]:= \[Lambda] = 1; \[Alpha] = 2;

In[8]:= RandomVariate[genExpDist]

Out[8]= 2.01697

Thanks. It worked.

Thanks. It worked.