kelly betting explained: formula, examples, and safe implementation