Algorithm Search⌘K

Techniquecore

Monte Carlo tolerance analysis

Also called statistical tolerance simulation.

Samples each part dimension from its distribution, solves the assembly for each sample and reads off the distribution of the assembly gap, nonlinear effects included.

Monte Carlo tolerance analysis estimates the variation of an assembly output by simulation. It draws a random value for every toleranced dimension from an assumed distribution, solves the assembly exactly for that sample, and repeats this NN times. The sample of outputs gives the mean, the spread and the fraction of assemblies outside the specification limits, the reject rate. It is Monte Carlo integration applied to the assembly function. Unlike the direct linearization method it uses no first-order expansion, so it sees the curvature of the assembly function, a skewed output and samples whose parts do not fit together. Its cost is NN assembly solves, and its result has a sampling error of order 1/N1/\sqrt{N}, which this page states and bounds.

In plain words

Build many virtual assemblies. For each one, pick every part size at random, the way a real machine would make it, and put the parts together on the computer. Write down the gap or angle that you get, and whether the assembly is good. After many assemblies, the list tells you the average result, how much it spreads, and what fraction is bad. You do not need a formula for the output, only a way to compute it for one set of parts. The method also shows effects that a straight-line estimate misses, such as an average that moves away from the nominal value, or parts that sometimes do not fit at all. The price is many solves, and an answer that is itself random. So you must also say how far the answer can be from the truth.

When it applies

The technique needs two things. The first is an assembly function ff that computes the output for one set of dimensions, or reports that the parts do not assemble. It can be a closed formula, a solve of vector loops, a chain of torsors or a full contact simulation. The second is a probability model of the dimensions.

The model of variation. Each toleranced dimension XjX_j is a random variable with a known distribution, and the dimensions are independent unless a joint distribution is given. The code of this page uses two common choices for a tolerance ±Tj\pm T_j: a normal distribution with mean at the nominal value and standard deviation Tj/3T_j / 3, and a uniform distribution on [mj−Tj,mj+Tj][m_j - T_j, m_j + T_j]. The output is Y=f(X)Y = f(X), evaluated exactly. There is no linearization and no small-angle approximation in the technique itself. If ff is a first-order model, such as a small displacement torsor or Jacobian-torsor chain, the simulation inherits that first-order approximation, and then only the propagation through ff is exact.

Use it when the assembly function is far from linear over the tolerance range, when a sample can fail to assemble, when the input distributions are far from normal, when the reject rate itself is wanted, or to check a linear method. A linear method such as tolerance stack-up or DLM is cheaper and exact on linear stacks, so simulation adds nothing there except a check.

The template

Let DD give the distribution of each dimension, let ff return the output or NO-FIT, and let [lo,hi][lo, hi] be the specification limits of the output.

  1. MC-TOLERANCE(f, D, N, seed, lo, hi)
  2. 1rejects ← 0; start an empty running mean and variance Y; rng ← generator from seed
  3. 2for i ← 1 to N do
  4. 3x ← one independent draw of every dimension from D, using rng
  5. 4y ← f(x) ▷ solve the assembly exactly
  6. 5if y = NO-FIT then rejects ← rejects + 1; continue
  7. 6if y < lo or y > hi then rejects ← rejects + 1
  8. 7add y to Y ▷ Welford's update
  9. 8p ← rejects / N; se ← sqrt(p (1 − p) / N)
  10. 9return mean(Y), var(Y), p, se, a confidence interval for p

