Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions, or format results for publication. Covers frequentist (t-test, ANOVA, chi-square, regression, correlation, survival, count, reliability) and Bayesian. Use statsmodels or pymc-bayesian-modeling to fit.
.claude/skills/jaechang-hits-statistical-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 480% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 745% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 350% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 549% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 401% | 0% |
Statistical analysis is the systematic process of selecting appropriate tests, verifying assumptions, quantifying effect magnitudes, and reporting results. This knowhow guides test selection, assumption diagnostics, and APA-style reporting for frequentist and Bayesian analyses in academic research.
| Aspect | Frequentist | Bayesian | |--------|-------------|----------| | Core output | p-value, confidence interval | Posterior distribution, credible interval | | Interpretation | "How likely is this data if H0 is true?" | "How likely is H1 given the data?" | | Null support | Cannot support H0 (only fail to reject) | Can quantify evidence for H0 via Bayes Factor | | Prior info | Not used | Incorporated via prior distributions | | Sample size | Requires adequate power | Works with any sample size | | Best for | Standard analyses, large samples | Small samples, prior info, complex models |
A statistically significant result (p < .05) may be trivially small in practice. Always report:
| Test | Effect Size | Small | Medium | Large | |------|-------------|-------|--------|-------| | t-test | Cohen's d | 0.20 | 0.50 | 0.80 | | t-test (small n) | Hedges' g | 0.20 | 0.50 | 0.80 | | ANOVA | eta-squared partial | 0.01 | 0.06 | 0.14 | | ANOVA | omega-squared | 0.01 | 0.06 | 0.14 | | Correlation | r | 0.10 | 0.30 | 0.50 | | Regression | R-squared | 0.02 | 0.13 | 0.26 | | Regression | f-squared | 0.02 | 0.15 | 0.35 | | Chi-square | Cramer's V | 0.07 | 0.21 | 0.35 | | Chi-square 2x2 | phi coefficient | 0.10 | 0.30 | 0.50 |
Cohen's benchmarks are guidelines, not rigid thresholds -- domain context always matters.
Most parametric tests require:
When assumptions are violated:
T-test assumptions: (1) Check normality per group with Shapiro-Wilk + Q-Q plots. (2) Check homogeneity with Levene's test. (3) If normality violated: Mann-Whitney U (independent) or Wilcoxon signed-rank (paired). If variance heterogeneity: use Welch's t-test.
ANOVA assumptions: (1) Normality per group. (2) Homogeneity via Levene's test. (3) For repeated measures: check sphericity (Mauchly's test); if violated, apply Greenhouse-Geisser (epsilon < 0.75) or Huynh-Feldt (epsilon > 0.75) correction. (4) If normality violated: Kruskal-Wallis (independent) or Friedman (repeated).
Linear regression assumptions: (1) Linearity via residuals-vs-fitted plot. (2) Independence via Durbin-Watson test (1.5-2.5 acceptable). (3) Homoscedasticity via Breusch-Pagan test + scale-location plot. (4) Normality of residuals via Q-Q plot + Shapiro-Wilk. (5) Multicollinearity via VIF (>10 = severe, >5 = moderate).
Logistic regression assumptions: (1) Independence. (2) Linearity of log-odds with continuous predictors (Box-Tidwell test). (3) No perfect multicollinearity (VIF). (4) Adequate sample size (10-20 events per predictor minimum).
Beyond the main decision flowchart, several specialized test families address specific data types:
Survival / time-to-event analysis:
Count outcome models:
Agreement and reliability:
Categorical data extensions:
What is your research question?
|
+-- Comparing GROUPS on a continuous outcome?
| |
| +-- How many groups?
| | +-- 2 groups
| | | +-- Independent -> Independent t-test (or Mann-Whitney U)
| | | +-- Paired/repeated -> Paired t-test (or Wilcoxon signed-rank)
| | +-- 3+ groups
| | +-- Independent -> One-way ANOVA (or Kruskal-Wallis)
| | +-- Repeated -> Repeated-measures ANOVA (or Friedman)
| |
| +-- Multiple factors? -> Factorial ANOVA / Mixed ANOVA
| +-- With covariates? -> ANCOVA
|
+-- Testing a RELATIONSHIP between variables?
| |
| +-- Both continuous?
| | +-- Normal -> Pearson correlation
| | +-- Non-normal or ordinal -> Spearman correlation
| |
| +-- Predicting continuous outcome?
| | +-- 1 predictor -> Simple linear regression
| | +-- Multiple predictors -> Multiple linear regression
| |
| +-- Predicting categorical outcome?
| | +-- Binary -> Logistic regression
| | +-- Ordinal -> Ordinal logistic regression
| |
| +-- Predicting count outcome?
| | +-- Equidispersed -> Poisson regression
| | +-- Overdispersed -> Negative binomial regression
| | +-- Excess zeros -> Zero-inflated Poisson/NB
| |
| +-- Time-to-event outcome?
| +-- Compare survival curves -> Log-rank test
| +-- With covariates -> Cox proportional hazards
|
+-- Testing ASSOCIATION between categorical variables?
| +-- Expected cell count >= 5 -> Chi-square test
| +-- Expected cell count < 5 -> Fisher's exact test
| +-- Ordered categories -> Cochran-Armitage trend test
| +-- Paired categories -> McNemar's test
|
+-- Assessing AGREEMENT / RELIABILITY?
+-- Categorical, 2 raters -> Cohen's kappa
+-- Categorical, >2 raters -> Fleiss' kappa
+-- Continuous ratings -> ICC
+-- Two measurement methods -> Bland-Altman analysis
+-- Internal consistency -> Cronbach's alpha| Research Question | Data Type | Normal? | Test | Non-parametric Alternative | |-------------------|-----------|---------|------|---------------------------| | 2 independent groups | Continuous | Yes | Independent t-test | Mann-Whitney U | | 2 paired groups | Continuous | Yes | Paired t-test | Wilcoxon signed-rank | | 3+ independent groups | Continuous | Yes | One-way ANOVA | Kruskal-Wallis | | 3+ repeated groups | Continuous | Yes | Repeated-measures ANOVA | Friedman test | | 2 variables | Continuous | Yes | Pearson r | Spearman rho | | Predict continuous | Mixed | -- | Linear regression | -- | | Predict binary | Mixed | -- | Logistic regression | -- | | Predict counts | Count | -- | Poisson / Negative binomial | -- | | Time-to-event | Survival | -- | Cox PH / Log-rank | -- | | 2 categorical | Categorical | -- | Chi-square / Fisher's exact | -- | | Rater agreement | Categorical | -- | Cohen's kappa / Fleiss' kappa | -- | | Method agreement | Continuous | -- | Bland-Altman / ICC | -- |
statsmodels.stats.power, pingouinassumption_checks.py script provides automated normality, homogeneity, and outlier detection with visualizationreferences/bayesian_statistics.md)references/reporting_standards.md for templatesreferences/effect_sizes_and_power.md -- Detailed guide to calculating, interpreting, and reporting effect sizes (Cohen's d, Hedges' g, Glass's delta, eta-squared, omega-squared, partial eta-squared, phi coefficient, standardized beta, f-squared, Cramer's V, odds ratio); a priori, sensitivity, and correlation power analysis with code examples. Condensed from 582-line original.references/bayesian_statistics.md -- Comprehensive Bayesian analysis guide: Bayes' theorem, prior specification, ROPE (Region of Practical Equivalence), prior sensitivity analysis, Bayesian t-test/ANOVA/correlation/regression, hierarchical models, model comparison (WAIC/LOO), convergence diagnostics. Condensed from 662-line original.references/reporting_standards.md -- APA-style reporting templates for t-tests, ANOVA, regression, correlation, chi-square, non-parametric, and Bayesian analyses; pre-registration guidance; methods section templates (participants, design, measures); null results reporting; reporting checklist. Condensed from 470-line original.test_selection_guide.md (130 lines original) -- Fully consolidated into Decision Framework (flowchart + Quick Reference Table) and Specialized Test Categories subsection in Key Concepts. Combined coverage: flowchart (~35 lines) + Quick Reference Table (~15 lines) + Specialized Test Categories (~35 lines) = ~85 lines covering all original capabilities. Original content on sample size considerations, multiple comparisons, and missing data was consolidated into Best Practices and Common Pitfalls. Omitted: study design considerations (RCTs, observational, clustered data) -- general guidance covered by statsmodels-statistical-modeling skill.assumptions_and_diagnostics.md (370 lines original) -- Fully consolidated into Key Concepts (Assumptions Overview + Test-Specific Assumption Workflows) and Workflow Steps 4-5. Combined coverage: Assumptions Overview (~12 lines) + Test-Specific Assumption Workflows (~20 lines) + Workflow Steps 4-5 (~16 lines) = ~48 lines. The original contained detailed code blocks for each assumption check; since this is Knowhow (not Skill), code is referenced rather than reproduced. Key diagnostic thresholds preserved (VIF > 10, Durbin-Watson 1.5-2.5, variance ratio < 2-3). Omitted: extensive Python code blocks for individual checks (normality, homogeneity, linearity, logistic regression diagnostics) -- available in scipy.stats and pingouin documentation. Sample size rules of thumb covered in Workflow Step 3.assumption_checks.py (540 lines) -- Contains 6 functions: check_normality(), check_normality_per_group(), check_homogeneity_of_variance(), check_linearity(), detect_outliers(), comprehensive_assumption_check(). As Knowhow entry, script functions are referenced in Workflow Step 4 rather than reproduced inline. Key capabilities (Shapiro-Wilk, Levene's, IQR/z-score outlier detection, Q-Q plots) are described in Assumptions Overview and Test-Specific Assumption Workflows. Users needing automated checking should use scipy.stats and pingouin directly following the patterns described.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 4,166 | 9,782 | +135% | 1 | 1 | 0% | 642 | 5,425 | +745% | 0 | 0 | — |
case-02 | pass→pass | 7,736 | 8,163 | +6% | 1 | 1 | 0% | 1,336 | 6,011 | +350% | 0 | 0 | — |
case-03 | pass→pass | 5,074 | 5,802 | +14% | 1 | 1 | 0% | 864 | 5,609 | +549% | 0 | 0 | — |
case-04 | pass→pass | 6,591 | 4,588 | -30% | 1 | 1 | 0% | 1,058 | 5,299 | +401% | 0 | 0 | — |
case-05 | pass→pass | 7,371 | 3,855 | -48% | 1 | 1 | 0% | 1,218 | 5,194 | +326% | 0 | 0 | — |
case-06 | pass→pass | 4,946 | 3,735 | -24% | 1 | 1 | 0% | 922 | 5,350 | +480% | 0 | 0 | — |
case-07 | pass→pass | 14,300 | 15,603 | +9% | 1 | 1 | 0% | 2,383 | 7,338 | +208% | 0 | 0 | — |
case-08 | pass→pass | 6,702 | 5,923 | -12% | 1 | 1 | 0% | 1,164 | 5,525 | +375% | 0 | 0 | — |
case-09 | pass→pass | 8,319 | 8,116 | -2% | 1 | 1 | 0% | 1,290 | 5,958 | +362% | 0 | 0 | — |
case-10 | pass→pass | 9,393 | 8,077 | -14% | 1 | 1 | 0% | 1,495 | 5,979 | +300% | 0 | 0 | — |
case-11 | pass→pass | 7,452 | 7,291 | -2% | 1 | 1 | 0% | 1,174 | 5,847 | +398% | 0 | 0 | — |
case-12 | pass→pass | 9,723 | 7,998 | -18% | 1 | 1 | 0% | 1,614 | 5,863 | +263% | 0 | 0 | — |
case-13 | pass→pass | 5,938 | 5,594 | -6% | 1 | 1 | 0% | 1,045 | 5,493 | +426% | 0 | 0 | — |
case-14 | pass→pass | 9,795 | 8,049 | -18% | 1 | 1 | 0% | 1,523 | 5,956 | +291% | 0 | 0 | — |
case-15 | pass→pass | 13,608 | 12,723 | -7% | 1 | 1 | 0% | 2,323 | 6,725 | +189% | 0 | 0 | — |
case-16 | pass→pass | 4,041 | 4,225 | +5% | 1 | 1 | 0% | 683 | 5,376 | +687% | 0 | 0 | — |
case-17 | pass→pass | 8,398 | 9,093 | +8% | 1 | 1 | 0% | 1,394 | 6,082 | +336% | 0 | 0 | — |
case-18 | fail→pass | 5,105 | 3,931 | -23% | 1 | 1 | 0% | 921 | 5,339 | +480% | 0 | 0 | — |
case-19 | pass→pass | 11,079 | 12,267 | +11% | 1 | 1 | 0% | 1,920 | 6,700 | +249% | 0 | 0 | — |
case-20 | fail→fail | 25,925 | 17,177 | -34% | 1 | 1 | 0% | 4,711 | 8,002 | +70% | 0 | 0 | — |
case-21 | fail→fail | 15,871 | 10,851 | -32% | 1 | 1 | 0% | 3,124 | 6,691 | +114% | 0 | 0 | — |
case-22 | fail→fail | 60,730 | 24,775 | -59% | 1 | 1 | 0% | 6,202 | 9,644 | +55% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.