Statistical

From infometa/workbuddyskills · View interactive version

Statistical is an AI agent skill from the GitHub repository infometa/workbuddyskills. **Path:** `/skills/databrain-analysis/statistical/SKILL.md`

How to use this skill

Skill file

Statistical Analysis (Workflow & Test Selection)

Path: /skills/databrain-analysis/statistical/SKILL.md

对齐 host statistical-analysis。在 sandbox 内用 execute_sandbox_code 实现;用 read_file 加载 references。

Workflow

  1. 已读 CODE0 与本文件
  2. Data cleaning: read_file → CODE1;清洗后再检验
  3. 选型 — 下表选定 reference 文件名
  4. Load reference: read_file → statistical/references/<name>.md(如 stat-t-test.md)
  5. 实验设计: read_file → CODE1;先 print 研究问题、DV/IV、H0/H1、设计类型、选型依据、假设、α、样本量
  6. Implement in execute_sandbox_code(遵循 reference 代码模式)
  7. Report in stdout: 检验统计量、精确 p、效应量、CI(格式见 CODE0 BI Quick Report)

选型 (Test Selection)

By question / data type

| Question | Data | Reference file |

|----------|------|----------------|

| Compare 2 groups (continuous) | 2 groups, normal or n>30 | stat-t-test.md |

| Compare 2 groups (continuous) | skewed / small n | stat-nonparametric.md |

| Compare 3+ groups | 3+ groups, continuous | stat-anova.md or stat-nonparametric.md |

| Categorical × categorical | 2 categorical | stat-chi-square.md |

| Y continuous, X predictors | Continuous outcome | stat-regression.md |

| Y binary | Binary outcome | stat-logistic.md |

| Y count | Count outcome | stat-glm.md |

| Time series / forecast | Time-ordered | stat-time-series.md |

| Regression diagnostics | Residuals / VIF | stat-diagnostics.md |

Quick decision tree

Available references

| File | Content |

|------|---------|

| data_cleaning.md | Missing, duplicates, invalid values |

| stat-t-test.md | Independent/paired t-test, Welch |

| stat-anova.md | One-way ANOVA, Welch, Tukey |

| stat-chi-square.md | Chi-square, Fisher |

| stat-nonparametric.md | Mann-Whitney, Wilcoxon, Kruskal-Wallis |

| stat-regression.md | OLS, VIF (statsmodels) |

| stat-logistic.md | Logit, Probit |

| stat-glm.md | Poisson, NB |

| stat-time-series.md | ARIMA, stationarity |

| stat-diagnostics.md | Breusch-Pagan, DW, VIF |

| assumptions_and_diagnostics.md | Normality, homogeneity |

| effect_sizes_and_power.md | Effect sizes, power |

| experimental_design.md | 实验设计输出模板 |

| reporting_standards.md | 完整报告规范(终稿优先用 summarize report.md) |

| bayesian_statistics.md | Bayesian (optional) |

| code_examples.md | 示例 |

Assumption checking

BI 指标常右偏。可参考 scripts/assumption_checks.py 逻辑在 sandbox 中实现,或各 stat-* reference 内检查。

Effect sizes

须报告:Cohen's d (t-test)、η² (ANOVA)、Cramér's V (chi-square)、R² (regression)。见 effect_sizes_and_power.md。

Best practices

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.