| name | example_stats |
| description | descriptive-statistics helpers — summary (mean/std/median), quantile, zscore normalization, and Pearson correlation on plain Python number lists (no pandas/numpy). |
| origin | personal |
Skill: stats
Lightweight descriptive-statistics helpers. Use this when a task needs quick
summary statistics, quantiles, correlation, or z-score normalization on plain
Python number lists — no pandas/numpy required.
Import
from example_stats.kernel import summary, quantile, zscore, correlation
Recipes
Describe a dataset in one call:
data = [4, 8, 15, 16, 23, 42]
s = summary(data)
print(s)
Get an arbitrary quantile (0..1):
p90 = quantile(data, 0.90)
print(p90)
Standardize values (z-scores, sample std):
z = zscore(data)
print(z)
Pearson correlation between two equal-length series:
r = correlation([1, 2, 3, 4], [2, 4, 6, 8])
print(r)
Notes
summary uses SAMPLE std (n-1 denominator). Pass population=True for the
n-denominator version.
- All functions raise
ValueError on empty input.
- Everything is pure stdlib; safe to call inside the persistent kernel.