A lot of my favorite projects involve some form of stats, ML, BI, analytics, finance, etc. I have always kept a personal reference library for quant-related papers, articles, ebooks, presentations but it's messy and incomplete so I recently decided to pull it together into a concise stats/ml guide for developers and project workers ( note: a complete guide to stats and ML is an oxymoron if ever there was one IMHO–i.e., it's not an easily 'completed' or 'converged' domain).
https://www.greenplex.ai/stats-and-ml-cheatsheet-for-dev-v5.html
To create this thing, I went back and forth between the best available models and was amazed by how many things they got wrong. It took 5 rounds of corrections to get the guide to the point where I had the nerve to run by a data science maven for one last check.
None of this stuff is rocket science but it is frickin' stats... a field that is never straightforward for some reason. Even after all the thrashing the guide may not be completely baked, but it's hopefully 'inside the confidence intervals' at this point. Let me know if you find glitches. 🤠
If at first you don't...
The creation of the stats/ml guide started when I asked Astra to pull my Jupyter notebooks and references into a concise document:
v1 Astra said:
"As requested, I pulled together your notes and content into a guide with search capabilities including 201 short tutorial items on popular statistics and machine learning methods. "
v2 Fable said:
"I read all 201 entries, recomputed every worked number, and read the plotted data back out of the charts that quote specific values (for example Shapiro–Wilk W = 0.52 and the Beta(7,4) interval). I rendered 16 entries to check visually for correctness.
What is wrong or misleading [ continues... ]"
v3 Astra said:
"I reviewed the v2 guide and found factual errors in the test chooser, several definitions, and four interactive demos. The full review gives line numbers, corrections, and examples. I left the original tutorial file untouched.
I’d fix these first because they can change what a learner concludes from real data."
v4 Fable said:
"Version 4 is saved beside the others as stats-ml-guide-v4.html; v2 and v3 are untouched. None of the Data Science comments failed to make sense: I checked their arithmetic and counter-examples, all hold, and all 45 findings and corrections are applied.
In headless Chrome, each of their four widget test cases now gives the corrected result: [continues... ]"
(after yet another critique)
v5 Fable said:
"I agree with every point in the metric table critique, so all of it is applied; stats-and-ml-cheatsheet-for-dev-v5.html is updated in place. I checked each claim before accepting it and found nothing to push back on. The table was mine, and its “rare class → F1” row contradicted the F1 entry I had already corrected in v4.
What changed in the metric table
The table is now grouped by what is being judged, as the critique’s closing paragraph proposes: a yes/no decision, a ranking, a probability, or a numeric forecast.
- Error costs: a new first row leads with expected cost at the operating threshold (cost per false alarm × false alarms + cost per miss × misses). Precision and recall are now quoted “at a stated recall, false-positive rate or workload”, not as stand-ins for cost.
- F1: the rule is now “one summary of precision and recall, weighted equally”, with both reported separately. It says equal weighting is a choice that a rare class does not imply, and mentions Fβ.
- ROC and AUC: now “ROC curve, summarized by ROC AUC”, with a separate row for the precision–recall curve when positives are rare and are the focus.
- Calibration: now “a calibration curve alongside a scoring rule”, with the note that giving everyone the overall rate is calibrated and useless. The cross-entropy row is labelled “Log loss (cross-entropy) or the Brier score”.
- MAE, RMSE, MAPE: “typical miss” is gone. RMSE asks you to check that squared-error weighting matches real costs. MAPE is conditional on actual values being positive and well away from zero.
- Accuracy and R-squared: accuracy is reported with prevalence and the majority-class baseline. R-squared notes it can be negative on held-out data.
Changes beyond the table
- Threshold widget: it now has two cost sliders, and shows the error cost at the current threshold and the cheapest threshold for those costs. This makes the expected-cost row something you can try.
- New entry, Precision–Recall Curve: it shows the same model at 20% and 2% prevalence. The ROC AUC is 0.92 in both, but 57% of flags are real in the first and 10% in the second. The glossary is now 236 terms.
- AUC entry renamed to “ROC AUC (Area Under the ROC Curve)”; searching “auc” still finds it.
- Ten entry lines reworded to match: accuracy, precision, recall, F1, ROC AUC, ROC curve, calibration, MAE, RMSE, MAPE and R-squared.
Where I went slightly further than the critique
The critique suggests “ROC and/or precision–recall curves”. I made that a rule: ROC when both classes matter, precision–recall when the positive class is rare and is the focus. If the team prefers the looser wording, that is a one-line change.
Fβ and the Brier score are named in the table but have no entry of their own."



