Consider an experiment having three possible outcomes that occur with probabilities $p_1$, $p_2$, and $p_3$, respectively. Suppose n independent trials of the experiment are conducted and let $X_i$ denote the number of times the $i^{th}$ outcome occurs.
- What is the density of $X_1 + X_2?$
- Find $P(X_2 = y \space|\space X_1 + X_2 = z), y = 0, 1, 2, ... ,z$?
I have solved the first question correctly, but there is something wrong with my solution for the second part below; I have explained my approach for the second part.
My approach:
$P(X_2 = y \space|\space X_1 + X_2 = z) = \frac{P(X_1 + X_2 = z \space| \space X_2 = y) \space P(X_2 = y)} {P(X_1 + X_2 = z)} = \frac{P(X_1 = z-y\space| \space X_2 = y) \space P(X_2 = y)} {P(X_1 + X_2 = z)}$
Now, RHS terms:
$P(X_1 = z-y\space| \space X_2 = y) = {n-y \choose z-y} p_1^{z-y}p_3^{n-z}$
$P(X_2 = y) = {n \choose y} p_2^{y}(1-p_2)^{n-y}$
$P(X_1 + X_2 = z) = {n \choose z} (p_1+p_2)^{z}(p_3)^{n-z}$ (This term was calculated in the first part of the question and hence its verified.)
Substituting these terms in the equation, we get:
$P(X_2 = y \space|\space X_1 + X_2 = z) = \frac{{n-y \choose z-y} p_1^{z-y}p_3^{n-z} {n \choose y} p_2^{y}(1-p_2)^{n-y}}{{n \choose z} (p_1+p_2)^{z}(p_3)^{n-z}}$
On simplifying the RHS, we get:
$RHS = {z \choose y} (\frac{p_1}{p_1+p_2})^{z-y} (\frac{p_2}{p_1+p_2})^y (1-p_2)^{n-y}$
but the answer given in the book is: ${z \choose y} (\frac{p_1}{p_1+p_2})^{z-y} (\frac{p_2}{p_1+p_2})^y $
I have an extra term $(1-p_2)^{n-y}$ in my answer; I have rechecked it multiple times, and it doesn't seem like a calculation mistake. Am I making any conceptual mistakes?
PS.: The question is from Introduction to Probability Theory, Hoel Port Stone, Chapter-3 Q22.
Okay, it seems the first term of the RHS in the original equation is wrong, as I can't use $p_1$ and $p_3$ because now the sample space has reduced; changing it to the following gives the correct answer:
$P(X_1 = z-y\space| \space X_2 = y) = {n-y \choose z-y} (\frac{p_1}{p_1+p_3})^{z-y} (\frac{p_3}{p_1+p_3})^{n-z}$
Right?
Also, can we directly state the answer using some argument along the lines of conditional probability?
Seeing the second question, I would have written the answer as a binomial with $P(X_2 = y \mid X_1 + X_2 = z) = {z\choose y}\left(\frac{p_2}{p_1+p_2}\right)^y\left(\frac{p_1}{p_1+p_2}\right)^{z-y}$ essentially the answer in the book
This can be seen as a simplification of $P(X_2 = y \mid X_1 + X_2 = z) = \dfrac{P(X_2 = y , X_1 = z-y)}{P(X_1+X_2=z)}= \dfrac{\frac{n!}{(z-y)!y!(n-z)!} p_1^{z-y}p_2^y p_3^{n-z}}{\frac{n!}{z!(n-z)!} (p_1+p_2)^z p_3^{n-z}}$