statistical-analysis

statistical-analysis is a skill for Claude Code, Codex from swarm-ai-research/swarm. It costs 18 tokens per session (1,247 once invoked), scanned A, original, MIT.

A guide to statistical analysis of SWARM experiments, including hypothesis tests, effect sizes, and corrections when many comparisons are made. It works with parameter sweeps and results from multiple random seeds.

In plain words
What is it for?
Use it to normalize experiment data, compare groups with statistical tests, measure effect size, and adjust results for multiple comparisons.
Why use it?
It helps distinguish meaningful differences between experiment groups from variation that may be due to chance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to normalize experiment data, compare groups with statistical tests, measure effect size, and adjust results for multiple comparisons.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/swarm-ai-research/swarm/statistical-analysis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add swarm-ai-research/swarm --skill statistical-analysis
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for statistical-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/swarm-ai-research/swarm/statistical-analysis.svg)](https://agentmods.dev/skills/swarm-ai-research/swarm/statistical-analysis)
Your own site
<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/statistical-analysis"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/statistical-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01247
Opus 5 $0.00009 $0.00624
Sonnet 5 $0.00004 $0.00249
Haiku 4.5 $0.00002 $0.00125

Measured 4d ago against content hash 4b29265a9fe6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

statistical-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyze_csv.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

bench/skills/statistical-analysis/SKILL.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Statistical Analysis Skill

Perform rigorous statistical analysis on SWARM sweep or multi-seed data, including hypothesis tests, effect sizes, and multiple-comparison corrections.

Prerequisites

  • scipy>=1.10 for statistical tests
  • pandas>=2.0 for data manipulation
  • numpy>=1.24 for numerical computation

Procedure

1. Load and normalize data

import pandas as pd

df = pd.read_csv(csv_path)

# Normalize column aliases
alias_map = {
    "tax_rate": "transaction_tax_rate",
    "tax": "transaction_tax_rate",
    "tox": "toxicity_rate",
    "toxicity": "toxicity_rate",
}
df.rename(columns={k: v for k, v in alias_map.items() if k in df.columns}, inplace=True)

2. Pairwise Welch's t-tests

from scipy import stats
from itertools import combinations

param_col = "transaction_tax_rate"  # or detect automatically
metric = "welfare"

groups = {val: grp[metric].values for val, grp in df.groupby(param_col)}
pairs = list(combinations(sorted(groups.keys()), 2))

results = []
for a, b in pairs:
    t_stat, p_val = stats.ttest_ind(groups[a], groups[b], equal_var=False)
    results.append({
        "group_a": float(a),
        "group_b": float(b),
        "t_statistic": float(t_stat),
        "p_value": float(p_val),
    })

3. Effect sizes (Cohen's d)

import numpy as np

def cohens_d(x, y):
    nx, ny = len(x), len(y)
    pooled_std = np.sqrt(((nx-1)*np.std(x,ddof=1)**2 + (ny-1)*np.std(y,ddof=1)**2) / (nx+ny-2))
    if pooled_std == 0:
        return 0.0
    return (np.mean(x) - np.mean(y)) / pooled_std

for r, (a, b) in zip(results, pairs):
    r["cohens_d"] = float(cohens_d(groups[a], groups[b]))
    r["effect_magnitude"] = (
        "large" if abs(r["cohens_d"]) >= 0.8 else
        "medium" if abs(r["cohens_d"]) >= 0.5 else
        "small" if abs(r["cohens_d"]) >= 0.2 else
        "negligible"
    )

4. Bonferroni correction

n_tests = len(results)
bonferroni_threshold = 0.05 / n_tests

for r in results:
    r["bonferroni_significant"] = r["p_value"] < bonferroni_threshold

Read the full file on GitHub · 158 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 158 lines · 18 tokens per session scan A 4b29265a9fe6

Subscribe to this mod's changes

statistical-analysis is a skill published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It adds 18 tokens to every session and 1,247 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.