Problem: we produced biased coins and the probability of Heads has the following PDF: $f_{P}(p)=\left\{ \begin{array}{ll} pe^{p}, & p\in[0,1],\\ 0, & p\notin[0,1] \end{array}\right.$
We know that $\Pr(H_1)=e-2$, where the event $H_1$ - Heads in the first toss of a coin. It's found using total probability law.
We also know that $f_{P|H_{1}}(p|H_{1})=\frac{p^{2}e^{p}}{e-2}$ (the Bayes' rule was to the rescue here)
Finally, we need to find $\Pr(H_2|H_1)$. The book suggests that
$\Pr(H_2|H_1)=\int_{0}^{1}\Pr(H_2|P=p)f_{P|H_{1}}dp$
I understand every component of this formula and the limits of integration are obvious. But what is that formula? I can't recoginze either the definition of conditional probability here or a Bayes' variant or the total probability law.
What is that here?