BookmarkSubscribeRSS Feed
arcadeplus
Calcite | Level 5

I have to do a double integral of the function sin(x) + cos(y) dxdy in IML , using a Monte Carlo simulation, with vectorized code. Truly, I do not know how to do it.

1 REPLY 1
Rick_SAS
SAS Super FREQ

Please specify the domain of integration.

 

There are two common ways to use Monte Carlo to estimate integrals, so you'll have to look at your notes/textbook to decide which you should use. In one (the average-value method), you generate points uniformly on a 2-D domain and evaluate the function at each random location. In the other method (the volume method), you generate 3-D points and estimate the probability that a random point is under the graph of the function.

 

Here are some articles that use the average-value method. Study and understand the 1-D example before you attempt 2-D.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 344 views
  • 3 likes
  • 2 in conversation