Assume that we have a coin that the probability of head in this coin is $p^2$, which $p$ itself is generated by a uniform distribution on $[0,1]$.
If we flip the coin and see head, then what is the probability of $p<\frac{1}{2}$?
I personally could compute the probability of head, which is:
$\int_{0}^{1} P(\text{head comes}\mid P=p).f_{P} (p ) d_{p}= \int_{0}^{1} p^2 d_{p} = \frac{1}{3}$
But I can not find the probability of the question...
Let me try. We have: $P(H / p=p) = p^2 $
By Bayes Theorem: $$P(p=p / H) = \frac{P(H/p=p) P(p=p)}{P(H)}$$ Considering the probability P(p=p) as uniform, we have: $$P(p=p / H) = \frac{p^2 . 1}{\int{P(H / p=p)P(p=p)dp}}$$
$$P(p=p / H) = \frac{p^2 . 1}{\int{p^2dp}}$$
$$P(p=p / H) = 3p^2$$
So, if I'm not mistaken: $$P(p \le \frac{1}{2}) = \int_0^\frac{1}{2}{3p^2dp} $$
$$P(p \le \frac{1}{2}) = \frac{1}{8} $$