Monte Carlo for FTA — lognormal vs uniform leaf distributions
A point-estimate fault tree gives one number for P(TOP). The data behind it is rarely that certain: a published value with an error factor, a manufacturer's range, an extrapolation from a small fleet. Monte Carlo propagates the uncertainty in the leaf values through the tree and gives a percentile band on the top event. The distribution you choose for each leaf shapes that band. This guide covers the choice, the sampling mechanics, and a worked SPAD tree whose every figure was computed with FTA Studio's engine.
Why a point estimate isn't enough
Suppose a basic event's failure rate came from a handbook. The handbook gives one number; the rate in your application, on your production batch, in your climate, is uncertain. If you can say how uncertain — for example "the true value is within a factor of 3 of this median, 90% of the time" — you can propagate that through the tree and report a band rather than a single figure.
Two reasons this matters in practice:
- The mean is not the median. For a lognormal leaf the mean exceeds the median by exp(σ²/2): 1.25× at an error factor of 3, 1.61× at 5 and 2.66× at 10. If the point values in your tree are medians, the mean of P(TOP) is higher than the point estimate, and which of the two your target is compared against is a decision to make explicitly.
- The 95th percentile says how bad pessimistic data would be. A 5th–95th band spanning two orders of magnitude is a different kind of result from one spanning 30%, even with the same point estimate. The first argues for design margin; the second does not.
Step 1Which leaf distribution
The choice per leaf depends on what the data source actually gives you.
| Distribution | When to use | Parameters | Shape |
|---|---|---|---|
| Lognormal | When you have a central value and a multiplicative spread, usually stated as an error factor EF = 95th / 50th percentile (equal to √(95th / 5th) for a lognormal). | Median (or mean) and EF. μ = ln(median), σ = ln(EF)/1.645. | Right-skewed; mean = median × exp(σ²/2). |
| Uniform | When all you have is a range of the same order of magnitude, with no reason to prefer any value inside it. | low, high. | Flat, bounded; mean = (low + high)/2. |
| Loguniform | When all you have is a range spanning orders of magnitude ("between 10⁻⁷ and 10⁻⁵"). Each decade gets equal weight, where a uniform would put 99% of its weight in the top decade. | low, high (both > 0). | Flat in log space, bounded. |
Other tools also offer triangular and beta distributions; FTA Studio does not. A beta distribution suits a per-demand probability estimated from observed successes and failures; if you have one, you can enter its median and an equivalent error factor as a lognormal, and say so.
Where the spread comes from
Check what your data source actually publishes before choosing. OREDA, for example, gives a mean, a standard deviation and a 90% interval rather than a median and error factor. MIL-HDBK-217F and FIDES give point values with no error factor at all, so an error factor applied to them is the analyst's judgement and should be recorded as such, with the reason.
Why lognormal is the usual choice for rates
- Failure rates vary multiplicatively. Temperature, stress and quality factors scale a rate rather than adding to it, and a product of many independent factors tends towards a lognormal. That is the common argument for using it; it is an argument, not a law.
- Products of lognormals are lognormal. A cut set's probability is a product of its leaves, so if the leaves are independent lognormals, each cut set is exactly lognormal. A sum of cut sets is not. In the SPAD tree below, three single-event cut sets of similar size carry almost all of P(TOP), so P(TOP) is a sum of three lognormals, and that changes where its median falls (Step 3).
Every leaf without a distribution is a fixed point. FTA Studio lists the fixed points in the result rather than giving them a spread nobody chose.
Step 2Sample size, convergence, and correlated leaves
Sample size
The standard error of a Monte Carlo estimate falls as 1/√N: halving it costs four times the samples. Tail percentiles converge more slowly than the mean, because fewer samples land there. Rather than trust a rule of thumb, measure it: run twice with different seeds or sample counts and compare. On the SPAD tree below, with seed 12345, 10,000 samples gave a 95th percentile of 1.82×10⁻⁵ per approach and 100,000 gave 1.84×10⁻⁵, 1.3% apart; the standard error of the mean at 10,000 samples was 0.48% of the mean.
FTA Studio runs up to 10,000 samples in the browser, and more on the server on Professional and Enterprise plans. Sampling is seeded, so a run can be repeated exactly.
Latin Hypercube Sampling
Latin Hypercube Sampling (LHS) stratifies each leaf's distribution so the samples cover it evenly, which usually reduces the variance of the estimate for a given N. Some PRA codes offer it — SAPHIRE offers simple Monte Carlo or Latin Hypercube sampling. FTA Studio uses simple seeded sampling, so convergence is checked by sample count and seed as above.
Correlated leaves
Drawing every leaf independently assumes the uncertainties are unrelated. Where two events use the same data — the same component type, the same handbook entry — their uncertainties are the same uncertainty: if the handbook is optimistic, it is optimistic for both. Sampling them independently understates the spread of P(TOP), most of all for AND gates over identical components.
- Use one event, referenced. In FTA Studio, a repeated event (a reference to an existing event) is one event and takes one value per sample, which is the correct treatment when the same component appears in several places.
- Common cause is a separate question. A β-factor group models components failing together in operation, not shared uncertainty in their data. In FTA Studio β can itself carry a distribution, drawn once per sample for the whole group.
Step 3Worked SPAD tree with Monte Carlo bands
The SPAD tree from Article 1 (the SPAD template): 8 basic events, 9 minimal cut sets, exact point-estimate P(TOP) = 7.73×10⁻⁶ per approach to a signal at danger. Three of the cut sets are single wrong-side signal failures and carry 99.1% of that; the other six pair a driver error with a train-protection failure. Now give every basic event a lognormal with its point value as the median and an error factor of 3. For the two driver events the distribution is on the probability per approach; for the six hardware events, whose probability is λτ/2, it is on the failure rate λ, which scales their probability by the same factor. The EF of 3 on every event is an illustrative assumption, not a value taken from a data source:
EF = 95th / 50th = 3 σlog = ln(EF) / 1.645 = ln(3) / 1.645 = 0.668 μ = ln(median)
Percentile band on P(TOP)
FTA Studio's uncertainty analysis, 10,000 samples, seed 12345:
| Statistic | P(TOP) per approach | ÷ point estimate |
|---|---|---|
| 5th percentile | 4.38×10⁻⁶ | 0.57 |
| 50th percentile (median) | 8.65×10⁻⁶ | 1.12 |
| Mean | 9.64×10⁻⁶ | 1.25 |
| 95th percentile | 1.82×10⁻⁵ | 2.35 |
What the table shows that the point estimate hid:
- The 5th-to-95th band spans about 4.2×, from 4.38×10⁻⁶ to 1.82×10⁻⁵ per approach. Same model, same cut sets; only the presumption about the data changes. That is narrower than the 9× band of any one event at EF 3, because three independent wrong-side events partly average out.
- The mean sits 25% above the point estimate, as exp(σ²/2) = 1.25 predicts: P(TOP) is almost exactly the sum of the three single events, and the mean of a sum is the sum of the means, each 1.25× its median.
- The median of the samples is not the point estimate, even though every point value is a median: it is 8.65×10⁻⁶, 12% above. A sum of lognormals is not lognormal, and its median is not the sum of their medians. Reporting the point estimate as "the median" would be wrong on this tree, though it would be close to right on a tree with one dominant cut set.
- Which statistic meets the target is a decision. Against an illustrative target of 1×10⁻⁵ per approach, the point estimate is 23% below it, the median 14% below, the mean 4% below and the 95th percentile 1.8× above. Whether your target is compared with the point estimate, the mean or a percentile has to be agreed with whoever accepts the safety case; this guide does not claim any standard settles it.
F-V importance under uncertainty
Importance measures from Article 2 become bands too: compute F-V for every sample and read the percentiles. These were computed with the same engine, on the same 10,000 draws as the run above (same seed, same generator), each sample quantified exactly. FTA Studio's own uncertainty run reports rank correlations rather than F-V bands; on this run its Spearman correlations with Q(top) are 0.80 for BE-001, 0.44 for BE-002, 0.22 for BE-003 and 0.01 or less for the other five.
| Basic event | F-V 5th | F-V median | F-V 95th | Rank |
|---|---|---|---|---|
BE-001 (interlocking wrong-side) | 23.2% | 53.9% | 81.8% | First in 73.9% of samples |
BE-002 (signal head wrong-side) | 8.2% | 27.1% | 60.0% | Above BE-001 in 23.3% of samples |
BE-003 (cable wrong-side) | 3.7% | 13.1% | 36.7% | Above BE-002 in 23.3% of samples |
BE-004 (driver does not see) | 0.15% | 0.71% | 3.3% | |
BE-005 (driver brakes late) | 0.029% | 0.14% | 0.65% | |
BE-006 (trackside data) | 0.13% | 0.63% | 3.0% | |
BE-007 (on-board unit) | 0.037% | 0.17% | 0.86% | |
BE-008 (emergency brake) | 0.0035% | 0.017% | 0.086% | |
| BE-001 to BE-003 together | 96.2% | 99.1% | 99.8% |
At the point values BE-001 carries twice BE-002's share, but with an error factor of 3 on each that order reverses in nearly a quarter of samples, and so does the order of BE-002 and BE-003. So "address the interlocking first" does not survive the uncertainty: the data cannot tell the three wrong-side failures apart with any confidence. What does survive is the branch: the three together carry at least 96.2% of P(TOP) in 95% of samples, so the conclusion to carry forward is about the wrong-side signal failures as a group — for example their shared test interval, the change Article 1 tries — not about any one of them. That is the kind of statement a point estimate cannot support and a Monte Carlo can.
Pitfalls a reviewer will catch
- Error factor declared without provenance. "EF = 3, typical value" invites the question of where it came from. Name the source, or say it is your judgement and why. Without that, EF is a knob that can be turned until the band passes.
- Shared data sampled independently. Two uses of the same component data sampled separately understate the band (Step 2). Use one event, referenced.
- Median and mean confused. A lognormal's point value can be its median or its mean, and they differ by exp(σ²/2). FTA Studio requires the point value in the model to equal the stated median or mean, and refuses otherwise.
- Truncated cut sets. A Monte Carlo built on a truncated cut-set list loses the truncated cuts in every sample, biasing the band downward. FTA Studio quantifies each sample on the full decision diagram, so nothing is truncated.
- PFDavg is a time average, not a statistic of the uncertainty. IEC 61508's PFDavg averages the probability of failure on demand over the proof-test interval. It says nothing about the spread of your data, and quoting it does not answer the mean-or-median question above.
Where to go next
- Run it on your own tree. In FTA Studio, give events a lognormal, uniform or loguniform distribution and run the uncertainty analysis. For a single value, the lognormal Monte Carlo tool shows the mean and percentiles of one lognormal in the browser.
- Common cause: Article 5 covers the β-factor model, the only CCF model FTA Studio implements, and explains MGL as a method.
- Importance: Article 2 covers the four measures used for the bands above.
Sources
- NUREG/CR-7039 Vol. 2, SAPHIRE 8 Technical Reference (2011): uncertainty analysis by simple Monte Carlo or Latin Hypercube sampling
- Calculations:
packages/fta-engine/uncertainty.js(the band), run on the SPAD template file bydocs/fact-check/maths-reference-scripts/spad-guides.mts, which also computes the F-V bands on the same draws.