Message Boards Message Boards

0
|
2618 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Under which conditions RandomVariate Take a value from symbolic dist ?

RandomVariate[ParetoDistribution[2, 1], 1]

What is the "probabilistic criteria" that RandomVariate use in order to take one value from Pareto Distribution. Is it done under a Normal Distribution, binormal...etc?

POSTED BY: kevin Robalino
Posted 2 years ago

I don't know what Mathematica uses but I think I know what it doesn't use.

Typically random samples from continuous distributions use the inverse of the CDF to generate the samples (when the inverse has a closed form and can be inverted). That involves selecting a random sample from a uniform distribution from 0 to 1 and then solving for the corresponding value that has the corresponding CDF. It appears that if Mathematica uses that approach, it doesn't use random samples from RandomReal or RandomVariate[UniformDistribution[], n]:

SeedRandom[12345];
2/(1 - RandomReal[{0, 1}, 10])
(* {2.27595, 2.98473, 9.2061, 3.50981, 2.57594, 3.72476, 7.63409, 6.84036, 9.56532, 2.23642} *)
SeedRandom[12345];
2/(1 - RandomVariate[UniformDistribution[], 10])
(* {2.27595, 2.98473, 9.2061, 3.50981, 2.57594, 3.72476, 7.63409, 6.84036, 9.56532, 2.23642} *)
SeedRandom[12345];
RandomVariate[ParetoDistribution[2, 1], 10]
(* {16.4954, 6.06203, 2.55509, 4.64934, 8.94512, 4.31916, 2.70996, 2.82638, 2.52873, 18.919} *)

The inverse CDF is 2/(1-u) where u is a random sample from a uniform distribution.

POSTED BY: Jim Baldwin
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