The holes are ff, the distributions DD and the generator. Line L3 draws the dimensions in a fixed order from one seeded generator (the code uses Python's random.Random, a Mersenne twister), so a run can be repeated exactly. Line L7 keeps the running mean and the sum of squared deviations by Welford's update, which avoids the cancellation of the formula E[Y2]−(EY)2E[Y^2] - (E Y)^2. A sample that does not assemble counts as a reject and does not enter the mean and variance, so these describe the assemblies that are built.

The reject-rate estimate is unbiased. Let pp be the probability that one sample is a reject, a sample that does not fit or has its output outside [lo,hi][lo, hi]. Let IiI_i be the indicator of the event that sample ii is a reject. Then E[Ii]=pE[I_i] = p, and line L8 computes p^=1N∑iIi\hat p = \frac{1}{N} \sum_i I_i. By linearity of expectation, E[p^]=1N∑ip=pE[\hat p] = \frac1N \sum_i p = p. ■\blacksquare

Its standard error is p(1−p)/N\sqrt{p(1-p)/N}. Each IiI_i is a Bernoulli variable with variance E[Ii2]−p2=p−p2=p(1−p)E[I_i^2] - p^2 = p - p^2 = p(1-p), because Ii2=IiI_i^2 = I_i. The samples are independent, so the variances add: Var⁡(∑iIi)=Np(1−p)\operatorname{Var}(\sum_i I_i) = N p (1 - p), and Var⁡(p^)=Np(1−p)/N2=p(1−p)/N\operatorname{Var}(\hat p) = N p(1-p)/N^2 = p(1-p)/N. The standard error is its square root. The sum ∑iIi\sum_i I_i has the binomial distribution with parameters NN and pp. Line L8 replaces the unknown pp by p^\hat p in the formula. ■\blacksquare

The relative error is (1−p)/(pN)\sqrt{(1-p)/(pN)}. So a reject rate of p=0.001p = 0.001 known to within 10 percent at one standard error needs N≈(1−p)/(p⋅0.01)≈105N \approx (1 - p)/(p \cdot 0.01) \approx 10^5 samples. The error falls as 1/N1/\sqrt{N} for any number of dimensions, the property of Monte Carlo integration, and the law of large numbers gives p^→p\hat p \to p with probability 11.

Confidence intervals. By the central limit theorem, (p^−p)/p(1−p)/N(\hat p - p)/\sqrt{p(1-p)/N} is close to standard normal for large Np(1−p)N p (1 - p). Let z=1.95996z = 1.95996 be the 0.975 quantile of the standard normal. The Wald interval p^±zp^(1−p^)/N\hat p \pm z \sqrt{\hat p (1 - \hat p)/N} puts p^\hat p in the standard error. The Wilson score interval instead keeps pp in it and solves (p^−p)2≤z2p(1−p)/N(\hat p - p)^2 \le z^2 p (1 - p)/N for pp. This is the quadratic p2(1+z2/N)−p(2p^+z2/N)+p^2≤0p^2 (1 + z^2/N) - p (2 \hat p + z^2/N) + \hat p^2 \le 0, whose roots are

p^+z2/(2N)1+z2/N±z1+z2/Np^(1−p^)N+z24N2.\frac{\hat p + z^2/(2N)}{1 + z^2/N} \pm \frac{z}{1 + z^2/N} \sqrt{\frac{\hat p (1 - \hat p)}{N} + \frac{z^2}{4 N^2}}.

Both intervals have coverage close to 95 percent only in the limit. For small Np^N \hat p the Wald interval covers badly, and with no rejects it is the single point 00. The Wilson interval keeps close to its nominal coverage (Agresti and Coull 1998). The exact Clopper-Pearson interval has coverage at least 95 percent for every pp.

No rejects in NN samples. If no sample is a reject, the exact one-sided 95 percent upper bound on pp is pu=1−0.051/Np_u = 1 - 0.05^{1/N}. Proof. The probability of no reject is (1−p)N(1 - p)^N, which decreases in pp. A value p>pup > p_u gives (1−p)N<0.05(1-p)^N < 0.05, so the test that rejects pp when no reject is seen has level 0.050.05, and the set of values of pp that it does not reject is [0,pu][0, p_u]. Since 1−e−x≤x1 - e^{-x} \le x, pu=1−e−ln⁡(20)/N≤ln⁡(20)/N≈3.00/Np_u = 1 - e^{-\ln(20)/N} \le \ln(20)/N \approx 3.00/N. This is the rule of three (Hanley and Lippman-Hand 1983). ■\blacksquare

The output moments. The sample mean of the assembled outputs is an unbiased estimate of E[Y∣assembled]E[Y \mid \text{assembled}], with standard error σY/Na\sigma_Y/\sqrt{N_a} for NaN_a assembled samples. The sample variance with divisor Na−1N_a - 1 is an unbiased estimate of σY2\sigma_Y^2. For a normal output its standard error is σY22/(Na−1)\sigma_Y^2 \sqrt{2/(N_a - 1)}, which is about 0.30.3 percent of σY2\sigma_Y^2 for Na=200 000N_a = 200\,000.

Cost. Each sample costs one draw per dimension and one evaluation of ff, so the run costs O(N(n+Cf))O(N (n + C_f)) time for nn dimensions and an assembly solve of cost CfC_f. For vector loops CfC_f is a few Newton steps. The extra space is O(n)O(n), since the running moments replace the list of outputs; keep the list only for a histogram or quantiles.

Results. The proofs above are mathematical results. The numbers in the next section are measured with the code of this page and the stated seeds. There are no standard benchmarks for tolerance analysis, so no other numbers are given.

Classic examples

A linear stack against DLM. The housing gap G=A−B−C−DG = A - B - C - D of the stack-up page, with A=50±0.10A = 50 \pm 0.10 and B,C,D=20,15,14.8±0.05B, C, D = 20, 15, 14.8 \pm 0.05, is linear, so DLM is exact for it. With normal dimensions (σj=Tj/3\sigma_j = T_j/3) the predicted variance is 0.0175/9=0.00194440.0175/9 = 0.0019444. A run with N=200 000N = 200\,000 and seed 2026 gives the mean 0.199740.19974 and the variance 0.00194840.0019484, within one standard error of the variance (0.00000620.0000062). With uniform dimensions the predicted variance is 0.0175/3=0.00583330.0175/3 = 0.0058333, and the same run gives 0.00583390.0058339. With the lower limit lo=0.1lo = 0.1 and normal dimensions, the exact reject rate is Φ(−0.1/0.044096)=0.011671\Phi(-0.1/0.044096) = 0.011671. The run gives 23982398 rejects, p^=0.01199\hat p = 0.01199, a standard error of 0.000240.00024 and the Wilson interval (0.01152,0.01248)(0.01152, 0.01248), which contains the exact value. The tests check these agreements within four standard errors.

The one-way clutch. The pressure angle of Chase's clutch is ϕ=arccos⁡((a+c)/(e−c))\phi = \arccos((a + c)/(e - c)), with nominal a=27.645a = 27.645, c=11.43c = 11.43, e=50.8e = 50.8 mm and ϕ0=7.0184∘\phi_0 = 7.0184^\circ (see the DLM page). If a+c>e−ca + c > e - c, the roller does not fit. With normal dimensions, the same tolerance TT on each, N=100 000N = 100\,000 and seed 31:

TT (mm) DLM standard deviation MC standard deviation MC mean minus ϕ0\phi_0 second-order shift 12∑jHjjσj2\tfrac12 \sum_j H_{jj} \sigma_j^2 samples that do not fit
0.01270.0127 0.1230∘0.1230^\circ 0.1233∘0.1233^\circ −0.0011∘-0.0011^\circ −0.0011∘-0.0011^\circ 00
0.050.05 0.4844∘0.4844^\circ 0.4896∘0.4896^\circ −0.0172∘-0.0172^\circ −0.0169∘-0.0169^\circ 00
0.10.1 0.9688∘0.9688^\circ 1.0115∘1.0115^\circ −0.0733∘-0.0733^\circ −0.0675∘-0.0675^\circ 1414

At the smallest tolerance the linear result is good. As TT grows, the simulated spread exceeds the linear one and the mean moves below the nominal angle by about the second-order term of the DLM correctness proof, which DLM does not report. At T=0.1T = 0.1 some samples do not assemble. With uniform dimensions on ±0.1\pm 0.1, 12291229 of the 100 000100\,000 samples do not fit, p^=0.01229\hat p = 0.01229 with the Wilson interval (0.01163,0.01299)(0.01163, 0.01299); DLM gives a finite angle for every one of them.

Zero rejects. At T=0.0127T = 0.0127 every sample assembles. If a failure to fit is the only reject, the run has no reject and p^=0\hat p = 0. The Wald interval is then [0,0][0, 0], which claims too much. The Wilson upper limit for N=100 000N = 100\,000 is 3.84×10−53.84 \times 10^{-5}, and the exact one-sided bound is 1−0.051/N=2.996×10−51 - 0.05^{1/N} = 2.996 \times 10^{-5}, about 3/N3/N.

Variations

  • Variance reduction. Latin hypercube sampling (McKay, Beckman and Conover 1979) stratifies each input. When ff is monotone in each input, the variance of its mean is no larger than that of plain sampling, and it is much smaller when ff is close to a sum of functions of single inputs, as many assemblies are. Stratified sampling and quasi-Monte Carlo points do the same with other designs. The interval of this page assumes independent samples, so these designs need their own error estimate, such as independent replicates.
  • Rare rejects. For a reject rate in parts per million, plain sampling needs NN of the order of 10710^7. Importance sampling draws more samples near the limits and weights them back.
  • Other distributions. Any distribution with a sampler fits line L3: a truncated normal for a process with inspection, a shifted mean for tool wear, or an empirical distribution from measured parts. Correlated dimensions need a joint sampler.
  • Geometric tolerances. For form, orientation and position tolerances, line L3 draws a small displacement of each feature inside its tolerance zone, a point of a tolerance map or a torsor box, and ff is the torsor chain. The approximation is then the first-order one of the torsor model.
  • Sensitivities from the sample. A regression of the outputs on the inputs estimates the sensitivities, which the DLM gives exactly at the nominal point.
  • Allocation. Simulation can check the result of tolerance allocation, which uses a linear stack model.

Pitfalls

  • Too few samples for a small reject rate. With NN samples, rates far below 1/N1/N are invisible. Report the interval, not only p^\hat p.
  • The Wald interval at zero or few rejects. It gives a zero width interval at zero rejects and poor coverage near it. Use the Wilson or Clopper-Pearson interval, or the bound 1−0.051/N1 - 0.05^{1/N}.
  • The distribution is an assumption. The rule σ=T/3\sigma = T/3 is a convention, and real processes have shifted means and other shapes. The result is only as good as the model of variation; it is not a property of the drawing.
  • Silent no-fit samples. If ff returns a value for parts that do not assemble, for example a clipped arccos⁡\arccos, the simulation hides the failures. Make ff detect them, and count them as rejects.
  • Correlated dimensions. Two dimensions made in one setup are not independent. Independent sampling then gives the wrong spread.
  • Seeds and generators. Without a fixed seed a run cannot be repeated, and two methods compared with different random numbers differ by sampling noise as well. Use the same seed, or common random numbers, for comparisons.
  • Inherited linearization. A simulation through a first-order torsor or Jacobian model is only as accurate as that model; it does not remove the small-angle approximation.

Code

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

monte_carlo_tolerance_analysis.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/monte-carlo-tolerance-analysis/. The authors are listed in prov/XCJC4F.jsonl.

"""Monte Carlo tolerance analysis.

Each part dimension is a random variable given by a spec (kind, nominal, T):

- ("normal", m, T): normal with mean m and standard deviation T / 3;
- ("uniform", m, T): uniform on [m - T, m + T].

The assembly function f maps a dict of dimensions to the output, or to None
when the parts do not assemble. The simulation draws N independent samples
with random.Random(seed), evaluates f exactly on each, and returns the sample
mean and variance of the output and the estimated reject rate, with its
standard error and two confidence intervals.
"""

import math
import random

Z95 = 1.959963984540054  # the 0.975 quantile of the standard normal


def draw(rng, spec):
    kind, m, T = spec
    if kind == "normal":
        return rng.gauss(m, T / 3.0)
    if kind == "uniform":
        return rng.uniform(m - T, m + T)
    raise ValueError("unknown distribution %r" % (kind,))


def wald_interval(rejects, n, z=Z95):
    p = rejects / n
    h = z * math.sqrt(p * (1 - p) / n)
    return max(0.0, p - h), min(1.0, p + h)


def wilson_interval(rejects, n, z=Z95):
    p = rejects / n
    d = 1 + z * z / n
    centre = (p + z * z / (2 * n)) / d
    h = z / d * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n))
    return max(0.0, centre - h), min(1.0, centre + h)


