27.9. (New York, 81). The sequence ( $i_{1} ; i_{2} ; \ldots ; i_{n}$ ) is composed of the first $n$ natural numbers arranged in a random order. Find the average number of inversions (disorders) in this sequence, where an inversion is defined as each pair of numbers $i_{j}>i_{k}$, for which $j<k$.
27.9. Let's divide all rows into pairs of mutually "inverse" rows: $\left(i_{1} ; \ldots ; i_{n}\right)$ and $\left(i_{n} ; \ldots ; i_{1}\right)$. Any two natural numbers $m>l$, not exceeding $n$, form an inversion in exactly one of the rows in each such pair. Consequently, in each such pair of rows, there are exactly $n(n-1) / 2$ inversions (as many as there are ways to choose the specified numbers $m, l$ in the row). Therefore, the average number of inversions for each pair of rows is $n(n-1) / 4$. This value is also equal to the average number of inversions over all rows.