Re: drawing realizations from a joint PDF
- To: mathgroup at smc.vnet.net
- Subject: [mg3515] Re: drawing realizations from a joint PDF
- From: Jorma Virtamo <jorma.virtamo at vtt.fi>
- Date: Wed, 20 Mar 1996 02:49:14 -0500
- Sender: owner-wri-mathgroup at wolfram.com
deb at Alceon.com (David E. Burmaster) wrote: >I have a bivariate random variable described by this PDF > > f(x, y) = x + y for 0 <= x <= 1 AND 0 <= y <= 1 > >In Mma, how can I draw realizations from the joint PDF?? Try this one: r := Random[] z := Module[ {x,y}, x = Sqrt[.25 + 2r] - .5; y = Sqrt[x^2 + (1+2x)r] - x; Return[{x,y}] ] You can visualize a realization of 5000 points by Show[ Graphics[{PointSize[.01], Point /@ Table[z,{5000}]}], PlotRange->{{0,1},{0,1}}, AspectRatio->1, Frame->True ]; -- Jorma Virtamo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jorma Virtamo VTT Information Technology phone: +358 0 456 5612 Telecommunications fax: +358 0 455 0115 P.O. Box 1202 email: jorma.virtamo at vtt.fi FIN-02044 VTT web: http://www.vtt.fi/tte/ Finland ==== [MESSAGE SEPARATOR] ====