Related
You are a manager at a large number factory. You want to show everyone your business is doing well, by showing randomly chosen samples. Unfortunately, your business is not doing that well. But luckily, you have a bit of ingenuity...
Write a program or function that when given an array of unique, positive numbers, which may include floats, returns a random number from the array, with bigger numbers having a higher probability of being chosen \$\left(a_n > a_m \implies P(a_n) > P(a_m)\right)\$, no two numbers being chosen with the same probability \$\left(P(a_n) \not = P(a_m)\right)\$, and all numbers having a non-zero chance of being chosen \$\left(P(a_n) \not = 0\right)\$. Anyways, this is code-golf, so shortest code wins!