def zero_reject_upper_bound(n, alpha=0.05):
    """Exact one-sided upper bound on p when no reject is seen in n samples."""
    return 1 - alpha ** (1.0 / n)


def simulate(f, specs, n, seed, lower=-math.inf, upper=math.inf):
    """Run n samples. specs is a dict name -> (kind, nominal, T).

    An output outside [lower, upper], or a sample that does not assemble,
    is a reject. Mean and variance are over the samples that assemble.
    """
    rng = random.Random(seed)
    names = sorted(specs)
    rejects = 0  # @line L1
    no_fit = 0
    count, mean, m2 = 0, 0.0, 0.0
    for _ in range(n):  # @line L2
        x = {name: draw(rng, specs[name]) for name in names}  # @line L3
        y = f(x)  # @line L4
        if y is None:  # @line L5
            no_fit += 1
            rejects += 1
            continue
        if y < lower or y > upper:  # @line L6
            rejects += 1
        count += 1  # @line L7
        d = y - mean
        mean += d / count
        m2 += d * (y - mean)
    p = rejects / n  # @line L8
    se = math.sqrt(p * (1 - p) / n)
    var = m2 / (count - 1) if count > 1 else float("nan")
    return {  # @line L9
        "n": n,
        "assembled": count,
        "no_fit": no_fit,
        "mean": mean,
        "var": var,
        "rejects": rejects,
        "p": p,
        "se": se,
        "wald": wald_interval(rejects, n),
        "wilson": wilson_interval(rejects, n),
        "upper_if_zero": zero_reject_upper_bound(n) if rejects == 0 else None,
    }
