Question regarding mixed Bayes rule

38 Views Asked by At

Suppose we have a PDF $f_p(p)=pe^p$ for $p \in [0,1]$. Here, $p$ is the probability that a coin toss is heads. We can then define the following mixed Bayes rule:

$$P(T=h) = \frac{f_p(p)P(T=h|P=p)}{f_{P|T=h}(p|T=h)}$$

Where:

$$f_p(p) = pe^p$$

$$P(T=h|P=p) = p$$

$$f_{P|T=h}(p|T=h) = \frac{f_P(p)}{P(T=h)} = \frac{pe^p}{P(T=h)}$$

Thus, plugging it back into equation 1 we have:

$$P(T=h) = \frac{pe^ppP(T=h)}{pe^p} = pP(T=h)$$

Why does an extra factor of $p$ appear here? Did I misunderstand something in the mixed Bayes rule?