I would like to sampling data from a distribution Sqrt[x^2 + y^2]
.
I used the code as follows:
a = ProbabilityDistribution[Sqrt[x^2 + y^2], {x, 0, 1}, {y, 0, 1}];
RandomVariate[a, 10]
However, mathematica fails to produce the result.
If I use this code, then it works.
a = ProbabilityDistribution[x^2 + y^2, {x, 0, 1}, {y, 0, 1}];
RandomVariate[a, 10];
It seems that these two are not so different, except for the second one does not have square root. Can anyone explain this?
ProbabilityDistribution[
$\sqrt{x1^2+x2^2},\{x1, 0 , 1\}, \{x2, 0, 1\}$]
is not implemented." $\endgroup$