Consider 10 independent tosses of a biased coin with a probability of heads, $p$.
question (4d): find the probability there are 5 heads in first 8 tosses and 3 heads in last 5 tosses.
I managed to obtain the correct answer using a brute force method. The solution (can be found at http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-041sc-probabilistic-systems-analysis-and-applied-probability-fall-2013/unit-i/lecture-5/MIT6_041SCF13_assn04_sol.pdf) gives the same method for finding the solution.
As I was working through this problem, however, I was really unhappy because the solution could not be generalized. What if the problem had asked-- consider 1000 independent tosses; find the probability there are 75 tosses in the first 700 tosses and 95 heads in the last 800 tosses. The problem retains a similar flavor, but the computation now becomes nearly impossible.
Just out of curiosity, but is there a way to solve such a problem, aside from getting a computer to compute the solution? If so, could you offer a general sketch?
Suppose you toss a coin $n$ times, with each toss being an independent Bernoulli trial with probability $p$ of landing heads. Let $X_1, X_2$ be random variables that count the number of heads observed in the first $m_1$ tosses and the last $m_2$ tosses; hence, you are interested in the probability that you observe $X_1 = k_1$ heads in the first $m_1$ tosses, and $X_2 = k_2$ heads in the last $m_2$ tosses, where $0 \le k_i \le m_i \le n$ for $i = 1,2$. Then the overlap in this situation consists of $r = m_1 + m_2 - n$ coin tosses. Let $X_3$ be the random variable that counts the number of heads observed among these coins tosses. Given that we observe $X_3 = j$, the conditional probability $$\Pr[(X_1 = k_1) \cap (X_2 = k_2) \mid X_3 = j]$$ is equivalent to $$\Pr[X_1 - X_3 = k_1 - j]\Pr[X_2 - X_3 = k_2 - j],$$ because although $X_1$ and $X_2$ are not independent, $X_1 - X_3$ and $X_2 - X_3$ are, because they have no overlap. The desired probability is therefore $$\begin{align*} P[(X_1 &= k_1) \cap (X_2 = k_2)] = \sum_{j=0}^r \Pr[X_1 - X_3 = k_1 - j]\Pr[X_2 - X_3 = k_2 - j]\Pr[X_3 = j] \\ &= \sum_{j=0}^r \binom{n - m_2}{k_1 - j}p^{k_1 - j}(1-p)^{n-m_2 - k_1+j} \binom{n - m_1}{k_2 - j}p^{k_2 - j}(1-p)^{n-m_1-k_2+j} \binom{r}{j} p^j (1-p)^{r-j} \\ &= \sum_{j=0}^r \binom{n - m_2}{k_1 - j}\binom{n - m_1}{k_2 - j}\binom{r}{j} p^{k_1 + k_2 - j}(1-p)^{n-k_1-k_2+j}.\end{align*}$$ This sum does have a closed form in terms of hypergeometric functions but a simpler form is not known to me. For small overlap $r$, it is not too tedious to compute. For $n-m_1$, $n-m_2$, $r$ roughly equal in size, and $n$ very large, this sum will have the maximum number of terms and will be far too difficult to evaluate by hand.