Given a uniform random draw and a vector of probabilities, returns the 1-based integer index of the selected category.
draw_categorical(luck, probs)Integer: 1-based index of the selected category.
Numeric between 0 and 1 (inclusive). A uniform random draw.
Numeric vector of probabilities. Will be normalized to sum to 1 internally. All values must be >= 0.