Assign probability to each element of a list descendingly and make them sum as 1

120 Views Asked by At

So basically, I have a list

l=['A','B','C','D']

I want to assign each of element in list l a probability descendingly and the sum of the probability should be 1.

For example,

l=['A','B','C','D']
prob=[0.5,0.25,0.15,0.1]

I am not sure what distribution should I use? My desired one should make the descending sharp that the first element in the list has very high probability and the last has very low probability.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

There are many possible approaches you might take.

One possibility would be to use 'geometric descent' where there is some common ratio to get from one probability to the next. For instance if you took a ratio of $\frac{1}{3}$ to get from one probability to the next, and if you let $a=P(A)$, then:

$a+\frac{1}{3}a+\frac{1}{9}a+\frac{1}{27}a=1$

Then $a=\frac{27}{40}$.

And consequently, $P(B), P(C), P(D)$ are $\frac{9}{40}$, $\frac{3}{40}$, $\frac{1}{40}$ respectively.

If you choose a smaller ratio, the descent will be steeper.