Group Abstract Group Abstract

Message Boards Message Boards

Generating Random Numbers from a Generalized Pareto Distribution

3 Replies
   CDF[ParetoDistribution[\[Sigma], 1/\[Xi], \[Gamma], \[Mu]], x]

gives the CDF as it says under 'Characterization' on the Wikipedia page. You can use RandomVariate to create random numbers based on this distribution.

POSTED BY: Sander Huisman
Posted 10 years ago

You can use a function such as

ranGenPareto = 
  Compile[{{loc, _Real}, {scale, _Real}, {shape, _Real}},
   Module[
    {u},
    u = RandomReal[];
    loc + scale*(u^(-shape) - 1)/shape
    ],
   CompilationTarget -> "C", RuntimeAttributes -> {Listable}
   ];

to generate random numbers from the distribution. The above assumes you have a C compiler on your computer to speed up things.

POSTED BY: Asim Ansari

Dear Asim, thanks a lot for the answer. Regards, Ruben

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