7. Let $n$ be a given integer greater than 2. There are $n$ indistinguishable bags, the $k$-th bag contains $k$ red balls and $n-k$ white balls $(k=1,2, \cdots, n)$. From each bag, 3 balls are drawn consecutively (without replacement), and the third ball drawn from each bag is placed into a new bag. The mathematical expectation (mean) of the number of white balls in the new bag is $\qquad$ (Li Qian, problem contributor)
7. $\frac{n-1}{2}$.

Let the number of white balls in the new bag be denoted as $X$, and for $k \in\{1,2, \cdots, n\}$, set
$$
X_{k}=\left\{\begin{array}{ll}
1, & \text { if the } 3 \text {rd ball drawn from the } k \text {th bag is white, } \\
0, & \text { if the } 3 \text {rd ball drawn from the } k \text {th bag is red. }
\end{array}\right.
$$

Thus, $X=X_{1}+X_{2}+\cdots+X_{n}$.
By the fairness of the drawing, the probability that the third ball drawn from the $k$th bag is white is $p_{k}=\frac{n-k}{n}$, hence
$$
E\left(X_{k}\right)=1 \cdot p_{k}+0 \cdot\left(1-p_{k}\right)=\frac{n-k}{n} .
$$

By the linearity of expectation, we have
$$
E(X)=E\left(X_{1}+X_{2}+\cdots+X_{n}\right)=\sum_{k=1}^{n} E\left(X_{n}\right)=\sum_{k=1}^{n} \frac{n-k}{n}=\frac{1}{n} \sum_{l=0}^{n-1} l=\frac{n-1}{2} .
$$