2. A company produces a certain product in the amount of $x_{1}$ in January, $x_{2}$ in February, $\ldots, x_{12}$ in December. The average production of the product from the beginning of the year is calculated as follows:

$x_{1}=x_{1}, \quad \bar{x}_{2}=\frac{1}{2}\left(x_{1}+x_{2}\right), \quad \bar{x}_{3}=\frac{1}{3}\left(x_{1}+x_{2}+x_{3}\right), \quad \ldots, \quad \bar{x}_{12}=\frac{1}{12}\left(x_{1}+x_{2}+\ldots+x_{12}\right)$.

It is known that $\bar{x}_{k}x_{k}$ for $k$ from 7 to 12. In which month was the average production of the product from the beginning of the year the highest?
Solution. Note that

\[
\begin{aligned}
\bar{x}_{k+1} & =\frac{1}{k+1}\left(x_{1}+x_{2}+\ldots+x_{k+1}\right)=\frac{1}{k+1}\left(k \bar{x}_{k}+x_{k+1}\right) \\
x_{k+1}-\bar{x}_{k+1} & =k\left(\bar{x}_{k+1}-\bar{x}_{k}\right)
\end{aligned}
\]

In total, we have found that the average production increases (decreases) when the production in the month is higher (lower) than the corresponding average. Therefore, the maximum was in the sixth month.