Joe has two coins, $A$ and $B$, in front of him. The probability of Heads at each toss is $p=.5$ for coin $A$ and $q = .9$ for coin $B$. Joe chooses one of the two coins at random with both choices equally likely. He then continues with $5$ tosses of the chosen coin; these tosses are conditionally independent given the choice of the coin. Let $H_i$ be the event that Joe's $i$th coin toss resulted in heads and $N$ the number of heads in Joe's coin tosses
a) For $i$ in the set $\{0,1,...,5\}$, define the probability mass function.
$$\frac{1}{2}{5 \choose i} p^5 + \frac{1}{2}{5 \choose i} q^i(1-q)^{n-i}$$
b) Are the events $H_1$ and $N = 5$ independent?
Yes. If I know $N = 5$, then I know $H_1$ is heads.
How do you break down a problem like this?
I'm new to this community. If there is a better way to phrase this, please let me know.
Let $A$ be the event that coin $A$ is chosen. Let $B$ be the event that coin $B$ is chosen. Let $H$ be the event that heads occurs. Let $N$ be the number of heads in Joe's coin tosses.
Since the coin tosses are conditionally independent given the choice of the coin, once a coin is picked, the coins follow a binomial distribution. Hence, the probability that exactly $i$ of the first $5$ tosses are heads is \begin{align*} \Pr(N = i) & = \Pr(A)\binom{5}{i}[\Pr(H \mid A)]^i[1 - \Pr(H \mid A)]^{5 - i} + \Pr(B)\binom{5}{i}[\Pr(H \mid B)]^i[1 - \Pr(H \mid B)]^{5 - i}\\ & = \frac{1}{2}\binom{5}{i}\left(\frac{1}{2}\right)^i\left(\frac{1}{2}\right)^{5 - i} + \frac{1}{2}\binom{5}{i}\left(\frac{9}{10}\right)^i\left(\frac{1}{10}\right)^{5 - i}\\ & = \frac{1}{2}\binom{5}{i}\left[\frac{1}{2}^5 + \left(\frac{9}{10}\right)^i\left(\frac{1}{10}\right)^{5 - i}\right]\\ & = \frac{1}{2}\binom{5}{i}[p^5 + q^i(1 - q)^{5 - i}] \end{align*} so your answer would be correct if you replaced $n$ by $5$.
Two events $E$ and $F$ are said to be independent if $\Pr(E \cap F) = \Pr(E)\Pr(F)$.
Since $$\Pr(F \mid E) = \frac{\Pr(E \cap F)}{\Pr(E)}$$ saying two events are independent is equivalent to saying that $\Pr(F \mid E) = \Pr(F)$ since independence implies $$\Pr(F \mid E) = \frac{Pr(E \cap F)}{\Pr(E)} = \frac{\Pr(E)\Pr(F)}{\Pr(E)} = \Pr(F)$$
Let $H_1$ be the event that Joe's first coin toss is heads.
You said that you know that if $N = 5$, then $H_1$ must have occurred. This implies the dependence of the event $N = 5$ on $H_1$.
To prove dependence, we must show that $\Pr(N = 5 \mid H_1) \neq \Pr(N = 5)$.
Observe that if event $H_1$ occurs, event $N = 5$ occurs if the last four tosses are also heads. Hence, $Pr(N = 5 \mid H_1)$ is the probability that the last four tosses are heads, while $Pr(N = 5)$ is the probability that all five tosses are heads. Since $\Pr(H_1) < 1$, this means that $\Pr(N = 5 \mid H_1) > \Pr(N = 5)$. Hence, the events $N = 5$ and $H_1$ are dependent.