agentleFS
SWEStashSWEStash/swe-workflow-skills/skills/statistical-analysis/SKILL.md

statistical-analysis

Skill1 starsChanged 4 days agoMITView on GitHub

Design and analyze experiments and statistical tests — test selection with stated assumptions, sample size and power, effect sizes and confidence intervals over bare p-values, and pitfall discipline (multiple comparisons, p-hacking, peeking/optional stopping). Owns experiment statistics generally; live A/B evaluation of AI/LLM apps (quality metrics, judges, feedback) → ai-evaluation.

46 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use evidence-driven-writing, experiment-results-planning and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Norman-burySkill

    evidence-driven-writing

    Use when writing or revising Introduction, Related Work, background, literature synthesis, or any section where references must drive claims

    Also in 3 projects that use this

  • Norman-burySkill

    experiment-results-planning

    Use when designing experiments, result tables, mock planning data, evaluation protocols, or results sections before real data are final

    Also in 3 projects that use this

  • +10 more from Norman-bury

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before reporting anything, check:

    line 53
  2. Distinctive:

    Pre-register or label: every metric is either declared up front or reported as exploratory — no third category.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Statistical Analysis

Get the statistics of a question right — the test, its assumptions, the uncertainty, and the traps — so a decision rests on evidence rather than on a lone p-value. The deliverable is a decision-ready answer: effect size, uncertainty, assumptions, caveats.

Workflow

1. Frame the question as a hypothesis

State the null and alternative in plain words before touching data ("the new flow's conversion equals the old flow's"). Identify the unit of analysis (user? session? order?) — mismatching it with the randomization unit silently breaks independence.

2. Design before data (when the experiment hasn't run yet)

  • Choose the primary metric and pre-register it — one primary, the rest explicitly secondary/exploratory.
  • Compute sample size from power: minimum detectable effect worth acting on, α (typically 0.05), power (typically 0.8). Run until n is reached — don't stop early on a good-looking result.
  • Randomize at the unit you'll analyze; check the split is balanced on key covariates.

3. Choose the test and state its assumptions

Match the test to the data (two proportions → two-proportion z-test / χ²; means → t-test or its nonparametric fallback; counts → Poisson/χ²; paired data → paired tests). Always state the assumptions and check the ones you can: independence of observations (the usual casualty — repeated measures per user, network effects, shared fixtures), adequate counts for normal approximations (rule of thumb: ≥10 successes and failures per arm), variance assumptions for t-tests. If an assumption fails, switch tests rather than pretending.

4. Report effect size and interval, not a verdict

Work the actual numbers. Report the effect (absolute and relative difference) with a confidence interval, and the p-value as supporting detail — never a bare "significant/not significant". The CI is what the decision needs: a CI of [+0.1%, +1.7%] and a CI of [+0.8%, +1.0%] are both "significant" and mean very different things.

5. Run the pitfall gate

Before reporting anything, check:

  • Peeking / optional stopping: was n fixed in advance? Repeatedly testing as data arrives inflates false positives badly. If peeking happened, say so and treat the result as suggestive (or use sequential methods designed for it).
  • Multiple comparisons: k tests at α=0.05 ≈ k/20 false positives expected. Correct (Holm/Bonferroni for strict control, Benjamini-Hochberg FDR when many metrics), and label post-hoc findings as exploratory — they are hypotheses for the next experiment, not wins from this one.
  • Subgroup fishing: subgroup effects found after the fact need the same exploratory label and a confirmatory follow-up.
  • Survivorship / selection: does the analyzed sample still represent the population the decision is about?

6. Translate to the decision

Distinguish statistical from practical significance: a real +0.05% lift may not pay for the complexity; a non-significant result with a wide CI is "we don't know yet", not "no effect". Give the ship/don't-ship framing with the caveats attached, and say what additional data would resolve remaining uncertainty.

Principles

  • KISS: a well-checked z-test beats a fancy model with unexamined assumptions.
  • Pre-register or label: every metric is either declared up front or reported as exploratory — no third category.
  • Uncertainty is the product: any answer without an interval is opinion with extra steps.

Cross-skill boundaries

  • Live A/B testing of an AI/LLM app — defining answer quality, LLM-as-judge, human feedback loops, eval gates → ai-evaluation (this skill still owns the underlying experiment statistics if asked).
  • Generating the hypotheses to test → exploratory-data-analysis.
  • Tracking and comparing model-training runs → ml-experiment-tracking.
  • Defining what business metric to move → metrics-and-okrs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.