test_monte_carlo_tolerance_analysis.py 137 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/monte-carlo-tolerance-analysis/. The authors are listed in prov/XCJC4F.jsonl.

import math
import random

import pytest

from monte_carlo_tolerance_analysis import simulate, wilson_interval, zero_reject_upper_bound

STACK = {"A": 50.0, "B": 20.0, "C": 15.0, "D": 14.8}
STACK_T = {"A": 0.10, "B": 0.05, "C": 0.05, "D": 0.05}
COEF = {"A": 1.0, "B": -1.0, "C": -1.0, "D": -1.0}


def gap(x):
    return x["A"] - x["B"] - x["C"] - x["D"]


def phi(z):
    return 0.5 * (1 + math.erf(z / math.sqrt(2)))


def dlm_linear(sd):
    """DLM on the linear stack: mean = nominal output, variance = sum a_j^2 sd_j^2."""
    mean = sum(COEF[n] * STACK[n] for n in STACK)
    var = sum((COEF[n] * sd[n]) ** 2 for n in STACK)
    return mean, var


@pytest.mark.parametrize("kind,div", [("normal", 3.0), ("uniform", math.sqrt(3.0))])
def test_linear_stack_agrees_with_dlm(kind, div):
    n = 200_000
    specs = {k: (kind, STACK[k], STACK_T[k]) for k in STACK}
    res = simulate(gap, specs, n, seed=2026)
    mean, var = dlm_linear({k: STACK_T[k] / div for k in STACK})
    se_mean = math.sqrt(var / n)
    # For a normal output the sample variance has standard error var * sqrt(2 / (n - 1)).
    # A sum of uniforms has lighter tails, so this bound is conservative for it.
    se_var = var * math.sqrt(2.0 / (n - 1))
    assert abs(res["mean"] - mean) <= 4 * se_mean
    assert abs(res["var"] - var) <= 4 * se_var
    assert res["assembled"] == n


