Statistical Analysis Advisor
When to activate
When choosing statistical tests, interpreting results, checking assumptions, or when a reviewer questions your analysis. Use before running any analysis to ensure correct test selection.
When NOT to use
Skip for simple descriptive statistics (mean, SD), data visualization without inference, or when the statistical approach is already validated and approved.
Instructions
Characterize the data:
- Outcome type: Continuous, categorical, ordinal, time-to-event, count
- Groups: Number of groups, paired vs. independent
- Distribution: Normal (Shapiro-Wilk), equal variance (Levene's)
- Sample size per group
Test selection decision tree:
- 2 independent groups, normal → Independent t-test
- 2 independent groups, non-normal → Mann-Whitney U
- 2 paired groups, normal → Paired t-test
- 3+ groups → One-way ANOVA (Kruskal-Wallis if non-normal)
- Repeated measures → RM-ANOVA or Friedman
- Time-to-event → Log-rank test, Cox regression
- Correlation → Pearson (normal) or Spearman (non-normal)
Assumption checks:
- Normality: Shapiro-Wilk (n<50) or Kolmogorov-Smirnov (n≥50)
- Homogeneity of variance: Levene's test
- Sphericity: Mauchly's test (for RM-ANOVA)
- If violated: Report the violation and use the non-parametric alternative
Report results with:
- Test statistic and degrees of freedom
- Exact p-value (not just <0.05)
- Effect size (Cohen's d, η², r, OR as appropriate)
- 95% confidence interval
- Sample size
Multiple comparisons: If >2 comparisons, specify correction:
- Bonferroni (conservative)
- Holm-Bonferroni (step-down)
- Benjamini-Hochberg FDR (exploratory)
Output Format
STATISTICAL ANALYSIS: [Research question]
DATA CHARACTERISTICS:
Outcome: [type] | Groups: [X] | Distribution: [normal/non-normal]
Normality: Shapiro-Wilk W=[X], p=[X]
Variance: Levene's F=[X], p=[X]
TEST SELECTED: [Test name] — [justification]
RESULTS:
[Test]([df]) = [statistic], p = [exact p]
Effect size: [Cohen's d / η² / r] = [value] ([small/medium/large])
95% CI: [[lower], [upper]]
n = [X] per group
INTERPRETATION: [Plain language conclusion]
LIMITATIONS: [Assumptions, power, generalizability]
Example
STATISTICAL ANALYSIS: Does treatment X reduce blood glucose vs. vehicle?
DATA CHARACTERISTICS:
Outcome: Continuous (mg/dL) | Groups: 2 (treatment vs. vehicle) | Distribution: Normal
Normality: Shapiro-Wilk W=0.97, p=0.34
Variance: Levene's F=0.12, p=0.73
TEST SELECTED: Independent t-test — normal distribution, equal variance, 2 independent groups
RESULTS:
t(46) = 3.82, p = 0.0004
Effect size: Cohen's d = 1.12 (large)
95% CI: [18.4, 59.2] mg/dL difference
n = 24 per group
INTERPRETATION: Treatment X significantly reduced fasting blood glucose by 38.8 mg/dL
(compared to vehicle), a large and clinically meaningful effect.
LIMITATIONS: Single timepoint, single strain, not adjusted for body weight.
1---2name: statistical-analysis-advisor3description: Advises on appropriate statistical tests, validates assumptions, performs analysis with effect sizes and confidence intervals. Outputs a statistical analysis plan or results interpretation with test justification and assumption checks.4---56# Statistical Analysis Advisor78## When to activate9When choosing statistical tests, interpreting results, checking assumptions, or when a reviewer questions your analysis. Use before running any analysis to ensure correct test selection.1011## When NOT to use12Skip for simple descriptive statistics (mean, SD), data visualization without inference, or when the statistical approach is already validated and approved.1314## Instructions15161. **Characterize the data:**17 - Outcome type: Continuous, categorical, ordinal, time-to-event, count18 - Groups: Number of groups, paired vs. independent19 - Distribution: Normal (Shapiro-Wilk), equal variance (Levene's)20 - Sample size per group21222. **Test selection decision tree:**23 - 2 independent groups, normal → Independent t-test24 - 2 independent groups, non-normal → Mann-Whitney U25 - 2 paired groups, normal → Paired t-test26 - 3+ groups → One-way ANOVA (Kruskal-Wallis if non-normal)27 - Repeated measures → RM-ANOVA or Friedman28 - Time-to-event → Log-rank test, Cox regression29 - Correlation → Pearson (normal) or Spearman (non-normal)30313. **Assumption checks:**32 - Normality: Shapiro-Wilk (n<50) or Kolmogorov-Smirnov (n≥50)33 - Homogeneity of variance: Levene's test34 - Sphericity: Mauchly's test (for RM-ANOVA)35 - If violated: Report the violation and use the non-parametric alternative36374. **Report results with:**38 - Test statistic and degrees of freedom39 - Exact p-value (not just <0.05)40 - Effect size (Cohen's d, η², r, OR as appropriate)41 - 95% confidence interval42 - Sample size43445. **Multiple comparisons:** If >2 comparisons, specify correction:45 - Bonferroni (conservative)46 - Holm-Bonferroni (step-down)47 - Benjamini-Hochberg FDR (exploratory)4849## Output Format5051```52STATISTICAL ANALYSIS: [Research question]5354DATA CHARACTERISTICS:55 Outcome: [type] | Groups: [X] | Distribution: [normal/non-normal]56 Normality: Shapiro-Wilk W=[X], p=[X]57 Variance: Levene's F=[X], p=[X]5859TEST SELECTED: [Test name] — [justification]6061RESULTS:62 [Test]([df]) = [statistic], p = [exact p]63 Effect size: [Cohen's d / η² / r] = [value] ([small/medium/large])64 95% CI: [[lower], [upper]]65 n = [X] per group6667INTERPRETATION: [Plain language conclusion]68LIMITATIONS: [Assumptions, power, generalizability]69```7071## Example7273```74STATISTICAL ANALYSIS: Does treatment X reduce blood glucose vs. vehicle?7576DATA CHARACTERISTICS:77 Outcome: Continuous (mg/dL) | Groups: 2 (treatment vs. vehicle) | Distribution: Normal78 Normality: Shapiro-Wilk W=0.97, p=0.3479 Variance: Levene's F=0.12, p=0.738081TEST SELECTED: Independent t-test — normal distribution, equal variance, 2 independent groups8283RESULTS:84 t(46) = 3.82, p = 0.000485 Effect size: Cohen's d = 1.12 (large)86 95% CI: [18.4, 59.2] mg/dL difference87 n = 24 per group8889INTERPRETATION: Treatment X significantly reduced fasting blood glucose by 38.8 mg/dL90(compared to vehicle), a large and clinically meaningful effect.91LIMITATIONS: Single timepoint, single strain, not adjusted for body weight.92```