Normal Distribution Primitives
Implement the standard normal CDF and its inverse used throughout hypothesis testing and confidence intervals.
Build proportion tests, sample sizing, multiple-testing corrections, difference-in-differences, and synthetic control.
Every source step is its own lesson with intuition, concepts, correctly rendered MathJax mathematics, implementation, tests, mistakes, and a checkpoint.
Implement the standard normal CDF and its inverse used throughout hypothesis testing and confidence intervals.
Compute pooled and unpooled standard errors, the z-statistic, p-values, and confidence intervals for comparing two proportions.
Determine required per-variant sample size and evaluate statistical power for planned experiments.
Use a chi-square check to detect broken randomization or traffic allocation bugs.
Apply Bonferroni and Benjamini-Hochberg procedures to control error rates across many hypotheses.
Estimate treatment effects from pre/post outcomes via simple differences and an OLS regression with an interaction term.
Fit non-negative donor weights to build a synthetic counterfactual and read off the post-period treatment effect.
Combine the primary metric outcome with guardrail metrics into a final ship/no-ship decision.