Skip to content
Agentmart
Submit a tool

auto-stat-test

自动执行统计检验,根据数据特征(组数、正态性、配对设计)智能选择 t 检验、卡方检验、ANOVA、Mann-Whitney U 等合适方法,并输出包含 p 值、效应量和通俗中文解读的完整报告。当用户需要进行假设检验、组间比较、显著性分析,或提及 t 检验、卡方、方差分析、p 值、配对检验、非参数检验等关键词时触发。

Skill by haomingz

IndexedMIT★ 22
Write a review

Chalk Labs

Need help deploying auto-stat-test?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/haomingz-auto-stat-test

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

自动执行统计检验,根据数据特征(组数、正态性、配对设计)智能选择 t 检验、卡方检验、ANOVA、Mann-Whitney U 等合适方法,并输出包含 p 值、效应量和通俗中文解读的完整报告。当用户需要进行假设检验、组间比较、显著性分析,或提及 t 检验、卡方、方差分析、p 值、配对检验、非参数检验等关键词时触发。

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/auto-stat-test

What's inside

Skill name
auto-stat-test
Description
自动执行统计检验,根据数据特征(组数、正态性、配对设计)智能选择 t 检验、卡方检验、ANOVA、Mann-Whitney U 等合适方法,并输出包含 p 值、效应量和通俗中文解读的完整报告。当用户需要进行假设检验、组间比较、显著性分析,或提及 t 检验、卡方、方差分析、p 值、配对检验、非参数检验等关键词时触发。
License
MIT
Instructions
123 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (3)

  • LICENSE
  • SKILL.md
  • statistical_test_suite.py · scripts/

SKILL.md (first lines)

# statistical-test-suite

自动统计检验工具 —— 根据数据特征自动选择合适的统计检验方法(t 检验 / 卡方 / ANOVA / Mann-Whitney 等),一键输出检验结果和中文通俗解读。

## 能力概览

| 功能 | 说明 |
|------|------|
| 独立样本 t 检验 | 2 组 + 正态数据,比较均值差异 |
| Welch t 检验 | 2 组 + 正态但方差不齐 |
| Mann-Whitney U | 2 组 + 非正态数据(非参数) |
| 单因素 ANOVA | 3+ 组 + 正态数据 |
| Kruskal-Wallis | 3+ 组 + 非正态数据(非参数) |
| 卡方独立性检验 | 两个分类变量的关联性 |
| 配对 t 检验 | 前后对比(正态) |
| Wilcoxon 符号秩 | 前后对比(非参数) |
| 自动选择 | 根据组数、正态性、数据类型自动决定 |
| 通俗解读 | 每个指标和结论都给出中文白话说明 |

## Quick Start

```bash
# 分组比较(自动选择检验方法)
python3 scripts/statistical_test_suite.py data.csv --group treatment --value score

# 卡方检验(两个分类变量)
python3 scripts/statistical_test_suite.py survey.csv --group gender --value preference

# 配对检验(前后对比)
python3 scripts/statistical_test_suite.py experiment.csv --col1 pre_score --col2 post_score --paired

# 强制指定检验方法
python3 scripts/statistical_test_suite.py data.csv --group group --value score --test mann-whitney

# 保存结果到 JSON
python3 scripts/statistical_test_suite.py data.csv -g treatment -v score -o result.json
```

## 详细用法

### 模式一:分组比较

用 `--group` 指定分组列,`--value` 指定比较列,工具自动判断用哪种检验。

```bash
python3 scripts/statistical_test_suite.py <数据文件> --group <分组列> --value <数值列> [选项]
```

自动选择逻辑:
1. 两列都是分类变量 → **卡方检验**
2. 2 个组 + 数据正态 → **独立样本 t 检验**(方差不齐则用 Welch t)
3. 2 个组 + 数据非正态 → **Mann-Whitney U 检验**
4. 3+ 个组 + 数据正态 → **单因素 ANOVA**
5. 3+ 个组 + 数据非正态 → **Kruskal-Wallis 检验**

### 模式二:配对比较

用 `--col1` 和 `--col2` 指定前后两个变量列。

```bash
python3 scripts/statistical_test_suite.py <数据文件> --col1 <前> --col2 <后> --paired [选项]
```

自动选择逻辑:
1. 差值正态 → **配对 t 检验**
2. 差值非正态 → **Wilcoxon 符号秩检验**

## 参数说明

| 参数 | 缩写 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| `input` | — | 是 | — | 输入文件路径(CSV/TSV/Excel/JSON) |
| `--group` | `-g` | 模式一 | — | 分组变量列名 |
| `--value` | `-v` | 模式一 | — | 数值/分类变量列名 |
| `--col1` | — | 模式二 | — | 配对检验第 1 个变量列名 |
| `--col2` | — | 模式二 | — | 配对检验第 2 个变量列名 |
| `--paired` | — | 否 | `false` | 启用配对检验模式 |
| `--test` | `-T` | 否 | 自动 | 强制检验方法(见下方列表) |
| `--alpha` | `-a` | 否 | `0.05` | 显著性水平 |
| `--output` | `-o` | 否 | 标准输出 | 结果 JSON 保存路径 |

### 可选检验方法(`--test`)

`t-test` / `mann-whitney` / `anova` / `kruskal-wallis` / `chi-square` / `paired-ttest` / `wilcoxon`

## 输出结构(JSON)

```json
{
  "test": "独立样本 t 检验",
  "test_id": "independent_ttest",
  "statistic": 2.3456,
  "p_value": 0.0213,
  "effect_size": {"cohens_d": 0.4821},
  "group_stats": {
    "对照组": {"n": 30, "mean": 72.5, "std": 8.3},
    "实验组": {"n": 30, "mean": 78.1, "std": 7.9}
  },
  "normality_check": {"对照组": "Shapiro-Wilk W = 0.97, p = 0.52(正态)", "...": "..."},
  "selection_reason": ["2 组比较 + 数据近似正态 → 选择独立样本 t 检验"],
  "alpha": 0.05,
  "interpretation": [
    "检验方法:独立样本 t 检验",
    "显著性水平:α = 0.05",
    "结论:p = 0.0213 < 0.05,差异具有统计学显著性。",
    "效应量:Cohen's d = 0.4821(中等效应量,差异明显)",
    "通俗解读:「对照组」(均值 72.5)和「实验组」(均值 78.1)之间存在显著差异…"
  ]
}
```

## 依赖

- Python 3.8+
- pandas
- numpy
- scipy

```bash

From haomingz/kimi-skills, MIT.

More from haomingz/kimi-skills

Signals

Stars
22
Forks
6
Open issues
0
Last commit (this folder)
Apr 24, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from haomingz

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get auto-stat-test running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying auto-stat-test?

CallGet help
Cite this page

auto-stat-test skill. Agent Mart. https://agentmart.dev/skills/haomingz-auto-stat-test (last updated 2026-10-24)