Class UncertaintyBudget<Q extends Quantity<Q>>
java.lang.Object
org.episteme.core.measure.metrology.UncertaintyBudget<Q>
An uncertainty budget following ISO/IEC Guide 98-3 (GUM) methodology.
Combines multiple uncertainty sources (Type A and Type B) to compute the combined standard uncertainty and expanded uncertainty.
Example Usage:
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUncertainty classification per GUM. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSource(String name, Quantity<Q> uncertainty, UncertaintyBudget.UncertaintyType type) Adds an uncertainty source to the budget.voidaddSource(String name, Quantity<Q> uncertainty, UncertaintyBudget.UncertaintyType type, Real sensitivityCoefficient) Adds an uncertainty source with sensitivity coefficient.Generates a formatted uncertainty budget report.Returns the combined standard uncertainty.Returns the contribution of each source to the combined uncertainty.getExpandedUncertainty(double coverageFactor) Returns the expanded uncertainty.Returns the sensitivity coefficients for all sources.
-
Constructor Details
-
UncertaintyBudget
public UncertaintyBudget()
-
-
Method Details
-
addSource
Adds an uncertainty source to the budget.- Parameters:
name- the source name (e.g., "Repeatability", "Calibration")uncertainty- the standard uncertainty contributiontype- the uncertainty type (A or B)
-
addSource
public void addSource(String name, Quantity<Q> uncertainty, UncertaintyBudget.UncertaintyType type, Real sensitivityCoefficient) Adds an uncertainty source with sensitivity coefficient.The sensitivity coefficient c_i represents ∂f/∂x_i, the partial derivative of the measurement function with respect to the input.
- Parameters:
name- the source nameuncertainty- the standard uncertaintytype- the uncertainty typesensitivityCoefficient- the sensitivity coefficient c_i
-
getCombinedUncertainty
-
getExpandedUncertainty
Returns the expanded uncertainty.Expanded uncertainty U = k × u_c, where k is the coverage factor. Common values:
- k = 2 for ~95% confidence
- k = 3 for ~99.7% confidence
- Parameters:
coverageFactor- the coverage factor k- Returns:
- the expanded uncertainty
-
getSensitivityCoefficients
-
getContributions
-
generateReport
Generates a formatted uncertainty budget report.- Returns:
- the formatted report
-