Programming, Statistics.
obtain the level 5rarity item. From the rules above, we can create the PDF of each roll as follows. where x denotes the item’s rarity level. From the PDF above, we can create the Inverse CDF to assign generated random numbers that are uniformly distributed in (0,1) to each rarity level as follows.