Any ideas how to make these description in the last line prettier without losing information? I mean it will be fine the way it is, but it is quite suprising what nice things you sometimes are unaware of (like "for" loops in tikz).
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
\bar{X}_n&=\frac{1}{n}\sum_{i=1}^n X_i
= \frac{n-1}{n}\frac{1}{n-1}\sum_{i=1}^{n-1}X_i +\frac{1}{n}X_n\\
&=\left(1-\frac{1}{n}\right)\bar{X}_{n-1}+\frac{1}{n}X_n \\
&= \bar{X}_{n-1}
+ \underbracket[1pt]{\frac{1}{n}}_{\text{``learning rate''}}
\underbracket[1pt]{(X_n - \bar{X}_{n-1})}_{\text{``direction''}}
\end{align*}
\end{document}



\strutdo? – Felix B. Mar 19 '19 at 21:24\strutadds an invisible small rule, to increase the distance of the text from the underbracket, so the two texts do not overlap. – Bernard Mar 19 '19 at 21:26