Probability and statistics practice problems

20 problems · 0 solved

Probability describes uncertainty, and statistics tells you whether a difference you see is real or just noise. In ML both show up everywhere, from sampling tokens to deciding if a new model actually beats the old one. Running an eval without statistics is like judging a cricket player on a single ball. These problems turn common statistical tools into code. You will compute the KL divergence between diagonal Gaussians, compare token distributions with Jensen-Shannon divergence, sample categories with the inverse CDF, track the mean and variance of a stream in one pass, put a bootstrap confidence interval on an eval score, compute Spearman correlation with tied ranks, compare eval runs with Welch's t-test, run a two-proportion z-test, update a pass rate with a Beta prior, evaluate a multivariate Gaussian log-density with a Cholesky factor, and control false discoveries across many comparisons. Start with the Easy problems on divergences and streaming statistics. Then do bootstrap intervals and the hypothesis tests, and finish with the Gaussian log-density and false discovery control. Interviewers often ask how you would decide if an improvement is significant, and this knowledge keeps teams from shipping changes that only looked better by chance.

Easy 8

Medium 9

Hard 3

Related topics

All practice problems