Skip to content

Monte Carlo Stack Simulation

An accumulation model — instantiates Tolerance Stack Management

Samples each contributor's distribution thousands of times through the real assembly relationship to build the distribution of the integrated result — capturing non-linear, non-normal, and correlated effects the closed-form methods assume away.

The tidy formulas — worst-case sums, root-sum-square — buy their closed form with assumptions: that contributors combine linearly and are independent and normal. Monte Carlo Stack Simulation buys accuracy instead by brute force. It draws a random value from each contributor's actual distribution, pushes that set through the real geometric or functional relationship (however non-linear), records the resulting output, and repeats tens of thousands of times to build the full distribution of the integrated result. Its defining capability is that it needs none of the analytic conveniences: it handles a fit that depends on an angle or a ratio, contributors that are skewed or bimodal, and correlations that the summing methods cannot represent at all. It trades a formula for a computed empirical distribution — and, in the bargain, tells you which inputs drive the tails.

Example

A phone camera module must hold the lens the right distance from the sensor for focus — a target with only a few microns of allowable error. The relationship is not a simple sum: the effective focus distance depends non-linearly on the barrel thread engagement and the tilt between lens and sensor planes, and the injection-molded barrel's dimension is noticeably skewed, not normal. A root-sum-square estimate here would be doubly wrong. The Monte Carlo simulation instead samples each contributor from its measured distribution — the skewed barrel, the tilt, the sensor-mount shim — runs them through the actual optical-geometry equation ~50,000 times, and returns the distribution of focus error. It predicts an out-of-focus rate of roughly 2% (versus the ~0.1% a naive RSS implied) and, by decomposing the output variance, shows that barrel tilt alone drives most of the failing tail — the one contributor worth tightening.

How it works

The engine is repeated sampling: draw one value per contributor from its distribution, evaluate the true transfer function, log the output, and iterate until the output distribution stabilizes. Because it evaluates the actual relationship rather than a linearized one, non-linearity and interaction come for free, and correlated inputs can be sampled jointly. Beyond the headline yield, it supports variance-based sensitivity: by attributing the spread of the output to each input, it ranks contributors by how much of the failure they actually cause. What distinguishes it from the analytic siblings is that it produces an empirical distribution and a causal ranking rather than a single combined tolerance.

Tuning parameters

  • Iteration count — how many samples are drawn. More sharpens the tail estimates (where failures live) but costs compute; too few and the rare-event rate is just noise.
  • Input distribution fidelity — whether each contributor is modelled as normal-by-default or with its real measured shape. Skew and bimodality change the answer; assuming normal quietly reintroduces the error you switched to Monte Carlo to avoid.
  • Correlation structure — whether inputs are sampled independently or with modelled dependence. Getting this wrong is the fastest way to a precise, false result.
  • Transfer-function accuracy — how faithfully the simulated relationship matches the real assembly; the simulation can only be as right as the equation it samples through.
  • Sensitivity method — how output variance is attributed to inputs (one-at-a-time versus global variance decomposition); global methods capture interactions that one-at-a-time misses.

When it helps, and when it misleads

Its strength is fidelity where the formulas break: non-linear fits, non-normal contributors, and correlated deviations, plus a built-in ranking of which inputs own the failing tail — turning "the stack is too wide" into "tilt is the problem."[1] It is the method of choice precisely when the assumptions that make RSS convenient are false.

It misleads through the seduction of a precise-looking number built on invented inputs: assumed-normal distributions where the real data is skewed, or independent sampling where contributors move together, produces a confident distribution that is simply wrong — and the polish of a 50,000-run histogram hides the guesswork in its priors. It is also easy to run it to the answer you wanted by quietly narrowing an input's spread. The discipline is to feed it measured distributions and real correlations, validate its predicted yield against integration data, and treat its inputs — not its iteration count — as the thing that determines whether it is trustworthy.

How it implements the components

  • accumulation_model — it combines local deviations by sampling them through the true transfer function, the most general of the accumulation models on offer.
  • sensitivity_analysis — by decomposing output variance across inputs, it quantifies how strongly the integrated result responds to each contributor.
  • critical_contributor_map — that decomposition names the few contributors that drive the failing tail, directing tightening effort where it pays.

It does not inventory the contributors or draw their loop — that map comes from Dimensional Chain Diagram — nor does it check the built article; that empirical gate is Integration Acceptance Test.

Notes

Reach for Monte Carlo when the assumptions behind the closed-form methods fail — non-linearity, non-normal inputs, or correlation — and not as a reflex: when contributors really are independent, linear, and normal, root-sum-square gives the same answer far more cheaply, and the simulation's extra machinery only adds places for a wrong prior to hide.

References

[1] Variance-based sensitivity analysis attributes the variance of a model's output to its inputs (and their interactions), giving a principled ranking of which contributors matter most. Because Monte Carlo already samples the whole input space, this decomposition falls out of the same run.