def test_reject_rate_matches_exact_normal_probability():
    n = 200_000
    specs = {k: ("normal", STACK[k], STACK_T[k]) for k in STACK}
    res = simulate(gap, specs, n, seed=7, lower=0.1)
    mean, var = dlm_linear({k: STACK_T[k] / 3 for k in STACK})
    p = phi((0.1 - mean) / math.sqrt(var))
    assert 0.011 < p < 0.012
    assert abs(res["p"] - p) <= 4 * math.sqrt(p * (1 - p) / n)
    lo, hi = res["wilson"]
    assert lo < p < hi


def test_estimator_is_unbiased_with_the_stated_standard_error():
    """Many short runs: the average of p_hat is p and its spread is sqrt(p(1-p)/N)."""
    p_true, n, runs = 0.1, 500, 400
    specs = {"x": ("uniform", 0.5, 0.5)}  # uniform on [0, 1]
    ests, covered = [], 0
    for r in range(runs):
        res = simulate(lambda x: x["x"], specs, n, seed=1000 + r, upper=1 - p_true)
        ests.append(res["p"])
        lo, hi = res["wilson"]
        covered += lo <= p_true <= hi
    avg = sum(ests) / runs
    var = sum((e - avg) ** 2 for e in ests) / (runs - 1)
    se_true = math.sqrt(p_true * (1 - p_true) / n)
    assert abs(avg - p_true) <= 4 * se_true / math.sqrt(runs)
    assert abs(var / se_true ** 2 - 1) <= 0.3
    assert covered / runs >= 0.90


