8. Among the 9 natural numbers $1,2,3, \cdots, 9$, if 3 numbers are randomly selected, let $x$ be the number of pairs of adjacent numbers among these 3 numbers (for example: if the 3 numbers selected are $1,2,3$, then there are two pairs of adjacent numbers, 1,2 and 2,3, at this time the value of $x$ is 2), then the mathematical expectation of $x$ is
Solve for $x=0,1,2$, and $P(x=0)=\frac{C_{7}^{3}}{C_{9}^{3}}=\frac{5}{12}, P(x=1)=\frac{6 \times 2+5 \times 6}{C_{9}^{3}}=\frac{1}{2}, P(x=2)=\frac{7}{C_{9}^{3}}=\frac{1}{12}$. Therefore, $E(x)=\frac{1}{2}+\frac{1}{6}=\frac{2}{3}$.