Fix 0 < p < 1 and suppose there is a coin that obtains a head with probability p. We flip the coin 17 times and get a total of 5 heads. Given this information, what is the chance that 3 of those heads occurred in the first 10 flips?

P (3 heads in first 10 flips /5 heads in 17 flips) = P (3 heads in first 10 flips and 5 heads in 17 flips) / P (5 heads in 17 flips) ? I am confused, is this how I am supposed to approach this model?

  • $\begingroup$ Exactly $3$ or at least $3$? $\endgroup$ – joriki Jul 21 '15 at 3:38
  • $\begingroup$ exactly 3 heads $\endgroup$ – Dee Chantelle Jul 21 '15 at 3:39

Given the information that you got exactly $5$ heads, binomial is not really needed anymore. The $5$ heads are equally likely to be any $5$ of the $17$ flips. You can use the hypergeometric distribution: think of the first $10$ flips as a sample (without replacement) from the $17$ flips, of which $5$ are heads and $12$ are tails.

  • $\begingroup$ Then would the answer be 5 C 3 * 12 C 2 / 17 C 10 ? $\endgroup$ – Dee Chantelle Jul 21 '15 at 3:43

As Robert said, you don't need the binomial distribution since you are given the condition.   But anyways... here's what happens when you use it.

Let $X_{10}$ be the count of successes in the first 10, and $X_7$ be the count in the last seven.   These will be independently binomially distributed, $\mathcal{Bin}(10,p)$ and $\mathcal{Bin}(7,p)$ respectively.   Of course, their sum will also have a binomial distribution, $\mathcal{Bin}(17,p)$; though not independently.

So thus, we want:

$$\begin{align} \mathsf P(X_{10}=3 \cap X_7=2 \mid X_{10}+X_7=5) & = \dfrac{\mathsf P(X_{10}=3)\mathsf P(X_7=2)}{\mathsf P(X_{10}+X_7=5)} \\[2ex] & = \dfrac{\dbinom{10}{3}p^3(1-p)^{7}\;\dbinom{7}{2}p^2(1-p)^5}{\dbinom{17}{5}p^5(1-p)^{12}} \\[2ex] & = \dfrac{\dbinom{10}{3}\dbinom{7}{2}}{\dbinom{17}{5}} \end{align}$$

Notice how the success/failure probability terms ($p$, $(1-p)$) so nicely cancel out to give us, not very surprisingly: the probability that a sample of size $10$ will contain $3$ successes when sampled without replacement from a population of size $17$ containing $5$ successes.   (Reference: Hypergeometric distribution).

That is all.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.