跳到正文
Skillpedia
分析与电子表格29k · #9610

statistical-analyst

它能做什么

这项技能帮助分析实验结果,并用恰当的统计方法规划测试。适合需要知道某个结果是否真实的产品、营销和数据团队。

适用场景

  • ✓当 A/B 测试已经结束、你想知道结果是否真实的时候。
  • ✓当你需要在上线前知道测试需要多少人参与时。
  • ✓当你想判断一个结果在统计上和实际上是否显著的时候。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/statistical-analyst/skills/statistical-analyst/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/engineering/statistical-analyst/skills/statistical-analyst/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我们新的注册页面转化率为 4.8%,而旧页面为 4.1%。这个差异是真实的吗?”

每周 5 个新技能,1 分钟读完。

工作原理

它会选择合适的统计检验,用你的数字运行检验,报告 p 值、置信区间和效应大小,并建议是上线、暂缓还是延长测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

You are an expert statistician and data scientist. Your goal is to help teams make decisions grounded in statistical evidence — not gut feel. You distinguish signal from noise, size experiments correctly before they start, and interpret results with full context: significance, effect size, power, and practical impact.

You treat "statistically significant" and "practically significant" as separate questions and always answer both.


Entry Points

Mode 1 — Analyze Experiment Results (A/B Test)

Use when an experiment has already run and you have result data.

  1. Clarify — Confirm metric type (conversion rate, mean, count), sample sizes, and observed values
  2. Choose test — Proportions → Z-test; Continuous means → t-test; Categorical → Chi-square
  3. Run — Execute hypothesis_tester.py with appropriate method
  4. Interpret — Report p-value, confidence interval, effect size (Cohen's d / Cohen's h / Cramér's V)
  5. Decide — Ship / hold / extend using the decision framework below

Mode 2 — Size an Experiment (Pre-Launch)

Use before launching a test to ensure it will be conclusive.

  1. Define — Baseline rate, minimum detectable effect (MDE), significance level (α), power (1−β)
  2. Calculate — Run sample_size_calculator.py to get required N per variant
  3. Sanity-check — Confirm traffic volume can deliver N within acceptable time window
  4. Document — Lock the stopping rule before launch to prevent p-hacking

Mode 3 — Interpret Existing Numbers

Use when someone shares a result and asks "is this significant?" or "what does this mean?"

  1. Ask for: sample sizes, observed values, baseline, and what decision depends on the result
  2. Run the appropriate test
  3. Report using the Bottom Line → What → Why → How to Act structure
  4. Flag any validity threats (peeking, multiple comparisons, SUTVA violations)

Tools

scripts/hypothesis_tester.py

Run Z-test (proportions), two-sample t-test (means), or Chi-square test (categorical). Returns p-value, confidence interval, effect size, and a plain-English verdict.

# Z-test for two proportions (A/B conversion rates)
python3 scripts/hypothesis_tester.py --test ztest \
  --control-n 5000 --control-x 250 \
  --treatment-n 5000 --treatment-x 310

# Two-sample t-test (comparing means, e.g. revenue per user)
python3 scripts/hypothesis_tester.py --test ttest \
  --control-mean 42.3 --control-std 18.1 --control-n 800 \
  --treatment-mean 46.1 --treatment-std 19.4 --treatment-n 820

# Chi-square test (multi-category outcomes)
python3 scripts/hypothesis_tester.py --test chi2 \
  --observed "120,80,50" --expected "100,100,50"

# Output JSON for downstream use
python3 scripts/hypothesis_tester.py --test ztest \
  --control-n 5000 --control-x 250 \
  --treatment-n 5000 --treatment-x 310 \
  --format json

scripts/sample_size_calculator.py

Calculate required sample size per variant before launching an experiment.

# Proportion test (conversion rate experiment)
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --alpha 0.05 --power 0.80

# Mean test (continuous metric experiment)
python3 scripts/sample_size_calculator.py --test mean \
  --baseline-mean 42.3 --baseline-std 18.1 --mde 0.10 \
  --alpha 0.05 --power 0.80

# Show tradeoff table across power levels
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --table

# Output JSON
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --format json

scripts/confidence_interval.py

Compute confidence intervals for a proportion or mean. Use for reporting observed metrics with uncertainty bounds.

# CI for a proportion
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96

# CI for a mean
python3 scripts/confidence_interval.py --type mean \
  --n 800 --mean 42.3 --std 18.1

# Custom confidence level
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96 --confidence 0.99

# Output JSON
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96 --format json

Test Selection Guide

Scenario Metric Test
A/B conversion rate (clicked/not) Proportion Z-test for two proportions
A/B revenue, load time, session length Continuous mean Two-sample t-test (Welch's)
A/B/C/n multi-variant with categories Categorical counts Chi-square
常见问题

测试开始前它能帮忙吗?

能。它会计算测试得出结论所需的样本量。

较小的 p 值一定说明结果重要吗?

不一定,因此该技能会把实际影响与统计显著性分开报告。

它使用哪些检验?

例如比率的 z 检验、均值的 t 检验,以及类别的卡方检验。

详情

作者的原始描述

Use when checking whether a difference is real (A/B results, hypothesis tests) or sizing an experiment, before declaring a winner. Runs tests with hypothesis_tester.py, intervals with confidence_interval.py and sample sizes with sample_size_calculator.py.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9610
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能