# Drawing random numbers from TransformedDistribution

Suppose I have created the following TransformedDistribution:

dist = TransformedDistribution[0.5 + 4.830917874396135 Sqrt[0.01071225 - 10 x^2],
x \[Distributed] GammaDistribution[α, β], Assumptions -> {x >= 0}]


My question is simply, how do I get Mathematica to draw random numbers from dist?

Edit:

Should this, for example, work?

dist = TransformedDistribution[0.5 + 4.830917874396135 Sqrt[0.01071225 - 10 x^2],
x \[Distributed] GammaDistribution[5.389705454315603, 0.00517629198314588],
Assumptions -> {x > 0 , x < 0.1}]

RandomVariate[dist, 10]


It doesn't at my end.

• You have to specify [[Alpha] and [Beta] to this end.After that RandomVariate should do the job. – user64494 Oct 7 '18 at 16:51
• you will get complex values unless you specify an upper bound for x; is that ok? – kglr Oct 7 '18 at 17:00
• @kglrThat is fine, yes. – user120911 Oct 7 '18 at 17:03
• Should this, for example, be working? RandomVariate[TransformedDistribution[ 0.5 + 4.830917874396135 Sqrt[0.01071225 - 10 [FormalX]^2], [FormalX] [Distributed] GammaDistribution[5.389705454315603, 0.00517629198314588], Assumptions -> {x > 0, x < 0.1}], 10] – user120911 Oct 7 '18 at 17:07

Assumptions in TransformedDistribution (afaik) can be used to specify constraints on the parameters, not on the random variable that is being transformed. You can truncate x to positive values using TruncatedDistribution as follows:
ClearAll[dist]
0.5 + 4.830917874396135 Sqrt[0.01071225 - 10 x^2],