9 Replies Latest reply: Dec 6, 2011 12:11 PM by Tezza2010

# Can Mathcad perform the Monte Carlo Simulation?

I would like to know if anybody had attampted to do the Monte Carlo simulation using Mathcad Prime? I know the capability exists in Mathcad 15 however since Prime is a different product I'm not sure if it is available.

Thanks,

Margaret

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

According to its Help file, Mathcad Prime has the montecarlo function. I haven't used it, so can't say how well or otherwise it works.

Alan

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

Margaret Keays wrote:

I would like to know if anybody had attampted to do the Monte Carlo simulation using Mathcad Prime? I know the capability exists in Mathcad 15 however since Prime is a different product I'm not sure if it is available.

Thanks,

Margaret

As Alan says, Prime has a montecarlo function. However, Prime has iteration and a random function, which is all you really need to do Monte Carlo. What is it that you want to do?

Stuart

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

Stuart_Bruff wrote:

However, Prime has iteration and a random function, which is all you really need to do Monte Carlo.

Stuart

I agree. I find the montecarlo function to be too cumbersome to be worth using. Attached is a trivial example of how to do a Monte Carlo simulation (without using the inbuilt montecarlo function), using a well-known method of approximating pi.

Alan

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

AlanStevens wrote:

Stuart_Bruff wrote:

However, Prime has iteration and a random function, which is all you really need to do Monte Carlo.

Stuart

I agree. I find the montecarlo function to be too cumbersome to be worth using. Attached is a trivial example of how to do a Monte Carlo simulation (without using the inbuilt montecarlo function), using a well-known method of approximating pi.

Alan

See the animation - http://communities.ptc.com/videos/1480

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

A little late in answering this but we have just posted this worksheet in the Mathcad Engineering Resources section of PTC.com. Link is here: http://www.ptc.com/appserver/wcms/resourcecenter/mathcad.jsp?&im_dbkey=130810&icg_dbkey=888&lang=en. The worksheet was kindly developed by Piet Watte, a long-time Mathcad user.

The Engineering Resources section is in the process of going live over the next week or so. It will contain free Mathcad worksheets that will be indexed and searchable. These worksheets have been developed by our partners like Knovel, academic authors, established Mathcad experts and our own engineers.

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

Gearoid, hello!

I just want to note that you need to replace the word "XMCS" to "XMCD" in the sentence for a description of the procedure to save the downloaded file:

"(right-click, chose" Save Target As ", and change the extension to XMCS and" File Type "to "All)"
• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

Thanks! Changes going live soon.

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

In the Help Center "Mathcad Prime 1.0" (chapter "Mathcad Prime 1.0" -> "Options" -> "Statistics" -> "The probability distribution") can be found an example "Example. Estimating the probability using the Monte Carlo method".

P.S. And here are some links on the topic "The Monte Carlo Method in Mathcad".:

• ###### Re: Can Mathcad perform the Monte Carlo Simulation?

Margaret,

Yes.

Enclosed is sample in pdf only. It is very trivial but was done as an example that Mathcad could do it.

In building up a project cost it is possible to represent the inputs or components contributing to the cost as statistical distributions. This trivial example uses normal distributions always but MathCad actually has many types of distribution.

The project cost is built up from these inputs.

The trick here is the input variables are actually very large vectors created by the input distributions. The project cost is a vecrtorised calculation of all the vectors elements. 50000 elements per each input statistically generated and 50000 elements in output vector.

Output is a vector. You can look at the contents of this vector using statistics to determine information about the estimated variability of total project cost.

Histograms, means, percentile estimates etc.

Hope this helps.