cyberneticlibrary

Master statistical hypothesis testing

inferential-statisticsskillsetup L164
Tibsfox/gsd-skill-creator
What it does

Draw population conclusions from sample data via hypothesis tests and confidence intervals

Best for

Determining whether a sample observation generalizes to the population when descriptive stats alone insufficient

Inputs
  • · sample data
  • · population parameter to infer
  • · significance level (alpha, default 0.05)
Outputs
  • · confidence interval
  • · p-value
  • · test statistic
  • · power analysis
Requires
  • · scipy.stats
  • · numpy
  • · pandas
Preconditions

Random sample from population; data approximately normal (or large n for CLT); independence of observations

Failure modes

Type I error if alpha too high; Type II error if power too low; CLT fails on highly skewed small samples

Trust signals
  • · Covers z-tests, t-tests, chi-square, ANOVA
  • · Confidence interval interpretation correct
  • · Power analysis prevents underpowered studies