[Tex/LaTex] How to typeset converge in probability in lyx or latex

lyx

I'm a new user for lyx, and I am wondering how you can put the p above that right arrow?

Best Answer

You can insert the LaTeX command overset:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
a \overset{p}{\to} b
\]
\end{document}

Just insert it as red text.