---
title: "mlab-builtins-stats-descriptive — Mova code model"
description: "Mova code model of mlab/src/builtins/stats.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/mlab/src/builtins/stats.rs.groupant/descriptive.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/mlab/src/builtins/stats.rs.groupant/descriptive.groupant/>

# mlab-builtins-stats-descriptive

The groupant beside mlab/src/builtins/stats.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`mlab/src/builtins/stats.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/src/builtins/stats.rs)
- **source SHA-256:** `bdc3772b09d9113e…`
- **covers:** quantile cleans NaNs, sorts then interpolates pos=np+.5 with endpoints clamped; mode delegates table agg. moments drops NaN, covariance does not. cov scalar0/1 second arg treated normalization when first numel>1. histogram final edge included in last bin. (bytes 7891–15577)
- **part of:** [mlab-builtins-stats](https://md.groupants.elamur.ai/free/en/mova/mlab/src/builtins/stats.rs.groupant/)
- **repository folder:** [`mlab/src/builtins/stats.rs.groupant/descriptive.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/src/builtins/stats.rs.groupant/descriptive.groupant)
- **repository commit:** `48f2e6f74146`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | partial bounded parent evidence | [tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `quantile_coordinates` | quantile_coordinates | partial source derived model | [quantile_coordinates](#quantile-coordinates) |
| `covariance_policy` | covariance_policy | partial source derived model | [covariance_policy](#covariance-policy) |
| `branch_relation` | branch_relation | partial source derived model | [branch_relation](#branch-relation) |
| `resource_cost` | resource_cost | partial source derived model | [resource_cost](#resource-cost) |

## Model text


### descriptant

#### mlab-builtins-stats-descriptive

quantile cleans NaNs, sorts then interpolates pos=np+.5 with endpoints clamped; mode delegates table agg. moments drops NaN, covariance does not. cov scalar0/1 second arg treated normalization when first numel>1. histogram final edge included in last bin.

Epoch 2026-10-31: isolated source-bound fragment over bytes [7891,15577); includes no claim beyond this relation. Source hash bdc3772b09d9113e108afa29e391fee97a5372caf9052bb1689996c41c94116f.

### approximant

#### descriptive: forward relation

quantile cleans NaNs, sorts then interpolates pos=np+.5 with endpoints clamped; mode delegates table agg. moments drops NaN, covariance does not. cov scalar0/1 second arg treated normalization when first numel>1. histogram final edge included in last bin.

Domain: Finite, well-shaped bounded observations unless branch explicitly describes NaN/Inf. Direct public chi2/OLS helpers assume dimensions not checked at every index; wrappers add validation.

Executable surrogate gap: no measured cheaper implementation with a useful scoped metric is supplied. Categorical/error/effect relations are exact obligations, not percent losses. Future numeric caps only1/2/5/10%.

### invariant

#### descriptive: invariant and cost

s=[1,3], p=.5 gives2; p=0 gives1; empty givesNaN.

N or N-1 denominator selected by cov weight; constant diagonal corrcoef forced1, off-diagonal mayNaN.

Scope-specific cost: Quantile/mode O(n log n), moments O(n), covariance O(n*p²), histogram O(n log bins) using partition_point, storage O(n+p²).

### models

### behavior_complement

NaN-clean moments cannot reconstruct missing count. corrcoef empty produces NaN; this does not guarantee cov empty safety (cs[0]). Invalid quantile probabilities fail before sorting.

### reverse_reconstruction

Quantiles admit sorted arrays sharing interpolated positions and arbitrary source permutations/NaNs. Covariance admits translated observation sets and rotational symmetries.

### quantile_coordinates

s=[1,3], p=.5 gives2; p=0 gives1; empty givesNaN.

### covariance_policy

N or N-1 denominator selected by cov weight; constant diagonal corrcoef forced1, off-diagonal mayNaN.

### branch_relation

quantile cleans NaNs, sorts then interpolates pos=np+.5 with endpoints clamped; mode delegates table agg. moments drops NaN, covariance does not. cov scalar0/1 second arg treated normalization when first numel>1. histogram final edge included in last bin.

### resource_cost

Quantile/mode O(n log n), moments O(n), covariance O(n*p²), histogram O(n log bins) using partition_point, storage O(n+p²).

### tests

#### Evidence boundary

See ../tests.md for the actual selected source test and mutant. These tests sample the file, not every fragment branch. NaN-clean moments cannot reconstruct missing count. corrcoef empty produces NaN; this does not guarantee cov empty safety (cs[0]). Invalid quantile probabilities fail before sorting. Other branches here are source-derived and unexecuted unless the parent test explicitly calls them.
