Agent skill

Statistical Analysis

by Norman-bury in Norman-bury/research-writing-skill

A skill your agent uses when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines

MITAuto-check passedData & Analytics

Install Statistical Analysis

skills CLI
$ npx skills add Norman-bury/research-writing-skill --skill statistical-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Norman-bury/research-writing-skill statistical-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Norman-bury/research-writing-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/statistical-analysis .claude/skills/statistical-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
statistical-analysis
GitHub stars
3.4k
Token cost
~853 tokens
SKILL.md length
113 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines

  • Works in 8 steps: P-hacking:不要测试多种方式直到出现显著性 → HARKing:不要将探索性发现呈现为验证性 → 忽视假设:检查并报告违反情况 → …
  • Reporting statistical analysis - provides test selection
  • SKILL.md covers 一、统计检验选择, 二、假设检验, 三、效应量 and 四、APA格式报告, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Statistical Analysis is an agent skill from Norman-bury/research-writing-skill. Use when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines

Its SKILL.md is about 850 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Statistics. It works with Python. The repository describes itself as: 科研写作助手 (Research Writing Assistant). The licence is MIT.

When your agent uses it

  • Reporting statistical analysis - provides test selection
  • APA format guidelines

Example prompts

  • “/statistical-analysis”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. P-hacking:不要测试多种方式直到出现显著性
  2. HARKing:不要将探索性发现呈现为验证性
  3. 忽视假设:检查并报告违反情况
  4. 混淆显著性与重要性:p < .05 ≠ 有意义的效应
  5. 不报告效应量:对解释至关重要
  6. 挑选结果:报告所有计划的分析
  7. 多重比较:适当时校正族错误率
  8. 过度解释非显著结果:无证据 ≠ 无效应的证据

What it can do on your machine

Read from SKILL.md and the folder at commit 6f79595. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Statistical Analysis loads about 853 tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 113 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~853

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Norman-bury/research-writing-skill at commit 6f79595, republished under its MIT licence (© Norman-bury). 113 words, ~853 tokens.

