Statistical Analysis
This section is a working reference for the statistics a bioinformatician actually uses: choosing the right test, checking its assumptions, reading the output with an effect size, and correcting for the thousands of tests genomics throws at you. It covers classical and applied statistics, from descriptive summaries through survival analysis. Statistical learning, such as cross-validation and regularization, is a separate section.
How to use this section
Section titled “How to use this section”- R and Python together. Every guide shows both languages in synced tabs. Pick a language once and the whole page follows your choice, and remembers it across pages.
- Every result is real. All code runs in containers in a companion repository. The numbers and figures you see come from those runs, never from memory. Where a method exists in only one language, such as the Fine-Gray model, only that language is shown.
- Each guide teaches the decision. When to use a method, its assumptions, how to read the output, and where it fails.
Foundations
Section titled “Foundations”Descriptive Statistics & DistributionsSummaries, histograms, Q-Q plots, and count data.
Checking AssumptionsNormality and equal variance before a parametric test.
Sample Size & PowerHow many samples you need, worked out before you collect data.
Comparing groups
Section titled “Comparing groups”Two Groups: t-test & WilcoxonCompare two groups, parametric and rank-based.
Multiple Groups: ANOVA & Kruskal-WallisThree or more groups, with Tukey post-hoc.
Categorical Data: Chi-square & FisherAssociation between two categories.
Relationships & regression
Section titled “Relationships & regression”CorrelationPearson and Spearman, with a scatter.
Simple Linear RegressionFit a line, read coefficients, check residuals.
Multiple Regression & DiagnosticsAdjust for confounders and interpret.
Logistic RegressionBinary outcomes and odds ratios.
ROC Curves & AUCDiagnostic accuracy of a score.
Mixed-Effects & Repeated MeasuresClustered and longitudinal data with random effects.
Survival & clinical trials
Section titled “Survival & clinical trials”Kaplan-Meier & Log-rankSurvival curves with censored data.
Cox Proportional HazardsHazard ratios from a survival model.
Competing Risks & Fine-GrayCumulative incidence when events compete.
High-throughput statistics
Section titled “High-throughput statistics”Multiple Testing CorrectionBonferroni and FDR across thousands of tests.
Principal Component AnalysisReduce dimensions and see sample structure.