agentleFS
MohOneXMohOneX/claude-opus-skills/statistical-validity-analysis/SKILL.md

statistical-validity-analysis

Skill0 starsChanged 6 months agoMITView on GitHub

Scrutinizes quantitative claims for statistical validity, separating real signal from noise, bias, and artifact. Use when interpreting metrics, evaluating a reported result, deciding if a change had a real effect, or when a number is being used to justify a decision.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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:

    Multiple comparisons: test enough hypotheses and some clear p<0.05 by chance.

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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 Validity Analysis

A number is a claim wearing a uniform. Before trusting it, interrogate how it was produced, what it omits, and whether the same data could tell a different story.

Interrogate the measurement before the math

  1. What was actually counted, and what was excluded? Denominators are where lies live — "90% success" over which population, in which window, excluding what?
  2. Is the sample the population you care about? Selection bias, survivorship bias, and self-selection silently change the meaning of the average.
  3. Is the metric a proxy? Most metrics measure a proxy for the thing you care about; optimizing the proxy can harm the target (Goodhart).

The errors that flip conclusions

  • Aggregation hides distribution: a mean with a fat tail or bimodal shape is meaningless. Always look at the distribution; report median + tail, not just average.
  • Simpson's paradox: a trend in aggregate reverses within every subgroup due to mix shift. Segment before concluding.
  • Base rate neglect: a 99%-accurate test for a 1-in-10,000 condition produces ~99% false positives. Conditional probabilities require the base rate.
  • Regression to the mean: extreme measurements naturally moderate; "the intervention after the bad month helped" is often just regression, not effect.
  • Correlation vs causation: a third variable, reverse causation, or selection can produce correlation with no causal link.
  • Multiple comparisons: test enough hypotheses and some clear p<0.05 by chance. Significance without correction or pre-registration is suspect.

Adversarial validation

  • Could noise produce this? Estimate the variance/confidence interval. A point estimate without an error bar is not a result. Small N + high variance = no signal.
  • Could bias produce this? Name the most likely bias (selection, survivorship, measurement, confounding) and check whether it alone explains the effect.
  • Does it replicate / hold out of sample? A result tuned on the same data it's evaluated on is overfit until shown otherwise.
  • Practical vs statistical significance: is the effect size large enough to matter, or just detectable at large N?
  • Peeking: was the data examined repeatedly until it crossed a threshold?

Non-obvious risks

  • p-values answer "how surprising is this data if the null is true", not "how likely is my hypothesis" — the common misinterpretation inverts the logic.
  • Confidence intervals communicate uncertainty far better than significance stars; prefer effect-size-with-CI to p<0.05.
  • A precisely reported number (e.g., 73.42%) signals false precision when the underlying measurement has ±5% noise.

Output structure

Deliver: what was actually measured (population, denominator, exclusions), the distribution not just the mean, the effect size with a confidence interval, the most plausible bias/confound and whether it explains the result, the practical-significance judgment, and the conditions under which the claim would not hold.

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.