Probability of n heads in a uniform distribution

271 Views Asked by At

Suppose that $P$ is the probability of landing heads up and also the $P$ variable is a uniform distribution in the interval $[0,1]$.

The question is how to find the probability of first $n$ heads in our total flips?

Suppose $n=5$:

The probability of 5 heads is $p^5$. But I don't know how to find the numeric value of this probability:

Should I do something like?

$$value = \int_{0}^{1}p^5dp $$

2

There are 2 best solutions below

0
On BEST ANSWER

To avoid confusion in notation I will write $Y$ for $P$

A general rule is:$$\mathbb EZ=\mathbb E[\mathbb E[Z\mid Y]]$$Applying this rule on $Z=\mathbf1_{X=5}$ we find:

$$P(X=5)=\mathbb E\mathbf1_{X=5}=\mathbb E[\mathbb E[\mathbf1_{X=5}\mid Y]]=\mathbb E[P(X=5\mid Y)]=\mathbb EY^5=\int_0^1y^5dy=\frac16$$

0
On

Yes.

The technical term for the distribution for $p$ is "prior." Likely somewhere in your textbook (or lecture notes) there must be a mention of "exchangeable" experiments or "conditionally i.i.d." random variables or something else to the effect. The idea, simply put, here is that before flipping the coin, the physical propensity $p$ of coming up heads is drawn from the uniform distribution, it sticks thereafter, and you have, conditional on that particular value of $p$, i.i.d. flips. So $$ P(X_1=X_2=\cdots=X_n=\text{H})= \int_0^1(P(X_i=\text{H}|p))^nf(p)dp = \int_0^1p^ndp $$ as you said, where $f(p)$ equals 1, $0\le p\le 1$, representing a uniform distribution.