Probability of having increasing even numbers, decreasing odds

combinationscombinatoricspermutationsprobabilityrandom

I am given a set of 9 numbers from 1 to 9 and I am asked what is the probability to randomly arrange them such that the even numbers are in increasing order while the odd numbers are in decreasing order (e.g. 246897531, or 927456381).

The first nine natural numbers, 1,2,….9 are arranged randomly. What is the probability that the resulting number, when read from left to right, is such that the even numbers are increasing order and the odd numbers in decreasing order?

I tried taking it by cases but it was a very tedious task. Then I tried going step by step by taking the possibilities of having the first even number (2) or the first odd number (9), and then the second, third, etc…

However I'm not getting the correct probability which is: 0.0003472.

Best Answer

There is only one way to arrange the even numbers in increasing order. Similarly there is only one way to arrange the odd numbers in decreasing order.

Choose which four of the nine positions in our final number will be occupied by the even numbers. The remaining positions will be occupied by the odd numbers. Further, within those positions the corresponding numbers must appear in the predescribed order.

We get then a final count of $\binom{9}{4}$ different valid numbers where all even digits are in ascending order and all odd digits are in descending order. This is out of the $9!$ different equally likely arrangements of the digits that we are choosing from.

Thus, taking the ratio, our probability is:

$$\dfrac{\binom{9}{4}}{9!} \approx 0.0003472\dots$$