Example 8 For any non-empty subset $A$ of $X_{n}$, define $f(A)$ as the sum of the smallest and largest elements in $A$. Find the average value of all $f(A)$ for $X_{n}$.
For a non-empty subset $A$ of $X_{n}$, let $A=\left\{a_{1}<a_{2}<\cdots<a_{i}\right\}$.
(1) If $a_{1}+a_{t}=n+1$, then $f(A)=n+1$.
(2) If $a_{1}+a_{t} \neq n+1$, then let
$$
A^{\prime}=\left\{n+1-a_{1}, n+1-a_{2}, \cdots, n+1-a_{t}\right\} \text {. }
$$

We now prove that $A \neq A^{\prime}$.
In fact, if $A=A^{\prime}$, then $a_{1}=n+1-a_{t}$, which means $a_{1}+a_{i}=n+1$, contradicting the assumption. Therefore, such subsets can be paired as $A$ and $A^{\prime}$. Clearly, $f(A)=a_{1}+a_{t}$, $f\left(A^{\prime}\right)=\left(n+1-a_{1}\right)+\left(n+1-a_{t}\right)$.
Thus, $f(A)+f\left(A^{\prime}\right)=2(n+1)$.
Therefore, $\frac{1}{2}\left(f(A)+f\left(A^{\prime}\right)\right)=n+1$.
In conclusion, the required average value is $n+1$.