Applies classical frequentist statistical methods — hypothesis testing, ANOVA, regression, non-parametric tests, chi-square, survival analysis — with full assumption checking and APA-style reporting
Systematic workflow for applying and reporting classical (frequentist) statistical analyses, covering test selection, assumption checking, execution, and formal reporting.
| Data Type | Equal Variances | Test |
|---|---|---|
| Continuous, normal | Yes | Independent samples t-test |
| Continuous, normal | No | Welch's t-test |
| Continuous, non-normal | — |
| Mann-Whitney U |
| Binary / count | — | Chi-square / Fisher's exact |
| Paired continuous | Normal differences | Paired t-test |
| Paired continuous | Non-normal | Wilcoxon signed-rank |
| Design | Parametric | Non-parametric |
|---|---|---|
| One factor, independent | One-way ANOVA | Kruskal-Wallis |
| One factor, repeated | Repeated-measures ANOVA | Friedman |
| Two factors | Two-way ANOVA | Scheirer-Ray-Hare |
| Mixed (between + within) | Mixed ANOVA | — |
| Outcome type | Predictors | Model |
|---|---|---|
| Continuous | Continuous/categorical | OLS regression |
| Binary | Any | Logistic regression |
| Count | Any | Poisson / NB regression |
| Ordered categorical | Any | Ordinal logistic regression |
| Time-to-event | Any | Cox proportional hazards |
| Continuous, correlated | Any | Linear mixed-effects model |
State null and alternative hypotheses precisely before looking at data:
Specify $\alpha$ level (default 0.05) and test direction upfront.
Math notation: Use
$...$for all inline statistical symbols and expressions (e.g.,$H_0$,$\mu$,$\sigma^2$,$\alpha = .05$,$\chi^2$) and$$...$$for display equations.
For parametric tests:
For regression:
from scipy import stats
import statsmodels.formula.api as smf
# Welch t-test
t_stat, p_val = stats.ttest_ind(group1, group2, equal_var=False)
# One-way ANOVA
f_stat, p_val = stats.f_oneway(g1, g2, g3)
# Chi-square test of independence
chi2, p_val, dof, expected = stats.chi2_contingency(contingency_table)
# OLS regression
model = smf.ols('outcome ~ predictor1 + C(group)', data=df).fit()
print(model.summary())
| Test | Effect size | Formula |
|---|---|---|
| t-test | Cohen's d | $d = (M_1 - M_2) / SD_\text{pooled}$ |
| ANOVA | $\eta^2$ or $\omega^2$ | $\eta^2 = SS_\text{effect} / SS_\text{total}$ |
| Chi-square | Cramér's V | $V = \sqrt{\chi^2 / (n \times \min(r-1,, c-1))}$ |
| Correlation | r | Pearson or Spearman |
| Regression | $R^2$ / $\beta$ | From model summary |
$t(62.4) = 3.21$, $p = .002$, $d = 0.80$, 95% CI [0.31, 1.28]
$F(2, 117) = 8.34$, $p < .001$, $\eta^2 = .13$, 95% CI [.04, .23]
$\chi^2(3,\, N = 200) = 12.56$, $p = .006$, $V = .25$
from statsmodels.stats.power import TTestIndPower
analysis = TTestIndPower()
n = analysis.solve_power(effect_size=0.5, alpha=0.05, power=0.80)
print(f"Required n per group: {n:.0f}")