BookmarkSubscribeRSS Feed
trash
Fluorite | Level 6
Let X and Y be independent random variables from the bivariate normal distribution where
X ~ N(μ1= 15,σ1^2= 5) and Y ~ N(μ2= 10,σ2^2= 3). Generate 10000 random numbers for X and Y using the
Box Muller transformation.
-Print a histogram for both X and Y and supply the appropriate descriptive statistics to verify your
requirements.
-Print a Contour and Surface plot in SAS.
 
I don't know how to begin. I can't seem to find anything helpful for Box Muller Transformations coding. 
 
3 REPLIES 3
PGStats
Opal | Level 21

You could try looking up Box-Muller on Wikipedia, for a start.

PG
PaigeMiller
Diamond | Level 26

You could also search SAS Help for "box muller". Hint: it's in there!

--
Paige Miller
Rick_SAS
SAS Super FREQ

The Box-Mueller transformation is a way to generate a random normal variates from two uniform variates. 

1. Learn how to generate uniform random variates in SAS in the DATA step.

2. Use DATA step programming to combine the uniform variates to form a normal variate.

 

I suggest looking into PROC UNIVARIATE when you are ready to generate descriptive statistics that indicate that the sample statistics for X and Y are close to the parameters in the population.

 

For the contour plot and surface plot, I suggest you look at PROC KDE, which can produce bivariate plots of density.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1563 views
  • 2 likes
  • 4 in conversation