Probability of 3 random numbers being ascending or descending in a specific range

358 Views Asked by At

Imagine picking 3 random numbers between 0 to K one after another, all integers. What is the probability of these 3 numbers to be ascending or descending?

For example in a range of 0-100, these three numbers n1=12, n2=34 and n3=73 are considered as ascending and n1=98, n2=32, n3=28 are considered as descending.

What about the probability of being ascending or descending of picking 4 random numbers or n random numbers one by one in a specific range?

1

There are 1 best solutions below

0
On BEST ANSWER

You need to integrate (resp. sum) the mass function on the set $\{x_1 < x_2 < x_3\}$ (change $<$ to $\leq$ if ties are allowed).

For the continuous case on $[a, b]$ you have density $f(x_1, x_2, x_3) = \frac{1}{(b-a)^3} \mathbf{1}_{[a,b]^3}(x_1,x_2,x_3).$ Then $$ P(X_1 < X_2 < X_3) = \int\limits_a^b dx_1 \int\limits_{x_1}^b dx_2 \int\limits_{x_2}^b dx_3\ f(x_1,x_2,x_3) = \dfrac{1}{6}. $$

Another, easier approach perhaps, is to use symmetries. This works better for continuous variables than for discrete. In the continuous case, when you have a density $f(x_1, \ldots, x_p)$ and you consider a subspace $\mathrm{H}$ of dimension $\leq p-1$ then $P((X_1, \ldots, X_p) \in H) = 0.$ In particular, ties have probability zero in the continuous case. Then, the three variables $X_1, X_2, X_3$ can be order and since they are all identically distributed and independent, any ordering of the three have the same probability. Being six such orderings, you reach that $P(X_1 < X_2 < X_3) = \dfrac{1}{6}.$