Skip to content

Home / Monte Carlo / Analyzing the Model / Run Model / Run Model How-To

Run Model How-To

This walkthrough uses a small model you can build in a minute: two inputs, one output, and a specification band that half the output sits outside of.

Press Copy for Excel, then paste the table into a blank worksheet.

Model Value
Wall thickness 10
Bore 4
Outside width =B2*2+B3

Click cell A1 in a blank worksheet and press Ctrl+V. The two headings land in row 1, the labels in column A, and the model in column B: B2 holds the wall thickness, B3 the bore, and B5 the formula that reads them both. The empty row is deliberate, so the output lands in B5 and not B4, which is what every Monte Carlo walkthrough calls it.

Mark B2 and B3 as inputs with Mark Input, giving each a Normal distribution: B2 mean 10 standard deviation 0.2, B3 mean 4 standard deviation 0.1. Mark B5 as an output with Mark Output and give it a lower limit of 23 and an upper limit of 25.

Steps

  1. QXL Monte Carlo New > Monte Carlo > Run Model.

  2. The run uses the count and the sampling shown on the ribbon's own lists. Leave both at their defaults for this first run.

  3. The results appear when the run finishes.

What to read, and in what order

The histogram of the output first. Its shape tells you whether the output is roughly symmetric, and the specification limits are drawn on it so you can see the two tails against them.

Then the mean and the standard deviation. The mean should sit near 10*2+4 = 24, because the model is a straight sum and the inputs are centred at their means. It will not be exactly 24: it is an average over trials, and it moves a little from run to run.

Then the out-of-specification figures, which are what the limits were for.

Confirm the model is doing what you think

Change B2's mean to 11 and run again. The output mean moves to about 26 and the whole distribution shifts above the upper limit. A model that does not respond the way the formula says it should is a model worth checking before reading anything else off it.

Fast Mode and Native Mode

Fast Mode is the default and parses your formulas into its own engine. Native Mode recalculates the worksheet itself, which is slower and is there for a model the parser cannot take.

Run Validate Model before a long run: it reports whether the model will run in the fast engine and, if not, exactly which formula stopped it.

Things to try next

  • Raise the simulation count on the ribbon list and run again. The histogram gets smoother and the reported figures move less between runs.
  • Choose Sobol (Quasi-Random) from the sampling list and compare. The counts it offers are powers of two for a reason, which is on Sampling Matrices > Math Details.
  • Widen B3's standard deviation to 0.5 and watch the output spread grow.

See Also