moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses module
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.BasicStats(n: int, x_mean: float, S: float, S_x_mean: float, S_biased: float)
Bases:
objectClause 5. Estimate of the measured value and standard deviation.
- n
Number of measurement results.
- Type:
int
- x_mean
Arithmetic mean value.
- Type:
float
- S
Standard deviation
S.- Type:
float
- S_x_mean
Standard deviation of the arithmetic mean.
- Type:
float
- S_biased
Biased standard deviation
S*.- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.CompositeCriterion1Result(d: float, d_low: float, d_high: float, passed: bool)
Bases:
objectClause 7. Confidence limits for random error.
Clause 7.3 applies for
15 < n <= 50. Criterion 1, Appendix B.- d
Computed ratio
d~.- Type:
float
- d_low
Lower quantile of the distribution.
- Type:
float
- d_high
Upper quantile of the distribution.
- Type:
float
- passed
Trueif the criterion is satisfied.- Type:
bool
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.CompositeCriterion2Result(threshold: float, exceed_count: int, allowed_exceed_count: int, p_value_table: float, z_value: float, passed: bool)
Bases:
objectClause 7. Confidence limits for random error.
Clause 7.3 applies for
15 < n <= 50. Criterion 2, Appendix B.- threshold
Threshold value
z_p/2 * S.- Type:
float
- exceed_count
Number of values
abs(x_i - x_mean)above the threshold.- Type:
int
- allowed_exceed_count
Allowed count
mfrom Table B.2.- Type:
int
- p_value_table
Probability value from Table B.2.
- Type:
float
- z_value
Upper quantile from Table B.3.
- Type:
float
- passed
Trueif the criterion is satisfied.- Type:
bool
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.CompositeNormalityResult(n: int, x_mean: float, S: float, S_biased: float, criterion_1: CompositeCriterion1Result, criterion_2: CompositeCriterion2Result, passed: bool)
Bases:
objectClause 7. Confidence limits for random error.
Clause 7.3 applies for
15 < n <= 50. Result of the normality hypothesis test for measurement results.- n
Number of measurement results.
- Type:
int
- x_mean
Arithmetic mean value.
- Type:
float
- S
Standard deviation
S.- Type:
float
- S_biased
Biased standard deviation
S*.- Type:
float
- criterion_1
Result of Criterion 1 from Appendix B.
- criterion_2
Result of Criterion 2 from Appendix B.
- passed
Trueif both criteria are satisfied.- Type:
bool
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.GrubbsCheck(n: int, x_mean: float, S: float, x_min: float, x_max: float, g_min: float, g_max: float, g_crit: float)
Bases:
objectClause 6. Detection and elimination of gross errors.
- n
Number of measurement results.
- Type:
int
- x_mean
Arithmetic mean value.
- Type:
float
- S
Standard deviation
S.- Type:
float
- x_min
Minimum measurement result.
- Type:
float
- x_max
Maximum measurement result.
- Type:
float
- g_min
Computed Grubbs criterion for the minimum value.
- Type:
float
- g_max
Computed Grubbs criterion for the maximum value.
- Type:
float
- g_crit
Theoretical Grubbs criterion.
- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.GrubbsResult(cleaned_values: list, removed: list, checks: list[GrubbsCheck])
Bases:
objectClause 6. Detection and elimination of gross errors.
- cleaned_values
Filtered measurement results.
- Type:
list
- removed
Removed measurement results.
- Type:
list
- checks
Results for each Grubbs test iteration.
- Type:
list[GrubbsCheck]
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.MisesSmirnovNormalityResult(n: int, x_mean: float, S: float, n_omega2: float, a_value: float, alpha: float, threshold: float, passed: bool, rows: list[MisesSmirnovRow])
Bases:
objectAppendix G. Result of the
omega^2normality test.- n
Number of measurement results.
- Type:
int
- x_mean
Arithmetic mean.
- Type:
float
- S
Standard deviation of the measurement results.
- Type:
float
- n_omega2
Computed statistic
nOmega^2.- Type:
float
- a_value
Function value
a(x)from Table G.3.- Type:
float
- alpha
Significance level.
- Type:
float
- threshold
Threshold equal to
1 - alpha.- Type:
float
- passed
Trueif the normality hypothesis is not rejected.- Type:
bool
- rows
Intermediate calculation rows.
- Type:
list[MisesSmirnovRow]
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.MisesSmirnovRow(j: int, x_j: float, a_j: float, F_xj: float, ln_F_xj: float, one_minus_a_j: float, one_minus_F_xj: float, ln_one_minus_F_xj: float, term: float)
Bases:
objectAppendix G. Intermediate values for the
omega^2criterion.- j
Index of the ordered measurement result.
- Type:
int
- x_j
Measurement result value.
- Type:
float
- a_j
Coefficient
(2j - 1) / (2n).- Type:
float
- F_xj
Theoretical normal distribution value
F(x_j).- Type:
float
- ln_F_xj
ln(F(x_j)).- Type:
float
- one_minus_a_j
Value
1 - a_j.- Type:
float
- one_minus_F_xj
Value
1 - F(x_j).- Type:
float
- ln_one_minus_F_xj
ln(1 - F(x_j)).- Type:
float
- term
Summand in formula
(G.1).- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.PearsonInterval(index: int, left: float, right: float, center: float, observed: int, expected: float, y: float, contribution: float)
Bases:
objectClause 7. Confidence limits for random error.
Clause 7.4 applies for
n > 50.- index
Interval index
i.- Type:
int
- left
Left interval boundary.
- Type:
float
- right
Right interval boundary.
- Type:
float
- center
Interval center
x_i0.- Type:
float
- observed
Observed count of measurements in the interval.
- Type:
int
- expected
Expected count of measurements in the interval.
- Type:
float
- y
Probability of falling into interval
i.- Type:
float
- contribution
Computed Pearson criterion contribution.
- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.PearsonNormalityResult(n: int, r: int, h: float, x_mean: float, S: float, chi2_value: float, df: int, alpha: float, chi2_low: float, chi2_high: float, passed: bool, intervals: list[PearsonInterval])
Bases:
objectClause 7. Confidence limits for random error.
Clause 7.4 applies for
n > 50. Result of the Pearson normality hypothesis test.- n
Number of measurement results.
- Type:
int
- r
Number of grouping intervals.
- Type:
int
- h
Grouping interval width.
- Type:
float
- x_mean
Arithmetic mean value.
- Type:
float
- S
Standard deviation
S.- Type:
float
- chi2_value
Computed Pearson criterion value.
- Type:
float
- df
Degrees of freedom.
- Type:
int
- alpha
Significance level.
- Type:
float
- chi2_low
Lower critical bound for
chi^2.- Type:
float
- chi2_high
Upper critical bound for
chi^2.- Type:
float
- passed
Trueif the normality hypothesis is not rejected.- Type:
bool
- intervals
Grouping intervals and Pearson parameters.
- Type:
list[PearsonInterval]
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.RandomErrorConfidenceResult(n: int, p_conf: float, df: int, x_mean: float, S: float, S_x_mean: float, t_value: float, delta: float)
Bases:
objectClause 7.5. Confidence limits for the random error.
- n
Number of measurement results.
- Type:
int
- p_conf
Confidence probability
P.- Type:
float
- df
Degrees of freedom
n - 1.- Type:
int
- x_mean
Arithmetic mean value.
- Type:
float
- S
Standard deviation
S.- Type:
float
- S_x_mean
Standard deviation of the arithmetic mean.
- Type:
float
- t_value
Student coefficient.
- Type:
float
- delta
Confidence limit of the random error without sign.
- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.RoundedMeasurementResult(x_raw: float, delta_raw: float, p_conf: float, x_rounded: float, delta_rounded: float, delta_significant_digits: int, decimal_places: int, notation: str)
Bases:
objectClause 10. Presentation of the estimate of the measured value.
Appendix E. Rounding rules.
- x_raw
Original estimate of the measured value.
- Type:
float
- delta_raw
Original unsigned error.
- Type:
float
- p_conf
Confidence probability.
- Type:
float
- x_rounded
Rounded estimate of the measured value.
- Type:
float
- delta_rounded
Rounded error.
- Type:
float
- delta_significant_digits
Number of significant digits retained in the error.
- Type:
int
- decimal_places
Number of decimal places in the final notation.
- Type:
int
- notation
Final formatted result, for example
x ± Delta, P=....- Type:
str
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.SystematicComponent(name: str, theta: float, influence_coefficient: float = 1.0)
Bases:
objectClause 8. Confidence limits for the unexcluded systematic error.
One systematic error component.
- name
Component name.
- Type:
str
- theta
Unsigned limit of the component.
- Type:
float
- influence_coefficient
Influence coefficient
dX/dY. If not specified, it is assumed to be1.- Type:
float
- effective_theta
Effective component limit equal to
abs(influence_coefficient) * abs(theta).- Type:
float
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.SystematicErrorResult(m: int, p_conf: float, k: float, theta_sum: float, method: str, components: list[SystematicComponent])
Bases:
objectClause 8. Confidence limits for the unexcluded systematic error.
- m
Number of systematic components.
- Type:
int
- p_conf
Confidence probability.
- Type:
float
- k
Composition coefficient.
- Type:
float
- theta_sum
Final unsigned systematic error limit.
- Type:
float
- method
Calculation method:
none,sum, orrss.- Type:
str
- components
List of components.
- Type:
list[SystematicComponent]
- class moncenterlib.stats.stats_gost_R_8_736_2011.dataclasses.TotalErrorResult(p_conf: float, x_mean: float, delta_random: float, theta_systematic: float, s_x_mean: float, s_theta: float, s_total: float, k_total: float, delta_total: float, theta_mode: str, theta_k: float | None = None)
Bases:
objectClause 9. Confidence limits for the error in the estimate of the measured value.
- p_conf
Confidence probability.
- Type:
float
- x_mean
Estimate of the measured value.
- Type:
float
- delta_random
Confidence limit of the random error.
- Type:
float
- theta_systematic
Systematic error limit.
- Type:
float
- s_x_mean
Standard deviation of the arithmetic mean.
- Type:
float
- s_theta
Standard deviation of the systematic error.
- Type:
float
- s_total
Total standard deviation of the estimate.
- Type:
float
- k_total
Coefficient
Kfrom formula(12).- Type:
float
- delta_total
Final confidence limit of the total error.
- Type:
float
- theta_mode
Systematic error interpretation mode:
plainfor formula(14), orconfidencefor formula(15).- Type:
str
- theta_k
Coefficient
kfrom Clause 8, used only inconfidencemode.- Type:
float | None