I'm in the middle of a multi-step problem which seeks to figure out, given a box of $k+1$ coins each of which has equal probability of being chosen for flipping, and each of which has a probability of heads $=\frac{i}{k}$, for $i=1,2,...,k$, and given that the first $n$ flips have been heads, what is the probability that the next $m$ flips will also be heads.
Right now, I have $A_i$ denoting the event that the $i$th coin is selected, $E$ the event that the first $n$ flips were heads. I have also defined $M$ as the event that the next $m$ flips after the first $n$ will also be heads. I need to prove that:
$$P(M|E)=\sum_{i=0}^kP(M|A_i\cap E)P(A_i|E)$$
I know that if $A_i$ are events that form a partition in a space $\Omega$, and if $E$ is an event, then we have:
$$P(E)=\sum_{i=0}^nP(E|A_i)(P(A_i))$$
I have tried plugging in $M|E$ into this, which yields:
$$P(M|E)=\sum_{i=0}^kP((M|E)|A_i)P(A_i)$$
Using the fact that $(A|B)|C=A|B\cap C$, we get:
$$P(M|E)=\sum_{i=0}^kP(M| E\cap A_i)P(A_i)$$
However, I can't seem to fix the probability on the end of the RHS. Perhaps I'm plugging in my values incorrectly into the theorem, but I can't convince myself why what I am doing is incorrect. Any suggestions would be helpful. Cheers.