Message Boards Message Boards


Generate data from a new distribution (Generalized Exponential Dist)

Posted 1 year ago
4 Replies
0 Total Likes

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.

4 Replies

Hi Ramy,

Take a look at ProbabilityDistribution.

Thanks. It worked.

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

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.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract