Monte Carlo uncertainty (JCGM 101)
Run the same rows as the GUM budget through the Monte Carlo method of JCGM 101 (GUM Supplement 1): Type A rows as t-distributions, rectangular, triangular and U-shaped limits sampled as they are. Get u(y), the probabilistically symmetric and shortest coverage intervals, and whether the GUM interval is validated for your budget. Seeded, so a result can be reproduced.
Monte Carlo uncertainty · JCGM 101
v0.1.0 · Y = Σcᵢ·Xᵢ, seededPress Run to draw the distribution. A million trials takes about a second.
Test vectors for this tool
The reference cases this calculator is tested against on every change. Use them to check your own software. All test vectors · Download JSON
| ID | Inputs | Expected | Tolerance | Source |
|---|---|---|---|---|
| MC-01 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = u | 2 | ± 0.01 | JCGM 101:2008 9.2.2: four standard Gaussian inputs, Y ~ N(0, 2²) analytically (table 2) |
| MC-02 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 3.919927969080108 | ± 0.03 | JCGM 101:2008 9.2.2: four standard Gaussian inputs, Y ~ N(0, 2²) analytically (table 2) |
| MC-03 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricLow | -3.919927969080108 | ± 0.03 | JCGM 101:2008 9.2.2: four standard Gaussian inputs, Y ~ N(0, 2²) analytically (table 2) |
| MC-04 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = adaptive, seed = 1, output = gumValidated | true | exact | JCGM 101:2008 9.2.2: four standard Gaussian inputs, Y ~ N(0, 2²) analytically (table 2); GUF validated for δ = 0.05 |
| MC-05 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 3.879406741347821 | ± 0.03 | JCGM 101:2008 9.2.3: four rectangular inputs, u = 1 each; analytic endpoints ±2√3[2 − (3/5)^¼] (table 3), confirmed by the Irwin–Hall distribution (SciPy 1.18.1) |
| MC-06 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricLow | -3.879406741347821 | ± 0.03 | JCGM 101:2008 9.2.3: four rectangular inputs, u = 1 each; analytic endpoints ±2√3[2 − (3/5)^¼] (table 3), confirmed by the Irwin–Hall distribution (SciPy 1.18.1) |
| MC-07 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772, coverageProbability = 0.95, trials = 1000000, seed = 1, output = u | 2 | ± 0.01 | JCGM 101:2008 9.2.3: four rectangular inputs, u = 1 each; analytic endpoints ±2√3[2 − (3/5)^¼] (table 3), confirmed by the Irwin–Hall distribution (SciPy 1.18.1) |
| MC-08 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 17.32050807568877, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 17.015814099859707 | ± 0.06 | JCGM 101:2008 9.2.4 table 4 (MCM [−17.0, 17.0], u(y) = 10.1, GUF not validated); exact endpoint by numerical convolution (SciPy 1.18.1) |
| MC-09 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 17.32050807568877, coverageProbability = 0.95, trials = 1000000, seed = 1, output = u | 10.14889156509222 | ± 0.05 | JCGM 101:2008 9.2.4 table 4 (MCM [−17.0, 17.0], u(y) = 10.1, GUF not validated); exact endpoint by numerical convolution (SciPy 1.18.1); u(y) = √103 analytically |
| MC-10 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 17.32050807568877, coverageProbability = 0.95, trials = adaptive, seed = 1, output = gumValidated | false | exact | JCGM 101:2008 9.2.4 table 4 (MCM [−17.0, 17.0], u(y) = 10.1, GUF not validated); exact endpoint by numerical convolution (SciPy 1.18.1) |
| MC-11 | rows = B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 1.7320508075688772; B rectangular a = 17.32050807568877, coverageProbability = 0.95, trials = 1000000, seed = 1, output = dLow | 2.875647850723386 | ± 0.06 | JCGM 101:2008 9.2.4 table 4 (MCM [−17.0, 17.0], u(y) = 10.1, GUF not validated); exact endpoint by numerical convolution (SciPy 1.18.1); d_low = U_GUM − y_high (8.1.3) |
| MC-12 | rows = B rectangular a = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 0.95 | ± 0.002 | JCGM 101:2008 6.4.2: R(−a, a) has the 95 % symmetric interval ±0.95a exactly |
| MC-13 | rows = B triangular a = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 0.7763932022500211 | ± 0.004 | JCGM 101:2008 6.4.5: T(−a, a) has the 95 % symmetric endpoint a(1 − √0.05) |
| MC-14 | rows = B u-shaped a = 1, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 0.996917333733128 | ± 0.0005 | JCGM 101:2008 6.4.6: arc sine U(−a, a), distribution function arcsin(x/a)/π + ½, endpoint a·sin(0.95π/2) |
| MC-15 | rows = A[10.01 10.03 10.02 10.04 10], coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 0.01963243161477515 | ± 0.0003 | JCGM 101:2008 6.4.9.2: t₄(x̄, s²/5); endpoint t_0.975,4 · s/√5 (SciPy 1.18.1) |
| MC-16 | rows = A[10.012 10.031 10.018 10.044 10.002 10.027 10.009 10.036 10.021 10.015], coverageProbability = 0.95, trials = 1000000, seed = 1, output = u | 0.004657559140027802 | ± 0.0002 | JCGM 101:2008 6.4.9.4 formula (13): u(x) = √((n − 1)/(n − 3)) · s/√n |
| MC-17 | rows = B normal U = 0.02 k = 2, ν = 8, coverageProbability = 0.95, trials = 1000000, seed = 1, output = symmetricHigh | 0.02306004135204166 | ± 0.0003 | JCGM 101:2008 6.4.9.7: certificate U, k, ν_eff → t₈(0, (U/k)²); endpoint t_0.975,8 · U/k (SciPy 1.18.1) |
| MC-18 | rows = B normal U = 0.02 k = 2, ν = 8, coverageProbability = 0.95, trials = 1000000, seed = 1, output = u | 0.011547005383792514 | ± 0.0002 | JCGM 101:2008 6.4.9.4: variance of t_ν scaled by U/k is (U/k)²·ν/(ν − 2) |
| MC-19 | rows = B normal U = 2 k = 2, coverageProbability = 0.9545, trials = 1000000, seed = 1, output = symmetricHigh | 2.0000024438996027 | ± 0.015 | Gaussian N(0, 1) at p = 0.9545: endpoint Φ⁻¹(0.977 25) (SciPy 1.18.1) |
| MC-20 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = 5000, seed = 1, output = u | RangeError | exact | Metrology Bench limit: 10 000 to 5 000 000 trials (JCGM 101 7.2.2 asks for M ≫ 1/(1 − p)) |
| MC-21 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.99999, trials = 1000000, seed = 1, output = u | OutOfRangeError | exact | Coverage probability limited to 0.5–0.9999, as in the budget |
| MC-22 | rows = B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1; B normal U = 1 k = 1, coverageProbability = 0.95, trials = 1000000, seed = 0, output = u | RangeError | exact | Seed must be a whole number from 1 to 2 147 483 646 |
Put this calculator on your site
Free for labs, schools and anyone else. Paste this into your page.
<iframe src="https://metrologybench.com/embed/monte-carlo" title="Monte Carlo uncertainty (JCGM 101) · Metrology Bench" width="100%" height="2600" style="border:0;max-width:640px" loading="lazy"></iframe>
Ask your AI
Connect metrology-toolbox-mcp and your assistant runs this exact calculation, with the source in the answer.