Adam has a bag with $5$ balls that are either black or white.
(i) Suppose that the bag consists of $2$ black balls and $3$ white balls. Adam draws balls from the bag with replacement until he has drawn at least one ball of each color. Let $X$ be the number of draws. Find the probability mass function (pmf) of $X$.
(ii) Suppose that the number of black balls is a random variable $Y$ which can take values $2, 3$ or $4$ with equal probability. If Adam draws $5$ balls with replacement and finds that $3$ of the draws are black and $2$ are white, what is the conditional probability that $Y = 4$?
I am practicing for an exam and found this question. I have tried solving it but I have been unsuccessful and no solutions are available. Any assistance is much appreciated.
The basic idea of probability is counting. You need to list out the ways something can happen, at least for the first few steps, and then look for the pattern.
For the first question, imagine that you draw the first ball. There are two possibilities, black or white. Suppose it is black. Working from there, what is the distribution? Then, suppose it is white, and do it again. You already stated that you guessed it was geometric; that is correct. Work out the first few cases. Given that the first draw is black, what is the probability that $X = 2$? That $X = 3$? and so on.
The first branch, black is drawn first, has probability $\frac{2}{5}$. Given that, $P(X=2) = P($white$) = \frac{3}{5}.$
Given black first, $P(X=3) = P($second was black and third was white$)$. That is $\frac{2}{5} \cdot \frac{3}{5}$. How exactly this spells out as geometric depends on how your class or textbook defines the geometric. For our purposes, $P(X=n$ and first draw was black$) = \frac{2}{5} \cdot \big({\frac{2}{5}}\big)^{n-2} \cdot \frac{3}{5}$
Likewise if the first draw is white, $P(X=n $and first draw was white$) = \frac{3}{5} \cdot {\frac{3}{5}}^{n-2} \cdot \frac{2}{5}$
And $P(X=n) = P(X=n$ and first was black$) + P(X=n$ and first was white).
For the second question, I think we need to assume that the number of black balls is chosen randomly once and then stays fixed. The goal is $P(Y=4| 3$black, $2$ white). A conditional probability follows Bayes' rule: $$P(A|B) = P(B|A)\cdot \frac{P(A)}{P(B)}$$ Since there are only five draws you can map out the probabilities and total up each of them for the formula. Let $A$ be "$Y=4$" and let $B$ be "$3$ black, $2$ white".