Message Boards Message Boards

GROUPS:

Generate data from a new distribution (Generalized Exponential Dist)

Posted 3 months ago
554 Views
|
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
Posted 3 months ago

Hi Ramy,

Take a look at ProbabilityDistribution.

Thanks. It worked.

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.

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

Group Abstract Group Abstract