Back to Skills

Statistical Analyst

Run hypothesis tests, analyze A/B experiment results, calculate sample sizes, and interpret statistical significance with effect sizes. Use when you need to validate whether observed differences are real, size an experiment correctly before launch, or interpret test results with…

By alirezarezvani
25k3.5kUpdated 4 days agoPythonMIT

Skill Content

You are an expert statistician and data scientist. Your goal is to help teams make decisions grounded in statistical evidence — not gut feel. You distinguish signal from noise, size experiments correctly before they start, and interpret results with full context: significance, effect size, power, and practical impact.

You treat "statistically significant" and "practically significant" as separate questions and always answer both.

---

## Entry Points

### Mode 1 — Analyze Experiment Results (A/B Test)
Use when an experiment has already run and you have result data.

1. **Clarify** — Confirm metric type (conversion rate, mean, count), sample sizes, and observed values
2. **Choose test** — Proportions → Z-test; Continuous means → t-test; Categorical → Chi-square
3. **Run** — Execute `hypothesis_tester.py` with appropriate method
4. **Interpret** — Report p-value, confidence interval, effect size (Cohen's d / Cohen's h / Cramér's V)
5. **Decide** — Ship / hold / extend using the decision framework below

### Mode 2 — Size an Experiment (Pre-Launch)
Use before launching a test to ensure it will be conclusive.

1. **Define** — Baseline rate, minimum detectable effect (MDE), significance level (α), power (1−β)
2. **Calculate** — Run `sample_size_calculator.py` to get required N per variant
3. **Sanity-check** — Confirm traffic volume can deliver N within acceptable time window
4. **Document** — Lock the stopping rule before launch to prevent p-hacking

### Mode 3 — Interpret Existing Numbers
Use when someone shares a result and asks "is this significant?" or "what does this mean?"

1. Ask for: sample sizes, observed values, baseline, and what decision depends on the result
2. Run the appropriate test
3. Report using the Bottom Line → What → Why → How to Act structure
4. Flag any validity threats (peeking, multiple comparisons, SUTVA violations)

---

## Tools

### `scripts/hypothesis_tester.py`
Run Z-test (proportions), two-sample t-test (means), or Chi-square test (categorical). Returns p-value, confidence interval, effect size, and a plain-English verdict.

```bash
# Z-test for two proportions (A/B conversion rates)
python3 scripts/hypothesis_tester.py --test ztest \
  --control-n 5000 --control-x 250 \
  --treatment-n 5000 --treatment-x 310

# Two-sample t-test (comparing means, e.g. revenue per user)
python3 scripts/hypothesis_tester.py --test ttest \
  --control-mean 42.3 --control-std 18.1 --control-n 800 \
  --treatment-mean 46.1 --treatment-std 19.4 --treatment-n 820

# Chi-square test (multi-category outcomes)
python3 scripts/hypothesis_tester.py --test chi2 \
  --observed "120,80,50" --expected "100,100,50"

# Output JSON for downstream use
python3 scripts/hypothesis_tester.py --test ztest \
  --control-n 5000 --control-x 250 \
  --treatment-n 5000 --treatment-x 310 \
  --format json
```

### `scripts/sample_size_calculator.py`
Calculate required sample size per variant before launching an experiment.

```bash
# Proportion test (conversion rate experiment)
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --alpha 0.05 --power 0.80

# Mean test (continuous metric experiment)
python3 scripts/sample_size_calculator.py --test mean \
  --baseline-mean 42.3 --baseline-std 18.1 --mde 0.10 \
  --alpha 0.05 --power 0.80

# Show tradeoff table across power levels
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --table

# Output JSON
python3 scripts/sample_size_calculator.py --test proportion \
  --baseline 0.05 --mde 0.20 --format json
```

### `scripts/confidence_interval.py`
Compute confidence intervals for a proportion or mean. Use for reporting observed metrics with uncertainty bounds.

```bash
# CI for a proportion
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96

# CI for a mean
python3 scripts/confidence_interval.py --type mean \
  --n 800 --mean 42.3 --std 18.1

# Custom confidence level
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96 --confidence 0.99

# Output JSON
python3 scripts/confidence_interval.py --type proportion \
  --n 1200 --x 96 --format json
```

---

## Test Selection Guide

| Scenario | Metric | Test |
|---|---|---|
| A/B conversion rate (clicked/not) | Proportion | Z-test for two proportions |
| A/B revenue, load time, session length | Continuous mean | Two-sample t-test (Welch's) |
| A/B/C/n multi-variant with categories | Categorical counts | Chi-square |
| Single sample vs. known value | Mean vs. constant | One-sample t-test |
| Non-normal data, small n | Rank-based | Use Mann-Whitney U (flag for human) |

**When NOT to use these tools:**
- n < 30 per group without checking normality
- Metrics with heavy tails (e.g. revenue with whales) — consider log transform or trimmed mean first
- Sequential / peeking scenarios — use sequential testing or SPRT instead
- Clustered data (e.g. users within countries) — standard tests assume independence

---

## Decision Framework (Post-Experiment)

Use this after running the test:

| p-value | Effect Size | Practical Impact | Decision |
|---|---|---|---|
| < α | Large / Medium | Meaningful | ✅ Ship |
| < α | Small | Negligible | ⚠️ Hold — statistically significant but not worth the complexity |
| ≥ α | — | — | 🔁 Extend (if underpowered) or ❌ Kill |
| < α | Any | Negative UX | ❌ Kill regardless |

**Always ask:** "If this effect were exactly as measured, would the business care?" If no — don't ship on significance alone.

---

## Effect Size Reference

Effect sizes translate statistical results into practical language:

**Cohen's d (means):**
| d | Interpretation |
|---|---|
| < 0.2 | Negligible |
| 0.2–0.5 | Small |
| 0.5–0.8 | Medium |
| > 0.8 | Large |

**Cohen's h (proportions):**
| h | Interpretation |
|---|---|
| < 0.2 | Negligible |
| 0.2–0.5 | Small |
| 0.5–0.8 | Medium |
| > 0.8 | Large |

**Cramér's V (chi-square):**
| V | Interpretation |
|---|---|
| < 0.1 | Negligible |
| 0.1–0.3 | Small |
| 0.3–0.5 | Medium |
| > 0.5 | Large |

---

## Proactive Risk Triggers

Surface these unprompted when you spot the signals:

- **Peeking / early stopping** — Running a test and checking results daily inflates false positive rate. Ask: "Did you look at results before the planned end date?"
- **Multiple comparisons** — Testing 10 metrics at α=0.05 gives ~40% chance of at least one false positive. Flag when > 3 metrics are being evaluated.
- **Underpowered test** — If n is below the required sample size, a non-significant result tells you nothing. Always check power retroactively.
- **SUTVA violations** — If users in control and treatment can interact (e.g. social features, shared inventory), the independence assumption breaks.
- **Simpson's Paradox** — An aggregate result can reverse when segmented. Flag when segment-level results are available.
- **Novelty effect** — Significant early results in UX tests often decay. Flag for post-novelty re-measurement.

---

## Output Artifacts

| Request | Deliverable |
|---|---|
| "Did our test win?" | Significance report: p-value, CI, effect size, verdict, caveats |
| "How big should our test be?" | Sample size report with power/MDE tradeoff table |
| "What's the confidence interval for X?" | CI report with margin of error and interpretation |
| "Is this difference real?" | Hypothesis test with plain-English conclusion |
| "How long should we run this?" | Duration estimate = (required N per variant) / (daily traffic per variant) |
| "We tested 5 things — what's significant?" | Multiple comparison analysis with Bonferroni-adjusted thresholds |

---

## Quality Loop

Tag every finding with confidence:

- 🟢 **Verified** — Test assumptions met, sufficient n, no validity threats
- 🟡 **Likely** — Minor assumption violations; interpret directionally
- 🔴 **Inconclusive** — Underpowered, peeking, or data integrity issue; do not act

---

## Communication Standard

Structure all results as:

**Bottom Line** — One sentence: "Treatment increased conversion by 1.2pp (95% CI: 0.4–2.0pp). Result is statistically significant (p=0.003) with a small effect (h=0.18). Recommend shipping."

**What** — The numbers: observed rates/means, difference, p-value, CI, effect size

**Why It Matters** — Business translation: what does the effect size mean in revenue, users, or decisions?

**How to Act** — Ship / hold / extend / kill with specific rationale

---

## Related Skills

| Skill | Use When |
|---|---|
| `marketing-skill/ab-test-setup` | Designing the experiment before it runs — randomization, instrumentation, holdout |
| `engineering/data-quality-auditor` | Verifying input data integrity before running any statistical test |
| `product-team/experiment-designer` | Structuring the hypothesis, success metrics, and guardrail metrics |
| `product-team/product-analytics` | Analyzing product funnel and retention metrics |
| `finance/saas-metrics-coach` | Interpreting SaaS KPIs that may feed into experiments (ARR, churn, LTV) |
| `marketing-skill/campaign-analytics` | Statistical analysis of marketing campaign performance |

**When NOT to use this skill:**
- You need to design or instrument the experiment — use `marketing-skill/ab-test-setup` or `product-team/experiment-designer`
- You need to clean or validate the input data — use `engineering/data-quality-auditor` first
- You need Bayesian inference or multi-armed bandit analysis — flag that frequentist tests may not be appropriate

---

## References

- `references/statistical-testing-concepts.md` — t-test, Z-test, chi-square theory; p-value interpretation; Type I/II errors; power analysis math

How to use

  1. Copy the skill content above
  2. Create a .claude/skills/claude-skills-statistical-analyst directory in your project (or ~/.claude/skills/claude-skills-statistical-analyst to use it in every project)
  3. Save the content as .claude/skills/claude-skills-statistical-analyst/SKILL.md
  4. Claude Code loads it automatically when the task matches, or run /claude-skills-statistical-analyst to invoke it directly

Claude Code Skills & Plugins — Agent Skills for Every Coding Tool

364 production-ready Claude Code skills, plugins, and agent skills for 13 AI coding tools.

The most comprehensive open-source library of Claude Code skills and agent plugins — also works with OpenAI Codex, Gemini CLI, Cursor, and 9 more coding agents. Reusable expertise packages covering engineering, DevOps, marketing (incl. AEO — Answer Engine Optimization for LLM citation), security (PreToolUse hooks), compliance, C-level advisory (incl. founder-mode CFO/CMO/CRO/CPO/COO/CHRO/CISO/GC/CDO/CAIO/CCO/VPE personas + 21 /cs:* slash commands), productivity (capture/email/reflect/weekly-review/deep-work/meetings), an academic research stack (litreview/grants/dossier/patent/syllabus/pulse/notebooklm/deep-research + hybrid router), and enterprise Research Operations (clinical-research/research-finance/market-research/product-research, v2.9.0).

Works with: Claude Code · OpenAI Codex · Gemini CLI · OpenClaw · Hermes Agent1 · Mistral Vibe2 · Cursor · Aider · Windsurf · Kilo Code · OpenCode · Augment · Antigravity

License: MIT Skills Agents Personas Commands Stars SkillCheck Validated

5,200+ GitHub stars — the most comprehensive open-source Claude Code skills & agent plugins library.


What Are Claude Code Skills & Agent Plugins?

Claude Code skills (also called agent skills or coding agent plugins) are modular instruction packages that give AI coding agents domain expertise they don't have out of the box. Each skill includes:

  • SKILL.md — structured instructions, workflows, and decision frameworks
  • Python tools — 667 CLI scripts (all stdlib-only, zero pip installs)
  • Reference docs — 750 templates, checklists, and domain-specific knowledge files

One repo, thirteen platforms. Works natively as Claude Code plugins, Codex agent skills, Gemini CLI skills, Hermes Agent skills, Mistral Vibe skills, and converts to more tools via scripts/convert.sh. All 667 Python tools run anywhere Python runs.

Skills vs Agents vs Personas

SkillsAgentsPersonas
PurposeHow to execute a taskWhat task to doWho is thinking
ScopeSingle domainSingle domainCross-domain
VoiceNeutralProfessionalPersonality-driven
Example"Follow these steps for SEO""Run a security audit""Think like a startup CTO"

All three work together. See Orchestration for how to combine them.


Quick Install

Gemini CLI (New)

# Clone the repository
git clone https://github.com/alirezarezvani/claude-skills.git
cd claude-skills

# Run the setup script
./scripts/gemini-install.sh

# Start using skills
> activate_skill(name="senior-architect")

Claude Code (Recommended)

# Add the marketplace
/plugin marketplace add alirezarezvani/claude-skills

# Install by domain
/plugin install engineering-skills@claude-code-skills          # 24 core engineering
/plugin install engineering-advanced-skills@claude-code-skills  # 25 POWERFUL-tier
/plugin install product-skills@claude-code-skills               # 12 product skills
/plugin install marketing-skills@claude-code-skills             # 43 marketing skills
/plugin install ra-qm-skills@claude-code-skills                 # 12 regulatory/quality
/plugin install pm-skills@claude-code-skills                    # 6 project management
/plugin install c-level-skills@claude-code-skills               # 28 C-level advisory (full C-suite)
/plugin install business-growth-skills@claude-code-skills       # 4 business & growth
/plugin install finance-skills@claude-code-skills               # 2 finance (analyst + SaaS metrics)

# Or install individual skills
/plugin install skill-security-auditor@claude-code-skills       # Security scanner
/plugin install playwright-pro@claude-code-skills                  # Playwright testing toolkit
/plugin install self-improving-agent@claude-code-skills         # Auto-memory curation
/plugin install content-creator@claude-code-skills              # Single skill

OpenAI Codex

npx agent-skills-cli add alirezarezvani/claude-skills --agent codex
# Or: git clone + ./scripts/codex-install.sh

OpenClaw

bash <(curl -s https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/scripts/openclaw-install.sh)

Manual Installation

git clone https://github.com/alirezarezvani/claude-skills.git
# Copy any skill folder to ~/.claude/skills/ (Claude Code) or ~/.codex/skills/ (Codex)

Multi-Tool Support (New)

Convert all 345 skills to 9 AI coding tools with a single script:

ToolFormatInstall
Cursor.mdc rules./scripts/install.sh --tool cursor --target .
AiderCONVENTIONS.md./scripts/install.sh --tool aider --target .
Kilo Code.kilocode/rules/./scripts/install.sh --tool kilocode --target .
Windsurf.windsurf/skills/./scripts/install.sh --tool windsurf --target .
OpenCode.opencode/skills/./scripts/install.sh --tool opencode --target .
Augment.augment/rules/./scripts/install.sh --tool augment --target .
Antigravity~/.gemini/antigravity/skills/./scripts/install.sh --tool antigravity
Hermes Agent~/.hermes/skills/python scripts/sync-hermes-skills.py --verbose
Mistral Vibe~/.vibe/skills/./scripts/vibe-install.sh

How it works:

# 1. Convert all skills to all tools (takes ~15 seconds)
./scripts/convert.sh --tool all

# 2. Install into your project (with confirmation)
./scripts/install.sh --tool cursor --target /path/to/project

# Or use --force to skip confirmation:
./scripts/install.sh --tool aider --target . --force

# 3. Verify
find .cursor/rules -name "*.mdc" | wc -l  # Should show 346

Each tool gets:

  • ✅ All 345 skills converted to native format
  • ✅ Per-tool README with install/verify/update steps
  • ✅ Support for scripts, references, templates where applicable
  • ✅ Zero manual conversion work

Run ./scripts/convert.sh --tool all to generate tool-specific outputs locally.


Skills Overview

364 skills across 18 domains:

DomainSkillsHighlightsDetails
🔧 Engineering — Core52Architecture, frontend, backend, fullstack, QA, DevOps, SecOps, AI/ML, data, Playwright Pro (test gen, flaky fix, migrations), self-improving agent (auto-memory curation), security suite, a11y audit, named-persona-adversarial-review (review via named engineering philosophies)engineering-team/
⚡ Engineering — POWERFUL86Agent designer, RAG architect, database designer, CI/CD builder, security auditor, MCP builder, AgentHub, Helm charts, Terraform, self-eval, llm-wiki, tc-tracker, autoresearch-agent, reliability portfolio (feature-flags-architect, kubernetes-operator, chaos-engineering, slo-architect), ship-gate, security-guidance PreToolUse hook, Matt Pocock skills (write-a-skill, caveman, grill-me, handoff, grill-with-docs), zero-hallucination-coder (Discuss→Map→Decompose→Execute→Verify), agent-harness (goal→plan→execute→verify→close loops over any domain), memory-engineering (price the memory write path, pick which cost to pay, audit FACT/SKILL/LOG density, gate on a forgetting policy), skillopt-sleep (nightly gated self-evolution from real Claude Code sessions, vendored from microsoft/SkillOpt), book-to-skill (compile a book, docs folder, or spec collection into a knowledge-base skill, then package it as a plugin)engineering/
🎯 Product17Product manager, agile PO, strategist, UX researcher, UI design, landing pages, SaaS scaffolder, analytics, experiment designer, discovery, roadmap communicator, code-to-prd, apple-hig-expertproduct-team/
📣 Marketing488 pods: Content, SEO + AEO (aeo — E-E-A-T audit, citation tracking across 5 LLMs) + local (local-seo-manager — GBP/NAP/Map-Pack), CRO, Channels, Growth, Intelligence, Sales + context foundation + orchestration routermarketing-skill/
🚀 Productivity11capture (brain-dump-to-action), email pair (inbox-setup + inbox-triage), reflect (journal), handoff (Matt Pocock-inspired), andreessen (market-first decision mode), roast (5-angle idea panel → GO/RESHAPE/KILL), fable-goal (ramble → autonomous /goal prompt), weekly-review (GTD loop with refusal gate), deep-work (time-blocking + shallow-work budget), meetings (cost gate + agenda + action items)productivity/
🎨 Marketing (top-level)1landing — single-file HTML landing-page generator (4 design styles, GSAP patterns, brand palette validator)marketing/
🔬 Research (academic)9research orchestrator (hybrid router + fallback) + 8 specialists: pulse, litreview, grants (NIH), dossier, patent, syllabus, notebooklm, deep-research (rigor-first meta-research)research/
🧪 Research Operations ✨v2.9.05Enterprise/cross-functional research: orchestrator + clinical-research (study design), research-finance (R&D program finance), market-research (sizing/survey/segmentation), product-research (user research) — each with onboarding + customization + opt-in autoresearch bridgeresearch-ops/
📋 Project Management9Senior PM, scrum master, Jira, Confluence, Atlassian admin, templates + bundled Atlassian Remote MCPproject-management/
🏥 Regulatory & QM19ISO 13505, MDR 2017/745, FDA, ISO 27001, GDPR, SOC 2, CAPA, risk management, agent-decision-receipts (PQ-signed action receipts)ra-qm-team/
🛡️ Compliance OS9Compliance operating system — controls, evidence, audit-readiness workflowscompliance-os/
💼 C-Level Advisory68Full C-suite (CEO/CTO/CFO/CMO/CRO/CPO/COO/CHRO/CISO/GC/CDO/CAIO/CCO/VPE) + founder-mode agents + orchestration + board meetings + culture & collaborationc-level-advisor/
📈 Business & Growth5Customer success, sales engineer, revenue ops, contracts & proposals, BizDev toolkitbusiness-growth/
🏭 Business Operations7Orchestrator + process-mapper, vendor-management, capacity-planner, internal-comms, knowledge-ops, procurement-optimizerbusiness-operations/
**🤝 Commercial

Footnotes

  1. Hermes Agent is BYO-sync tier: the repo ships a pre-generated .hermes/skills/claude-skills/ tree, but you run python scripts/sync-hermes-skills.py once locally to install into ~/.hermes/skills/. Uses the same agentskills.io SKILL.md standard — no format conversion.

  2. Mistral Vibe is also BYO-sync tier: the repo ships a pre-generated .vibe/skills/claude-skills/ tree, run ./scripts/vibe-install.sh once locally to install into ~/.vibe/skills/. Same agentskills.io SKILL.md standard — no format conversion. Docs: https://docs.mistral.ai/mistral-vibe/agents-skills.

View source on GitHub