Skills for Real Engineers. Straight from my .agents directory.
statistical-analysis
Agent skill fromNorman-bury/research-writing-skill
Use when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines
How to install statistical-analysis
npx skills add Norman-bury/research-writing-skill# or add only this skill to Claude Code: copy the folder
skills/statistical-analysis/
# into
~/.claude/skills/statistical-analysis/ (all projects)
.claude/skills/statistical-analysis/ (one project)
1# 统计分析指南23本技能提供学术论文中统计分析的选择、执行和报告指南。45## 一、统计检验选择67### 比较两组89| 数据特征 | 推荐检验 |10|----------|----------|11| 独立、连续、正态 | 独立样本t检验 |12| 独立、连续、非正态 | Mann-Whitney U检验 |13| 配对、连续、正态 | 配对样本t检验 |14| 配对、连续、非正态 | Wilcoxon符号秩检验 |15| 二分类结果 | 卡方检验或Fisher精确检验 |1617### 比较三组及以上1819| 数据特征 | 推荐检验 |20|----------|----------|21| 独立、连续、正态 | 单因素方差分析 |22| 独立、连续、非正态 | Kruskal-Wallis检验 |23| 配对、连续、正态 | 重复测量方差分析 |24| 配对、连续、非正态 | Friedman检验 |2526### 关系分析2728| 分析目标 | 推荐方法 |29|----------|----------|30| 两个连续变量关系 | Pearson相关(正态)或Spearman相关(非正态) |31| 连续结果与预测变量 | 线性回归 |32| 二分类结果与预测变量 | 逻辑回归 |3334## 二、假设检验3536### 正态性检验3738```python39from scipy import stats4041# Shapiro-Wilk检验(样本量<5000)42stat, p_value = stats.shapiro(data)43print(f"Shapiro-Wilk检验: W={stat:.4f}, p={p_value:.4f}")4445if p_value > 0.05:46 print("数据符合正态分布假设")47else:48 print("数据不符合正态分布,考虑使用非参数检验")49```5051### 方差齐性检验5253```python54from scipy import stats5556# Levene检验57stat, p_value = stats.levene(group1, group2)58print(f"Levene检验: F={stat:.4f}, p={p_value:.4f}")5960if p_value > 0.05:61 print("方差齐性假设满足")62else:63 print("方差不齐,使用Welch's t检验")64```6566## 三、效应量6768### 常用效应量参考6970| 检验 | 效应量 | 小 | 中 | 大 |71|------|--------|-----|-----|-----|72| t检验 | Cohen's d | 0.20 | 0.50 | 0.80 |73| ANOVA | η²_p | 0.01 | 0.06 | 0.14 |74| 相关 | r | 0.10 | 0.30 | 0.50 |75| 回归 | R² | 0.02 | 0.13 | 0.26 |7677### Python计算效应量7879```python80import pingouin as pg8182# t检验返回Cohen's d83result = pg.ttest(group1, group2)84d = result['cohen-d'].values[0]85print(f"Cohen's d = {d:.2f}")8687# ANOVA返回偏η²88aov = pg.anova(dv='score', between='group', data=df)89…
Excerpt shown under the repository's MIT license.
More skills in research-writing-skill
Similar skill repositories
An agentic skills framework & software development methodology that works.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
