Sorry about the not-so-descriptive title. Here's the problem:
"There are $n$ coins arranged on a table, and $m$ of them are heads. You randomly select $p$ coins to remove one by one, but you forget whether the coins you removed were heads or tails. You then randomly pick a coin off of the table.
- What is the probability that you choose tails?
- Given that this coin is tails, what is the probability that at least one tail was removed among the first $p$?"
I've done some basic work but am largely stuck on this one. Here's what I have so far: The denominator for the final probability is going to be $n-p$. The probability of getting a tail, before accounting for coins falling off the table, is $\frac{n-m}{n}$.
My confusion in both parts is that the probability is changing at every step, isn't it? Each time one of the $p$ coins is removed, the probability of getting a tail isn't even just $\frac{n-m}{n-p}$, because the answer is entirely dependent on whether or not past coins removed were heads or tails.
I've not encountered a problem like this before. It seems to be a probability nested within a probability, and any help at all would be much appreciated.
Without loss of generality, lets say you do this by first randomly arranging the coins in a line then move the first $p$ coins off the end of the line to the side.
What is the probability that the $p+1$ coin in the line is a tail? Indeed, pick any place in line at random, then what is the probability that that coin is a tail?
What is one minus the conditional probability that none of the first $p$ coins were tails when given that that coin was a tails.
Fix a tail in one position, and there are $n-1\choose m$ ways of arranging the $n-1$ other coins.
Likewise, fix $p$ heads and one tail and there are there are how many ways of arranging the how many remaining coins?
The ratio of these is the complement, so what you want is
$$1-\left({n-p-1 \choose m-p}\middle/{n-1\choose m}\right)$$