example_stats
descriptive-statistics helpers — summary (mean/std/median), quantile, zscore normalization, and Pearson correlation on plain Python number lists (no pandas/numpy).
- Star
- 675
- 分类
- 数据
- 许可证
- MIT
- 最近提交
- 2026年12月1日
skills/example_stats/SKILL.md
在 GitHub 上查看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) # {'n':6,'mean':18.0,'std':13.49...,'min':4,'max':42,'median':15.5}
Get an arbitrary quantile (0..1):
p90 = quantile(data, 0.90)
print(p90)
Standardize values (z-scores, sample std):
z = zscore(data)
print(z) # list of z-scores, mean~0 std~1
Pearson correlation between two equal-length series:
r = correlation([1, 2, 3, 4], [2, 4, 6, 8])
print(r) # 1.0
Notes
summaryuses SAMPLE std (n-1 denominator). Passpopulation=Truefor the n-denominator version.- All functions raise
ValueErroron empty input. - Everything is pure stdlib; safe to call inside the persistent kernel.
相似的 Skill
health
GAgarrytan/gstack143k近 7 天新增 524 个 star
deprecation-and-migration
ADaddyosmani/agent-skills122k近 7 天新增 1,421 个 star
ccs-align
THthedotmack/claude-mem121k近 7 天新增 1,354 个 star
handoff
THthedotmack/claude-mem121k近 7 天新增 1,354 个 star
knowledge-agent
THthedotmack/claude-mem121k近 7 天新增 1,354 个 star