
Moments
Statistics library · 0.1.0Summarize paired observations as they arrive and merge statistics from independent batches.
Import functions into your Blyx program. Measure audio levels with FrameSignal or summarize observations with Moments.

Summarize paired observations as they arrive and merge statistics from independent batches.

Detect persistent shifts in a sequence of standardized observations with a two-sided cumulative sum.

Measure threshold decisions, false alarms, missed positives and their costs.

Check agreement between predicted probabilities and observed outcomes.

Score ranked search or RAG results without giving repeated document IDs extra credit.

Locate a clock tick within a scheduled publication window.

Count independent reviewers and calculate outstanding approvals.

Reconcile on-hand inventory with individual outstanding reservations.

Round a shortage to a supplier's whole purchase lots.

Extend paired invoice quantities and prices in integer minor units.

Apply posted payments and preserve customer credit separately.

Summarize portable process exit codes without losing the first failure.

Bound the next batch of an interrupted command.

Count greedy terminal lines from premeasured word widths.

Clamp a terminal scroll offset to a filled viewport.

Locate a fixed-width chunk including the final partial chunk.

Recover the first unfinished chunk from an ordered checkpoint log.

Measure intersection and union of two axis-aligned image boxes.

Clip a detection rectangle to the visible image.

Measure peak amplitude and mean-square energy of a signal frame.

Count overloaded samples and the longest continuous run.

Locate active frames in a sequence of nonnegative signal levels.

Count activity segments while bridging short internal silences.

Find a projected planar extent from paired point coordinates.

Find grid indices containing both extrema of a closed planar extent.

Count observed taxa and singletons from an abundance vector.

Compute Simpson dominance and its complement from abundance counts.

Count incoming and outgoing edges at a named numeric vertex.

Audit exact repeated directed edges and self-loops.

Measure the deepest historical peak-to-trough equity decline.

Measure how long an equity series stayed below its running peak.

Find the largest per-asset deviation between two weight vectors.

Calculate one-way turnover for two fully allocated long-only weight vectors.

Find closing and lowest balances along an ordered cash-flow schedule.

Locate the first reserve breach and count all deficient period ends.

Classify a message lease against a single monotonic clock.

Compute saturating exponential retry delays without unbounded exponentiation.

Refill a rate bucket up to its burst capacity.

Compute the wait required for a token charge within a relative deadline.

Audit an ordered offset trace against an expected starting value.

Find the longest contiguous acknowledgement prefix in unordered deliveries.

Validate a preorder field-depth trace from an expanded query plan.

Estimate expanded resolver work using per-field costs and visit counts.

Propagate a parent time budget across elapsed RPC stages.

Check a conservative retry policy for selected gRPC status codes.

Resolve a single inclusive HTTP byte range to an offset and length.

Resolve an HTTP suffix-byte specification without negative offsets.

Locate time-order anomalies in a log stream in receipt order.

Count forward gaps and nonadvancing IDs in an audit export.

Evaluate activation and expiration bounds on previously verified claims.

Check session freshness and an application-defined ordered assurance level.

Normalize observed failures by an allowed error fraction.

Account for whole allowed failures in an observed window.

Pool event counts and expose the crude observed rate.

Directly standardize stratum-specific rates to a reference population.

Update a Beta prior with Bernoulli counts.

Calculate the mean and variance of a Beta distribution.

Apply I, X, Z or Hadamard to a normalized real-amplitude qubit.

Compare computational-basis shot frequencies to a real qubit's probabilities.

Measure even/odd parity from a two-bit measurement histogram.

Extract both individual bit frequencies from joint two-bit shots.

Integrate sampled values by the composite trapezoidal rule in input order.

Locate the coarsest gap and count nonincreasing steps in a sample grid.

Compute a chart domain and expand a constant-valued series.

Choose a covering linear tick lattice using steps 1, 2, 5 or 10 times a power of ten.

Locate a nearest-rank quantile in noncumulative histogram counts.

Look up the finite interval represented by a histogram bin.

Validate an applied migration log against a strictly increasing release manifest.

Detect changed fingerprints for previously applied migrations.

Check a cursor key sequence for repeated and descending adjacent values.

Find a keyset page strictly after a cursor in sorted keys.

Find repeated primary-key occurrences in an offline table export.

Count child rows referencing absent numeric parent keys.

Advance an already calculated HTTP cache age on a monotonic clock.

Classify a cache entry under an explicit stale-serving policy.

Summarize observed packet transit differences and arrival reorderings.

Estimate interarrival jitter with the RFC 3550 one-sixteenth update.

Find unrecognized fields after mapping schema keys to stable IDs.

Find missing unique required keys in an object shape.

Resolve a numeric setting across ordered configuration layers.

Check a numeric setting against inclusive bounds and explain the violation.

Locate the nonempty length-prefixed record containing a byte offset.

Compute the RFC 1950 Adler-32 checksum over a sequence of bytes.

Place unsplittable document blocks on successive pages in input order.

Compute the usable print area and whole lines per page.

Fit an image inside a box while preserving aspect ratio.

Estimate uncompressed raster storage with aligned scanlines.

Convert a nonnegative frame tick to seconds using a rational time base.

Audit a sorted list of half-open subtitle cue intervals.

Count log records at or above an OpenTelemetry severity number.

Allocate a bounded log buffer with higher priority for important records.

Validate a proleptic Gregorian date and calculate its day-of-year.

Count Gregorian days before January 1 of a year.

Measure union length and coverage components of sorted half-open intervals.

Find peak simultaneous occupancy of half-open intervals.

Convert a local tick to a candidate UTC tick for a supplied offset.

Classify a local time around one supplied offset transition.

Audit fixed-step indentation measured on nonblank source lines.

Find overlong source lines from measured display columns.

Compare two numeric semantic-version cores lexicographically.

Check membership of a numeric-version core in a half-open dependency interval.

Validate indexed dependencies in an ordered build forest.

Find the critical-path time in a forest of dependent tasks.

Summarize equal-value runs in a nondecreasing integer stream.

Count unique keys shared or exclusive to two sorted streams.

Expand a byte request to whole storage blocks.

Count merged reads and extra gap bytes for sorted byte requests.