2

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.

Jim
  • 93
  • 7

1 Answers1

2

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"]

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896
  • 1
    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. – Bob Hanlon Dec 19 '14 at 05:17