Example 8: Xiao Wang and Xiao Li are classmates and also neighbors. In every month, they always make several trips to the same small store to buy sugar. Assuming the price of sugar is variable, and their purchasing methods are different: Xiao Wang always buys 1 kilogram of sugar each time; Xiao Li only brings 1 yuan to buy sugar each time, regardless of the amount. Which of the two purchasing methods is more economical?
Analysis: Let the average price per kilogram of sugar purchased by Xiao Wang and Xiao Li be $x, y$, respectively, then $x=\frac{a_{1}+a_{2}+\cdots+a_{n}}{n}$, $y=\frac{n}{\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}}$, comparing the sizes of $x, y$ will suffice, where $a_{i}$ is the unit price of each purchase.

Solution: Assume Xiao Wang and Xiao Li purchased sugar a total of $n(n>1$, and $n \in \mathbf{N})$ times, and let the unit price of each purchase be $a_{i}$ (yuan/kg), then $i=1,2, \cdots, n$, and $a_{i}>0$. Xiao Wang buys 1 kilogram of sugar each time, spending a total of $a_{1}+a_{2}+\cdots+a_{n}$ yuan, purchasing $n$ kilograms of sugar, with the average price per kilogram of sugar being $x=\frac{a_{1}+a_{2}+\cdots+a_{n}}{n}$.

Xiao Li spends 1 yuan each time to buy sugar, spending a total of $n$ yuan, and the amount of sugar purchased each time is $\frac{1}{a_{1}}, \frac{1}{a_{2}}, \cdots$, $\frac{1}{a_{n}}$ kilograms, with the average price per kilogram of sugar being $y=\frac{n}{\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}}$.
Thus, the problem is reduced to comparing the sizes of $x, y$.
$$
\begin{array}{l}
a_{1}+a_{2}+\cdots+a_{n} \geqslant n \sqrt[n]{a_{1} a_{2} \cdots a_{n}}, \\
\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}} \geqslant n \sqrt[n]{\frac{1}{a_{1}} \cdot \frac{1}{a_{2}} \cdots \frac{1}{a_{n}}}=\frac{n}{\sqrt[n]{a_{1} a_{2} \cdots a_{n}}} .
\end{array}
$$

Multiplying the above two inequalities, we get $\left(a_{1}+a_{2}+\cdots+a_{n}\right)\left(\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}\right) \geqslant n^{2}$,
$$
\text { i.e., } \frac{a_{1}+a_{2}+\cdots+a_{n}}{n} \geqslant \frac{n}{\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}} \text {. }
$$
$x \geqslant y$, thus, unless the price remains constant $\left(a_{1}=a_{2}=\cdots=a_{n}\right)$, Xiao Li's purchasing method is always more cost-effective than Xiao Wang's.