def test_zero_rejects_upper_bound():
    n = 3000
    res = simulate(lambda x: x["x"], {"x": ("uniform", 0.0, 1.0)}, n, seed=1, lower=-2, upper=2)
    assert res["rejects"] == 0 and res["p"] == 0 and res["se"] == 0
    u = res["upper_if_zero"]
    assert u == pytest.approx(zero_reject_upper_bound(n))
    assert (1 - u) ** n == pytest.approx(0.05)
    assert 0.9 * 3 / n < u < 3 / n


def test_parts_that_do_not_fit_are_rejects():
    n = 20_000
    specs = {"x": ("normal", 0.0, 3.0)}
    res = simulate(lambda x: None if x["x"] > 1 else x["x"], specs, n, seed=5)
    rng = random.Random(5)
    expected = sum(rng.gauss(0.0, 1.0) > 1 for _ in range(n))
    assert res["no_fit"] == expected == res["rejects"]
    assert res["assembled"] == n - expected
    assert abs(res["p"] - (1 - phi(1.0))) <= 4 * math.sqrt(0.16 * 0.84 / n)


def test_same_seed_same_result():
    specs = {k: ("normal", STACK[k], STACK_T[k]) for k in STACK}
    a = simulate(gap, specs, 5000, seed=99, lower=0.1)
    b = simulate(gap, specs, 5000, seed=99, lower=0.1)
    assert a == b


CLUTCH = {"a": 27.645, "c": 11.43, "e": 50.8}


def clutch_phi(x):
    q = (x["a"] + x["c"]) / (x["e"] - x["c"])
    return math.acos(q) if q <= 1 else None


