Metadata-Version: 2.4
Name: serp-statistics
Version: 0.1.0
Summary: Serpentine statistics: mean/median/variance/stdev/quantiles written in the Serpentine subset
Author: Serpentine contributors
License: MIT
Project-URL: Homepage, https://github.com/avijitbhuin21/Serpentine
Keywords: serpentine,statistics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: serpentine-shim
Requires-Dist: serp-math

# serp-statistics

Drop-in facade for CPython's `statistics` module, written in the Serpentine
subset: the same source compiles to native code with `serp` and imports under
CPython.

## API (data is `list[float]`)

- `mean`, `fmean`, `geometric_mean`, `harmonic_mean`
- `median`, `median_low`, `median_high`
- `variance` / `stdev` (sample, n-1), `pvariance` / `pstdev` (population)
- `covariance(x, y)`, `correlation(x, y)`
- `quantiles(xs, n=4, method="exclusive")` — "inclusive" also supported.
- `StatisticsError` (ValueError subclass) with CPython's messages.

Divergences: mean/variance use float arithmetic (CPython uses exact rationals
internally — last-ulp differences possible); mode/multimode/median_grouped/
NormalDist are not provided. Depends on `serp-math`.

## Install

```
serp add serp-statistics
pip install serp-statistics
```
