tolerancing.distributions#
Tolerance Distributions Module
This module contains the statistical distributions used to draw tolerance deviations between a lower and an upper limit in Monte Carlo analyses.
Kramer Harrison, 2026
Functions
|
Return a distribution instance from a name or an instance. |
Classes
Base class for distributions of a deviation between two limits. |
|
|
Distribution that returns either limit with equal probability. |
Distribution with density proportional to the squared distance from the midpoint, so that values near the limits are the most likely. |
|
|
Normal distribution truncated at the limits. |
|
Uniform distribution between the limits. |
- class Distribution[source]#
Base class for distributions of a deviation between two limits.
Sampling always runs on a NumPy generator, independent of the active backend, so that results are reproducible across backends.
- class Parabolic[source]#
Distribution with density proportional to the squared distance from the midpoint, so that values near the limits are the most likely.
- class TruncatedNormal(num_sigma: float = 2.0)[source]#
Normal distribution truncated at the limits.
The mean is the midpoint of the limits and the standard deviation is chosen so that each limit lies
num_sigmastandard deviations from the mean.- Parameters:
num_sigma – Number of standard deviations between the mean and each limit. Defaults to 2.
- get_distribution(distribution: str | Distribution) Distribution[source]#
Return a distribution instance from a name or an instance.
- Parameters:
distribution – One of
"normal"(truncated at ±2σ),"uniform","parabolic"or"end_point", or aDistributioninstance.- Returns:
The distribution instance.
- Raises:
ValueError – If the name is unknown.