# Find the a posteriori probability? (Ch-4,Exercise-21, Probability, Random Variables and Stochastic Processes-Papoulis)

The probability of heads of a random coin is a random variable p uniform in the interval (0, 1). (a) Find P{O.3 <= P <= O.7}. (b) The coin is tossed 10 times and heads shows 6 times. Find the a posteriori probability that p is between 0.3 and 0.7.

a) Got P{O.3 <= P <= O.7} = 0.4

b) For the second part, the prob. of getting 6 heads in 10 tosses acc. to me should be (10 6) (1/2)^6 (1/2)^4, and suppose that is event B. P(A/B) = P(AB)/P(B).

Here what would be P(AB)(A is event of interest). Am i doing something wrong, is my approach correct

For part b) you've incorrectly taken $$\ p=\frac{1}{2}\$$. If $$\ A\$$ is the event $$\ \left\{ 0.3\le p\le0.7\right\}\$$, and $$\ B\$$ the event that $$6$$ out $$10$$ tosses come up heads, then \begin{align} P\left(A\cap B\right) &= \int_{0.3}^{0.7} P\left(B\left\vert\, p=x\right.\right)dx\ ,\ \text{and}\\ P\left(B\right) &= \int_0^1 P\left(B\left\vert\, p=x\right.\right)dx\ , \end{align} where $$\ P\left(B\left\vert\, p=x\right.\right)={10\choose 6}x^6(1-x)^4\$$.