Download SKILL.mdSave it as .claude/skills/statistical-analysis/SKILL.md (or your agent's skills folder).
name
statistical-analysis
description
Use when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines

统计分析指南

本技能提供学术论文中统计分析的选择、执行和报告指南。

一、统计检验选择

比较两组
数据特征推荐检验
独立、连续、正态独立样本t检验
独立、连续、非正态Mann-Whitney U检验
配对、连续、正态配对样本t检验
配对、连续、非正态Wilcoxon符号秩检验
二分类结果卡方检验或Fisher精确检验
比较三组及以上
数据特征推荐检验
独立、连续、正态单因素方差分析
独立、连续、非正态Kruskal-Wallis检验
配对、连续、正态重复测量方差分析
配对、连续、非正态Friedman检验
关系分析
分析目标推荐方法
两个连续变量关系Pearson相关(正态)或Spearman相关(非正态)
连续结果与预测变量线性回归
二分类结果与预测变量逻辑回归

二、假设检验

正态性检验
python
from scipy import stats

# Shapiro-Wilk检验(样本量<5000)
stat, p_value = stats.shapiro(data)
print(f"Shapiro-Wilk检验: W={stat:.4f}, p={p_value:.4f}")

if p_value > 0.05:
    print("数据符合正态分布假设")
else:
    print("数据不符合正态分布,考虑使用非参数检验")
方差齐性检验
python
from scipy import stats

# Levene检验
stat, p_value = stats.levene(group1, group2)
print(f"Levene检验: F={stat:.4f}, p={p_value:.4f}")

if p_value > 0.05:
    print("方差齐性假设满足")
else:
    print("方差不齐,使用Welch's t检验")

三、效应量

常用效应量参考
检验效应量小中大
t检验Cohen's d0.200.500.80
ANOVAη²_p0.010.060.14
相关r0.100.300.50
回归R²0.020.130.26
Python计算效应量
python
import pingouin as pg

# t检验返回Cohen's d
result = pg.ttest(group1, group2)
d = result['cohen-d'].values[0]
print(f"Cohen's d = {d:.2f}")

# ANOVA返回偏η²
aov = pg.anova(dv='score', between='group', data=df)
eta_p2 = aov['np2'].values[0]
print(f"Partial η² = {eta_p2:.3f}")

四、APA格式报告

独立样本t检验
A组(n = 48, M = 75.2, SD = 8.5)得分显著高于B组
(n = 52, M = 68.3, SD = 9.2),t(98) = 3.82, p < .001, 
d = 0.77, 95% CI [0.36, 1.18]。
单因素方差分析
单因素方差分析显示处理条件对测试分数有显著主效应,
F(2, 147) = 8.45, p < .001, η²_p = .10。事后比较使用
Tukey HSD表明,条件A(M = 78.2, SD = 7.3)得分显著
高于条件B(M = 71.5, SD = 8.1, p = .002)。
多元回归
多元线性回归预测考试成绩,整体模型显著,
F(3, 146) = 45.2, p < .001, R² = .48。学习时间
(β = .35, p < .001)和先前GPA(β = .28, p < .001)
是显著预测变量。

五、常见统计陷阱

<HARD-GATE>
必须避免以下错误:
</HARD-GATE>
  1. P-hacking:不要测试多种方式直到出现显著性
  2. HARKing:不要将探索性发现呈现为验证性
  3. 忽视假设:检查并报告违反情况
  4. 混淆显著性与重要性:p < .05 ≠ 有意义的效应
  5. 不报告效应量:对解释至关重要
  6. 挑选结果:报告所有计划的分析
  7. 多重比较:适当时校正族错误率
  8. 过度解释非显著结果:无证据 ≠ 无效应的证据

六、Python示例

完整t检验流程
python
import numpy as np
import pingouin as pg
from scipy import stats

# 数据
group_a = np.array([75, 82, 68, 79, 85, 72, 88, 76])
group_b = np.array([65, 70, 62, 68, 75, 60, 72, 66])

# 1. 描述统计
print(f"A组: M={group_a.mean():.2f}, SD={group_a.std():.2f}")
print(f"B组: M={group_b.mean():.2f}, SD={group_b.std():.2f}")

# 2. 正态性检验
_, p_a = stats.shapiro(group_a)
_, p_b = stats.shapiro(group_b)
print(f"正态性: A组 p={p_a:.3f}, B组 p={p_b:.3f}")

# 3. t检验
result = pg.ttest(group_a, group_b)
print(f"t = {result['T'].values[0]:.2f}")
print(f"p = {result['p-val'].values[0]:.4f}")
print(f"Cohen's d = {result['cohen-d'].values[0]:.2f}")

七、统计分析检查清单

  • 定义研究问题和假设
  • 确定适当的统计检验
  • 进行功效分析确定样本量
  • 检查缺失数据和异常值
  • 验证假设(正态性、方差齐性)
  • 运行主要分析
  • 计算效应量和置信区间
  • 进行事后检验(如需要)
  • 按APA格式撰写结果

八、推荐资源

Python库
  • scipy.stats:核心统计检验
  • statsmodels:高级回归和诊断
  • pingouin:用户友好的统计检验,带效应量

© Norman-bury, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/statistical-analysis of Norman-bury/research-writing-skill.

Open the folder on GitHubat commit 6f79595

Compare with similar skills

Statistical Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Statistical Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Statistical Analysis this skillNorman-bury/research-writing-skill3.4k—~853Automated safety check: PassMIT
StatsmodelszLanqing/codex-claude-academic-skills4.7k15 repos~4.9kAutomated safety check: PassBSD-3-Clause
Rota Bench Regression Analysisoracle/graalpython1.7k—~1.6kAutomated safety check: PassCustom licence
Querying Indonesian Gov Datasuryast/indonesia-gov-apis172—~997Automated safety check: PassMIT
MatlabzLanqing/codex-claude-academic-skills4.7k8 repos~2.3kAutomated safety check: NotesGPL-3.0
Meridian MMM Model Buildinggoogle/meridian1.6k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 15 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Official

    Analyze recent GraalPy benchmark regressions on master as part of the weekly rota.

    1.7k GitHub stars~1.6k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Querying Indonesian Gov Data

    suryast/indonesia-gov-apis

    Query 57 Indonesian government APIs and data sources — BPJPH halal certification, BPOM food safety, OJK financial legality, BPS statistics, BMKG weather/earthquakes, Bank Indonesia exchange rates…

    172 GitHub stars~997 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Matlab

    zLanqing/codex-claude-academic-skills

    MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing.

    4.7k GitHub starsUsed in 8 repos~2.3k tokens
    Data & AnalyticsAuto-check: notes
  • Official

    Takes a user through building a Meridian marketing mix model, from loading CSV data and mapping columns to running EDA, fitting and saving the model.

    1.6k GitHub stars~2.5k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Cbb Data

    machina-sports/sports-skills

    College Basketball (CBB) data via ESPN public endpoints and the NCAA's official endpoints — scores, standings, rosters, schedules, game summaries, play-by-play, win probability, rankings, futures…

    242 GitHub stars~2.2k tokensUpdated 3 days ago
    Data & AnalyticsAuto-check passed

More from Norman-bury/research-writing-skill

All 20 skills in this repo
  • Evidence Driven Writing

    Norman-bury/research-writing-skill

    A skill your agent uses when writing or revising Introduction, Related Work, background, literature synthesis, or any section where references must drive claims

    3.4k GitHub stars~952 tokensUpdated 4 mo ago
    Auto-check passed
  • Environment Setup

    Norman-bury/research-writing-skill

    A skill your agent uses when Python environment setup is needed for data visualization or conda installation is required

    3.4k GitHub stars~840 tokensUpdated 4 mo ago
    Auto-check passed
  • Experiment Results Planning

    Norman-bury/research-writing-skill

    A skill your agent uses when designing experiments, result tables, mock planning data, evaluation protocols, or results sections before real data are final

    3.4k GitHub stars~990 tokensUpdated 4 mo ago
    Auto-check passed
  • Figures Diagram

    Norman-bury/research-writing-skill

    A skill your agent uses when creating flowcharts, architecture diagrams, or conceptual diagrams - generates prompts for image AI

    3.4k GitHub stars~548 tokensUpdated 4 mo ago
    Auto-check passed
  • Figures Python

    Norman-bury/research-writing-skill

    A skill your agent uses when creating data visualizations for papers - generates publication-quality plots with top-journal color schemes

    3.4k GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Latex Output

    Norman-bury/research-writing-skill

    A skill your agent uses when user requests LaTeX format output or has provided school/journal LaTeX templates

    3.4k GitHub stars~977 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Statistical Analysis

What does Statistical Analysis do?

A skill your agent uses when planning or reporting statistical analysis - provides test selection, execution code, and APA format guidelines. Statistical Analysis is an agent skill from Norman-bury/research-writing-skill.

When should I use Statistical Analysis?

Statistical Analysis fits situations like: reporting statistical analysis - provides test selection; APA format guidelines.

How do I install Statistical Analysis in Claude Code?

Run `npx skills add Norman-bury/research-writing-skill --skill statistical-analysis -a claude-code`. Or copy the skill folder (skills/statistical-analysis in Norman-bury/research-writing-skill) into .claude/skills/statistical-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Statistical Analysis in Codex?

Run `npx skills add Norman-bury/research-writing-skill --skill statistical-analysis -a codex`. Or copy the skill folder (skills/statistical-analysis in Norman-bury/research-writing-skill) into .agents/skills/statistical-analysis in your project. Codex loads it when a task matches its description.

Can I use Statistical Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Norman-bury/research-writing-skill --skill statistical-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/statistical-analysis, .gemini/skills/statistical-analysis, .github/skills/statistical-analysis and .opencode/skills/statistical-analysis in your project.

What does Statistical Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Statistical Analysis is instructions for the agent only. Our summary lists: Python 3.

Does Statistical Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Statistical Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Statistical Analysis use?

Statistical Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Statistical Analysis use?

About 853 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Statistical Analysis?

Skills that share tags, products or a category with Statistical Analysis: Statsmodels (zLanqing/codex-claude-academic-skills, 4.7k stars), Rota Bench Regression Analysis (oracle/graalpython, 1.7k stars), Querying Indonesian Gov Data (suryast/indonesia-gov-apis, 172 stars) and Matlab (zLanqing/codex-claude-academic-skills, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Statistical Analysis?

Norman-bury (a GitHub user) maintains it in Norman-bury/research-writing-skill, which has 3,378 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on June 10, 2026.

Source: Norman-bury/research-writing-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.