# Invert probabilities (lowest value to have the highest probability in a set)

I have a set of values $$(v_1,v_2,..,v_n)$$ positive integers. I want to assign probabilities depending on the value, with the lowest having the highest probability. The sum of probabilities should be $$1$$ for the whole set.

I can do it the other way around if I find $$t = \sum v_i$$ then $$p(v_i) = \frac{v_i}{t}$$ but the lowest value has the least probability.

For any finite set $$\mathcal V = \{v_1, v_2, \ldots v_n\}$$, you simply need to define $$p_i = g(v_i)$$ where $$g(\cdot)$$ is any function such that

• $$g(v) > 0$$ for all $$v \in \mathcal V$$
• $$x < y$$ implies that $$g(x) > g(y)$$ (monotonicity)

Then you can define the probability mass function $$p(v) = \begin{cases} \frac{v_i}{\sum_{u\in\mathcal V}g(u)}, & v = v_i \in \mathcal V \\ 0, & v \notin \mathcal V \end{cases}$$

Two simple functions with this property are $$g_1(v) = q^v, \ q \in (0,1)$$ and $$g_2(v) = v^{-s}, \ s > 0.$$ For $$\mathcal V = \mathbb N$$, these functions correspond to the geometric distribution and Zipfs law (when $$s > 1$$) respectively. The process described above truncates the distribution to a finite set of values.

Also note that $$\mathcal V$$ can be countably infinite by requiring

• $$\sum_{v\in\mathcal V}g(v) < \infty$$

As a concrete example, suppose that the set of positive integers is $$\{3, 5, 8, 16\}$$ and you choose Zipfs law with $$s=1$$. Then $$p_t \propto \begin{cases} 1/3, &t=1 \\ 1/5, &t=2 \\ 1/8, &t=3 \\ 1/16, &t=4 \end{cases}$$ which gives probabilities $$P(V=v) = \begin{cases} 0.4624, &v=3 \\ 0.2775, &v=5 \\ 0.1734, &v=8 \\ 0.0867, &v=16 \\ 0, & \text{otherwise} \end{cases}$$

• can the geometric distribution method be used on a set of random integers like the example for Zipfs law? – yolo expectz Nov 8 '20 at 20:19
• Yes of course, you just need to select a parameter $p$. I can't give any advice on that without more information. In the example above, choosing $p=1/2$ gives probabilities $0.7804, 0.1951, 0.0244, 0.0001$. – knrumsey Nov 8 '20 at 20:38