Example 4 Given a positive integer $n>1$. Let $a_{1}, a_{2}, \cdots, a_{n}$ be a permutation of $1,2, \cdots, n$. If $i<j$ and $a_{i}<a_{j}$, then $(a_{i}, a_{j})$ is called an ordered pair. $X$ is the number of ordered pairs in $a_{1}, a_{2}, \cdots, a_{n}$. Try to find $E(X)$.
(2020, University of Science and Technology of China Innovative Class Preliminary Exam)
【Analysis】The definition of symbols is the same as in Example 1.
$$
\begin{array}{l}
\text { By } n!E(X)=\sum_{\sigma \in S_{n}} \sum_{\substack{1 \leqslant i<j \leqslant n \\
\sigma(i)<\sigma(j)}} 1 \\
=\sum_{1 \leqslant i<j \leqslant n} \sum_{\substack{\sigma \in S_{n}(j) \\
\sigma(i)<\sigma(j)}} 1=\sum_{1 \leqslant i<j \leqslant n}(n-2)!\mathrm{C}_{n}^{2} \\
=n!\frac{n(n-1)}{4} \\
\Rightarrow E(X)=\frac{n(n-1)}{4} .
\end{array}
$$

It is worth noting that by establishing a one-to-one correspondence, the expectation can be more directly derived as $\frac{\mathrm{C}_{n}^{2}}{2}$. Readers who are interested can think about this.