Alice and Bob probability combinations

combinatoricsprobability

Alice and Bob each have a coin. A coin can be flipped to give heads or tails with probability $p_{A,h}$ and $p_{A,t}$, respectively for Alice and $p_{B,h}$ and $p_{B,t}$ for Bob. We have $p_{A,h}=1-p_{A,t}$ and similarly for Bob. Alice flips her coin $a$ times and Bob flips his coin $b$ times. How many ways can at least one head be obtained across both Alice and Bob's experiments?

The easy answer is to count the ways that a head is not generated over both Alice and Bob's flips. This is $(1-p_{A,h})^a\times (1-p_{B,h})^b$, and then take one minus this.

However, I am interested in counting all of the ways, given $a$ and $b$ that do lead to at least one head during the flips. For instance, if $a=b=1$, then, both could land on heads, $p_{A,h}p_{B,h}$, or only one could land on heads, $p_{A,h}p_{B,t}$ or $p_{A,t}p_{B,h}$. We then have

$$
1 – p_{A,t}p_{B,t}=p_{A,h}p_{B,h} + p_{A,h}p_{B,t}+p_{A,t}p_{B,h}
$$

How can I generalise this for arbitrary $a$ and $b$?

Best Answer

More formally, the problem is solved by $$\begin{aligned}P(\{H_A\geq 1\}\cup\{H_B\geq 1\})&=P(\{H_A=0\}^c\cup\{H_B=0\}^c)=\\&=1-P(\{H_A=0\}\cap\{H_B=0\})=\\&=1-P(H_A=0)P(H_B=0) \end{aligned}$$ because of independence, where $$P(H_A=0)=\binom{a}{0}p_{A,H}^0p_{A,T}^a=p_{A,T}^a$$ $$P(H_B=0)=\binom{b}{0}p_{B,H}^0p_{B,T}^b=p_{B,T}^b$$ We have $$1=\sum_{j=0}^{a}\sum_{k=0}^b\binom{a}{j}\binom{b}{k}p_{A,H}^jp_{A,T}^{a-j}p_{B,H}^kp_{B,T}^{b-k}$$ therefore $$\begin{aligned}P(\{H_A\geq 1\}\cup\{H_B\geq 1\})&=\sum_{j=0}^{a}\sum_{k=0}^b\binom{a}{j}\binom{b}{k}p_{A,H}^jp_{A,T}^{a-j}p_{B,H}^kp_{B,T}^{b-k}-p_{A,T}^ap_{B,T}^b\end{aligned}$$