Class MeasurementSeries<Q extends Quantity<Q>>
java.lang.Object
org.episteme.core.measure.metrology.MeasurementSeries<Q>
Statistical analysis of repeated measurements.
Collects multiple measurements of the same quantity and provides statistical analysis including mean, standard deviation, confidence intervals, and outlier detection.
Example Usage:
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOutlier detection methods. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMeasurement(Quantity<Q> value) Adds a measurement to the series.Detects outliers using the specified method.getConfidenceInterval(double confidenceLevel) Returns a measurement with confidence interval.intgetCount()Returns the number of measurements.getMean()Returns the arithmetic mean of all measurements.Returns the mean excluding detected outliers.Returns the sample standard deviation.Returns the standard error of the mean (SEM).
-
Constructor Details
-
MeasurementSeries
public MeasurementSeries()
-
-
Method Details
-
addMeasurement
-
getCount
public int getCount()Returns the number of measurements.- Returns:
- the count
-
getMean
Returns the arithmetic mean of all measurements.- Returns:
- the mean value
- Throws:
IllegalStateException- if no measurements
-
getStandardDeviation
Returns the sample standard deviation.Uses Bessel's correction (n-1 denominator).
- Returns:
- the standard deviation
- Throws:
IllegalStateException- if fewer than 2 measurements
-
getStandardError
-
getConfidenceInterval
Returns a measurement with confidence interval.For normal distributions:
- 68.3% → mean ± 1×SEM
- 95.4% → mean ± 2×SEM
- 99.7% → mean ± 3×SEM
- Parameters:
confidenceLevel- the confidence level (e.g., 0.95)- Returns:
- the mean with uncertainty
-
detectOutliers
Detects outliers using the specified method.- Parameters:
method- the outlier detection method- Returns:
- the set of detected outliers
-
getMeanExcludingOutliers
Returns the mean excluding detected outliers.- Returns:
- the trimmed mean with confidence interval
-