def test_nonlinear_mean_shift_matches_second_order_estimate():
    """On the clutch the output mean moves by about 1/2 sum H_jj sigma_j^2, which DLM does not see."""
    T = 0.05
    sd = T / 3
    n = 100_000
    specs = {k: ("normal", CLUTCH[k], T) for k in CLUTCH}
    res = simulate(clutch_phi, specs, n, seed=31)
    phi0 = clutch_phi(CLUTCH)
    h = 1e-3
    bias = 0.0
    for k in CLUTCH:
        xp, xm = dict(CLUTCH), dict(CLUTCH)
        xp[k] += h
        xm[k] -= h
        hkk = (clutch_phi(xp) - 2 * phi0 + clutch_phi(xm)) / (h * h)
        bias += 0.5 * hkk * sd * sd
    se = math.sqrt(res["var"] / n)
    assert abs(bias) > 8 * se
    assert abs((res["mean"] - phi0) - bias) <= 4 * se + 0.15 * abs(bias)


def test_wilson_interval_endpoints():
    lo, hi = wilson_interval(0, 100)
    assert lo == pytest.approx(0, abs=1e-15) and 0.03 < hi < 0.04
    lo, hi = wilson_interval(50, 100)
    assert lo == pytest.approx(1 - hi)

Exercises

  1. Show that the Wilson interval with p^=1/2\hat p = 1/2 is symmetric about 1/21/2, and that with p^=0\hat p = 0 its lower limit is 00 and its upper limit is (z2/N)/(1+z2/N)(z^2/N)/(1 + z^2/N).
  2. How many samples are needed to show, with 95 percent confidence and no rejects seen, that the reject rate is below 100 parts per million?
  3. For the clutch at T=0.05T = 0.05, compute 12∑jHjjσj2\tfrac12 \sum_j H_{jj} \sigma_j^2 from the closed form of ϕ\phi and compare it with the table.
  4. A sample is a reject when it breaks the lower or the upper limit. Show that the indicators of the two events are not independent, and that the estimate p^\hat p of the total reject rate is still unbiased.
  5. Show that for a linear ff and normal inputs, the simulated output is exactly normal with the RSS variance, so that the only error of the simulation is the sampling error.

References

  1. Christian P. Robert and George Casella, Monte Carlo Statistical Methods, second edition, Springer, 2004, Chapter 3, Monte Carlo integration (the empirical average, its variance and its convergence)
  2. Edwin B. Wilson, Probable inference, the law of succession, and statistical inference, Journal of the American Statistical Association 22(158), 1927, pp. 209 to 212 (the score interval for a proportion)
  3. C. J. Clopper and E. S. Pearson, The use of confidence or fiducial limits illustrated in the case of the binomial, Biometrika 26(4), 1934, pp. 404 to 413 (exact confidence limits for a binomial proportion)
  4. Alan Agresti and Brent A. Coull, Approximate is better than "exact" for interval estimation of binomial proportions, The American Statistician 52(2), 1998, pp. 119 to 126 (the poor coverage of the Wald interval and the score interval)
  5. James A. Hanley and Abby Lippman-Hand, If nothing goes wrong, is everything all right? Interpreting zero numerators, JAMA 249(13), 1983, the rule of three for zero events
  6. Michael D. McKay, Richard J. Beckman and William J. Conover, A comparison of three methods for selecting values of input variables in the analysis of output from a computer code, Technometrics 21(2), 239 to 245, 1979, the whole paper (Latin hypercube sampling against simple random sampling)
  7. Paul J. Drake, Jr. (editor), Dimensioning and Tolerancing Handbook, McGraw-Hill, 1999, the chapters on statistical tolerance analysis of assemblies (general locator)
  8. Hua Chen, Sun Jin, Zhimin Li and Xinmin Lai, A comprehensive study of three dimensional tolerance analysis methods, Computer-Aided Design 53, 1 to 13, 2014, the comparison of the 3D tolerance analysis methods (general locator)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples