stat-compare-two-groups
Skill4 starsChanged 12 days agoMITView on GitHub
Compare a continuous variable between two groups with automatic selection of t-test, Welch test, or Mann-Whitney U test based on data properties.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 27
Read data; validate that group column has exactly two levels.
- Distinctive: line 28
Run normality test (Shapiro-Wilk) on each group separately.
- Distinctive: line 29
If both groups are normal: run Levene's test for equal variance.
- Distinctive: line 32
If either group is non-normal: Mann-Whitney U test (unpaired) or Wilcoxon signed-rank test (paired).
- Distinctive: line 36
Write a structured result and plot (PDF) to output directory.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Skill: Two-Group Statistical Comparison
Use When
- User wants to test whether a continuous measurement differs between two experimental groups (e.g., treated vs. control, knockout vs. wild-type)
- User needs a p-value, effect size, and confidence interval for a two-group comparison
- User is unsure which statistical test is appropriate and wants automatic method selection
Inputs
- Required:
- Data table (CSV or TSV) with a numeric value column and a group column (exactly two group levels)
- Optional:
- Group variable column name (default: auto-detected if only one non-numeric column)
- Value variable column name (default: auto-detected if only one numeric column)
- Paired comparison:
trueorfalse(default:false) - Alternative hypothesis:
two-sided(default),greater, orless - Output directory (default:
./compare_output)
Workflow
- Read data; validate that group column has exactly two levels.
- Run normality test (Shapiro-Wilk) on each group separately.
- If both groups are normal: run Levene's test for equal variance.
- Equal variance (p > 0.05): Student's t-test.
- Unequal variance (p ≤ 0.05): Welch's t-test.
- If either group is non-normal: Mann-Whitney U test (unpaired) or Wilcoxon signed-rank test (paired).
- Compute effect size: Cohen's d (parametric) or rank-biserial correlation r (non-parametric).
- Compute 95% confidence interval for the difference in means (parametric) or Hodges-Lehmann estimator (non-parametric).
- Generate a box plot with individual data points and significance annotation.
- Write a structured result and plot (PDF) to output directory.
- Report method used, test statistic, p-value, effect size, confidence interval, and interpretation.
- Save the executable analysis script (
analysis_code.pyoranalysis_code.R) and software version manifest (session_info.txt) used to produce results.
Output Contract
- Result (TSV): group1, group2, method_used, statistic, p_value, effect_size, effect_size_type, ci_lower, ci_upper, n_group1, n_group2
- Box plot with data points (PDF)
- Decision log explaining method selection (printed to stdout)
- Reproducibility artifacts:
analysis_code.pyoranalysis_code.R, plussession_info.txt
Limits
- Requires exactly two groups; use
stat-compare-multiple-groupsfor three or more groups. - Minimum recommended sample size: n ≥ 5 per group (results are unreliable below this).
- Paired comparison requires equal sample sizes in both groups.
- Common failure: group column contains more than two levels — filter data before running.
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
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.

