Code Katas and Evidence
Use the offline lab package and guided sequence. Its six learner functions replace open-ended coding prompts with executable contracts and an independent public checker.
| Kata | Before coding | What the check catches |
|---|---|---|
posterior | Expected count table | Reversed conditioning and zero-probability evidence |
retry_summary | Terminal paths or indicators | Counting unattempted requests and final backoffs |
defect_pmf | Uniform unordered samples | Replacement mistakes, impossible counts, empty sample |
wilson_interval | Supplied formula and endpoint cases | Wald substitution, out-of-range endpoints, roundoff at zero |
exact_coverage | Weighted sum over possible counts | Unweighted averaging of counts and hardcoded .95 |
standardized_mean | Target workload distribution | Different comparison weights and missing groups |
Work in starter.py; run python check.py --module starter. Use the reference implementation after attempting a derivation, and record any consultation. The simulation harness is supplied so learners can focus on models rather than CSV plumbing.
For a debugging exercise, temporarily replace your retry expected-attempt count with the maximum allowed count. Predict the failing case, run the checker, then repair the change. Repeat with a binomial PMF substituted for the without-replacement experiment. Explain why a test of the mean alone would miss the latter error.
Completion includes the written assessment, reproducible reports for two seeds, and a changed transfer case. Code checks cannot establish that a production population is independent or that its workload matches the fixture.