Positive expected value means I should take the bet every time?
Only if you can survive the variance. Repeated multiplicative bets are governed by the geometric mean, not the arithmetic one:
\[g = \prod_i (1 + r_i)^{p_i}\]A bet with positive arithmetic expectation can still have \(g < 1\), which means certain ruin over enough repetitions. That is the whole content of the Kelly criterion.
How long should a random id be to avoid collisions?
Use the birthday approximation: collisions become likely around \(\sqrt{N}\) draws from a space of size \(N\). For a 64-bit id that is about 4 billion items, for 128 bits it is beyond anything you will generate. The practical answer for most systems is 128 random bits and no coordination.
A test is 99% accurate and I tested positive. Am I 99% likely to be ill?
No, and the gap is the whole point of the rule:
\[P(D \mid +) = \frac{P(+ \mid D)\,P(D)}{P(+ \mid D)P(D) + P(+ \mid \lnot D)P(\lnot D)}\]With a prevalence \(P(D) = 0.001\) and both error rates at 1%, this gives roughly \(0.09\). Nine percent, not ninety-nine, because false positives are drawn from a pool a thousand times larger.
What would you skip entirely?
The reporting layer, until something forces it. It is the part that feels productive to build and the part nobody opens twice.