I would like to simulate from a joint distribution multiplied by a constant.
e.g. 3*NormalDistribution[0,1]*NormalDistribution[1,1]
I tried using something like ProductDistribution but that doesn't work.
Can anyone give me any hints.
I would like to simulate from a joint distribution multiplied by a constant.
e.g. 3*NormalDistribution[0,1]*NormalDistribution[1,1]
I tried using something like ProductDistribution but that doesn't work.
Can anyone give me any hints.
Perhaps
d1 = NormalDistribution[];
d2 = NormalDistribution[1, 1];
d3 = TransformedDistribution[3 x y, {Distributed[x, d1], Distributed[y, d2]}];
(* or d3 = TransformedDistribution[3 x y,
Distributed[{x, y}, BinormalDistribution[{0, 1}, {1, 1}, 0]]]; thanks: @BobHanlon *)
data = RandomVariate[d3, 100];
Histogram[data, 10, "PDF"]
d3
can also be defined as d3 = TransformedDistribution[3*x*y, Distributed[{x, y}, BinormalDistribution[{0, 1}, {1, 1}, 0]]];
This form is more general and could readily handle cases where x and y are correlated.
$\endgroup$
– Bob Hanlon
Dec 19 '14 at 5:17