# For which values of $p$ are events $A$ and $B$ independent?

Flip a coin three times. Assume the probability of tails is $p$ and that successive flips are independent. Let $A$ be the event that we have exactly one tails among the first two coin flips and $B$ the event that we have exactly one tails among the last two coin flips. For which values of $p$ are events $A$ and $B$ independent?

I know that $P(AB)=(1/4)=(1/2)*(1/2)=P(A)P(B)$ when $p=(1/2)$ for heads and tails. Does changing the value of $p$ make a set of unequally likely outcomes, leading to the fact you can't just count the number of events?

Given $p$ we compute: $$P(A)=2p(1-p)=P(B)$$

Now, let's compute $P(A|B)$:

Given $B$ we know that the last two tosses were $HT$ or $TH$, with equal probability. If they were $HT$ then $A$ would require that the first toss was a $T$, a probability $p$ event. If they were $TH$ then $A$ would require that the first toss was an $H$, a probability $1-p$ event. Thus $$P(A|B)=\frac 12\,p+\frac 12 (1-p)= \frac 12$$.

Independence requires that $P(A|B)=P(A)$ and it is easily seen that this entails $p=\frac 12$.

• So you are just generalizing the events A and B for any given p, then simply using the definition of independence, thanks. Commented Sep 30, 2015 at 23:42

By definition, $A$ and $B$ are independent when $P(A|B)=A$ and $P(B|A)=B$.

There are $2\cdot2=4$ ways we have exactly one tails among the first two coin flips, out of a total $\frac18$ ways to flip the coins, which gives us $A=\frac48=\frac12$. By symmetry, we know that $B=\frac12$ as well. Thus, in order for $P(A|B)=A$ and $P(B|A)=B$, $p$ must be equal to $\boxed{\frac12}$.