Skip to main content

Crate sim_lib_numbers_stats

Crate sim_lib_numbers_stats 

Source
Expand description

Probability, descriptive statistics, and fairness metric helpers for f64 number-domain data.

Descriptive statistics and disparate-impact helpers also expose Claim surfaces. The Claim values carry their subject, predicate, and evidence table as inspectable runtime data, so callers can browse both the computed metric and the inputs used to justify it.

Structs§

BinaryOutcomeCounts
Counts for a binary selection or outcome table.
DisparateImpact
Disparate-impact summary for two binary-outcome groups.
FairnessClaimValue
A first-class runtime object wrapping the fairness Claim and its evidence.
FairnessEvidence
Evidence carried by the disparate-impact fairness Claim.
StatsClaimEvidence
Evidence carried by a descriptive statistics Claim.
StatsClaimValue
A first-class runtime object wrapping a descriptive statistics Claim.
StatsNumbersLib
Library that installs the runtime statistics functions.

Enums§

StatsError
Errors returned by probability, statistics, and fairness helpers.

Functions§

bayesian_update
Computes prior * likelihood / evidence and validates the posterior.
bayesian_update_binary
Computes a binary-test posterior from prior, true-positive, and false-positive rates.
disparate_impact
Computes disparate impact and the four-fifths pass/fail flag.
entropy
Computes Shannon entropy in bits for a probability vector that sums to one.
fairness_claim
Builds the public disparate-impact fairness Claim and interns its evidence object.
fairness_claim_value
Wraps a fairness Claim as a runtime value.
four_fifths_ratio
Computes the comparison/reference rate ratio used by the four-fifths rule.
mean
Computes the arithmetic mean of finite values.
population_variance
Computes population variance with divisor n.
sample_variance
Computes sample variance with divisor n - 1.
stats_claims_symbol
Returns the symbol bound to the stats/claims batch operation.
stats_disparate_impact_claim_symbol
Returns the symbol bound to the stats/disparate-impact-claim operation.
stats_entropy_claim_symbol
Returns the symbol bound to the stats/entropy-claim operation.
stats_mean_claim_symbol
Returns the symbol bound to the stats/mean-claim operation.
stats_result_claim
Builds the public descriptive statistics Claim and interns its evidence object.
stats_result_claim_value
Wraps a descriptive statistics Claim as a runtime value.
stats_variance_claim_symbol
Returns the symbol bound to the stats/variance-claim operation.
variance
Computes population variance.

Type Aliases§

StatsResult
Result alias for the statistics helpers, fixing the error to StatsError.