Rigorous Statistical & Quantitative Data Analysis
Adapted for ApexCluster from K-Dense-AI/scientific-agent-skills (skills/statistical-analysis, MIT).
Purpose
Ensure every quantitative conclusion—from benchmark comparisons and A/B experiments to scientific datasets—is backed by appropriate statistical methods, verified assumptions, effect sizes, and transparent uncertainty reporting.
Step 1: Audit Data & Experimental Design Before Testing
Before computing any test statistic, verify:
- Unit of Analysis & Independence: Identify the true independent sampling unit (subjects, sessions, clusters, random seeds) and guard against pseudoreplication or repeated-measures leakage.
- Missingness & Outliers: Summarize sample sizes (
n), missing-data patterns (MCAR/MAR/MNAR), extreme values, and exact filtering criteria. Never silently drop outliers without reporting sensitivity checks with and without them. - Variable Scales: Classify outcomes and predictors accurately (continuous, ordinal, binary, count, time-to-event) and check distributions via summary quantiles, skew, and visual inspection.
Step 2: Select & Validate Statistical Tests
- Assumption Checks First: Evaluate normality (visual Q–Q / Shapiro–Wilk), homoscedasticity (Levene/Brown–Forsythe), linearity, and independence before trusting parametric assumptions. When violated, use robust/non-parametric alternatives (Welch's t-test, Mann–Whitney U, Wilcoxon signed-rank, Kruskal–Wallis, permutation tests, bootstrap confidence intervals, or mixed-effects/GLMs).
- Multiple Comparisons: Whenever testing multiple hypotheses, metrics, or subgroups, apply an explicit correction (Benjamini–Hochberg FDR or Holm–Bonferroni) and report both raw and adjusted p-values.
- Effect Sizes & Uncertainty: Never report a bare p-value alone. Always pair statistical significance with practical magnitude (Cohen's d, Hedges' g, odds/risk ratio, Cliff's delta, R-squared, absolute & relative lift) and
95%confidence/credible intervals.
Step 3: Reproducible Execution & Honest Reporting
- When running analysis scripts in an authorized sandbox (Python
scipy/statsmodels/pandasor R), set fixed random seeds for bootstrap/permutation procedures, log exact versions and input file hashes, and assert non-empty expected schemas. - If no execution sandbox is available, state explicitly which formulas/scripts are provided as analytical recommendations vs. actually executed—never fabricate computed test statistics or p-values.
- Present results in a clean summary table showing
Metric,Group A (n, mean/median, spread),Group B,Test Used,Effect Size (95% CI), andAdjusted p-value, followed by plain-language practical interpretation and limitations.


