Fixed-step discrete probability distribution

The Bernoulli distribution can be generalized to support more than two discrete states, where each state’s probability is generated by linearly interpolating between two given extremes, evenly dividing the difference from one extreme to the other. This article describes the properties of this discrete staircase distribution, together with a method to generate random samples from it in constant time.