Biostatistics guides · worked examples
Choose the scientific question before the statistical test.
These guides start with study design and the intended inference, then show the data, calculation, graph and limits. Most include an editable Plotwright project that opens without creating an account.
Start with the design
Experimental units, dependence and uncertainty
Decide what is independent, what is paired and what an error bar represents before comparing P values.
Technical vs biological replicates: what is n?
See why repeated reads improve measurement without creating new independent treatment assignments.
Experimental design · t testsPaired vs unpaired: the same values, two answers
Use the data-collection design—not the observed correlation—to decide whether observations are paired.
Matched pairs · mean vs signed ranksPaired t test vs Wilcoxon: choose the estimand
Compare mean-difference and signed-rank inference on the same ten matched patients without using a normality-test shortcut.
Repeated measures · missing dataRM ANOVA vs mixed effects: what does one blank remove?
Follow one missing observation through complete-case ANOVA and a random-intercept model.
Independent groups · unequal variancesWelch vs Student's: choose the variance model
Learn why a preliminary variance-test P value should not select the final t-test variant.
Descriptive statistics · error barsSD vs SEM: spread is not precision
Separate observed sample variation from uncertainty in the estimated mean and its confidence interval.
Distribution diagnostics · sample sizeShapiro–Wilk and Q–Q plots: P > 0.05 is not proof
Follow the same mildly skewed sequence from n = 12 to n = 48 and interpret the test beside its visible departure.
Compare groups
Means, ranks, counts and comparison families
Match the null hypothesis and planned comparison family to the experiment instead of switching methods after inspecting results.
Mann–Whitney U is not automatically a median test
See what U counts and when a location-shift or median interpretation is defensible.
Categorical data · 2×2 tablesFisher exact vs chi-square: inspect expected counts
Separate the sampling design from the rule that determines whether an asymptotic approximation is credible.
Multiple groups · one-way ANOVAOne-way ANOVA and Tukey: the F test is only the start
Connect the omnibus question to simultaneous pairwise intervals and adjusted P values.
Multiple groups · means vs ranksANOVA vs Kruskal–Wallis: different null hypotheses
Do not let a normality pre-test silently replace a mean-based question with a rank-based one.
Multiple comparisons · control designsTukey vs Dunnett: every pair or each versus control?
Declare the comparison family before looking at which contrasts appear promising.
Factorial designs · two-way ANOVATwo-way ANOVA: interpret the interaction first
Use the interaction to decide how main effects and follow-up comparisons should be reported.
Relate measurements
Association, agreement and graph-first diagnosis
A strong coefficient can hide curvature, outliers or clinically important disagreement. Inspect the paired values and graph.
Pearson vs Spearman: linear or monotonic?
Choose the estimand from the scientific question and scatterplot, not from a normality-test shortcut.
Method comparison · agreementBland–Altman vs correlation: does high r mean agreement?
Contrast a high correlation with bias and limits of agreement from the original PEFR dataset.
Regression · data visualizationAnscombe's quartet: graph before you conclude
Four datasets share nearly identical summaries while their scatterplots reveal different structures.
Fit curves and make decisions
Potency, time-to-event outcomes and diagnostic thresholds
Connect the fitted summary to the observations and state what the curve cannot decide without biological or clinical judgment.
IC50 and EC50: fit the curve, not a line
Fit and inspect a four-parameter logistic curve, midpoint and profile-likelihood interval.
Survival analysis · censoringKaplan–Meier curves: events, censoring and risk sets
Follow each event and censor mark, then separate the curve from the log-rank comparison.
Diagnostic accuracy · ROCROC and AUC: discrimination is not a cutoff
Connect AUC to ranking and show how one threshold trades sensitivity against specificity.
How the library is built
Exact output is evidence—not automatic method selection.
Each guide names the design assumptions and evidence limits. The public validation page separately shows reference datasets, expected values and numerical tolerances used to check the engine.
Editable examples
Open the data, analysis and graph—not just the conclusion.
Public examples open locally in Plotwright without silently creating a cloud project. Change the values and inspect how the result moves.