Conditional Mass
1. **Problem statement:**
Chris tries to throw a ball into a basket with success probability $p=\frac{1}{3}$ each attempt, independent of others.
Define $X$ as the number of attempts until success or 6 if no success in first 5 attempts.
Define $Y=1$ if success in first 3 attempts, else $Y=0$.
We want the conditional mass function $p_{X|Y}(x|y)$ for $x=1,2,3,4,5,6$ and $y=0,1$.
2. **Key distributions and rules:**
- $X$ is a truncated geometric random variable with success probability $p=\frac{1}{3}$.
- Probability of success on attempt $k$ (for $k=1$ to 5) is $P(X=k) = (1-p)^{k-1}p$.
- Probability of no success in first 5 attempts is $P(X=6) = (1-p)^5$.
- $Y=1$ means success in attempts 1, 2, or 3, so $P(Y=1) = 1 - (1-p)^3$.
- $Y=0$ means no success in first 3 attempts, so $P(Y=0) = (1-p)^3$.
3. **Calculate unconditional probabilities $P(X=x)$:**
- For $x=1$ to 5:
$$P(X=x) = (1-p)^{x-1}p = \left(\frac{2}{3}\right)^{x-1} \cdot \frac{1}{3}$$
- For $x=6$:
$$P(X=6) = (1-p)^5 = \left(\frac{2}{3}\right)^5$$
4. **Calculate $P(Y=1)$ and $P(Y=0)$:**
- $$P(Y=1) = 1 - (1-p)^3 = 1 - \left(\frac{2}{3}\right)^3 = 1 - \frac{8}{27} = \frac{19}{27}$$
- $$P(Y=0) = (1-p)^3 = \left(\frac{2}{3}\right)^3 = \frac{8}{27}$$
5. **Calculate joint probabilities $P(X=x, Y=y)$:**
- For $Y=1$ (success in first 3 attempts):
- $x=1,2,3$ means success at attempt $x$:
$$P(X=x, Y=1) = P(X=x) = \left(\frac{2}{3}\right)^{x-1} \cdot \frac{1}{3}$$
- $x=4,5,6$ means success after 3rd attempt or no success in first 5 attempts, so $Y=0$ for these, thus:
$$P(X=x, Y=1) = 0 \quad \text{for } x=4,5,6$$
- For $Y=0$ (no success in first 3 attempts):
- $x=1,2,3$ means success in first 3 attempts, so $P(X=x, Y=0) = 0$
- $x=4,5$ means success at attempt 4 or 5, which is after 3 failures:
$$P(X=4, Y=0) = P(X=4) = \left(\frac{2}{3}\right)^3 \cdot \frac{1}{3} = \frac{8}{27} \cdot \frac{1}{3} = \frac{8}{81}$$
$$P(X=5, Y=0) = P(X=5) = \left(\frac{2}{3}\right)^4 \cdot \frac{1}{3} = \frac{16}{81} \cdot \frac{1}{3} = \frac{16}{243}$$
- $x=6$ means no success in first 5 attempts:
$$P(X=6, Y=0) = P(X=6) = \left(\frac{2}{3}\right)^5 = \frac{32}{243}$$
6. **Calculate conditional probabilities $p_{X|Y}(x|y) = \frac{P(X=x, Y=y)}{P(Y=y)}$:**
- For $Y=1$:
- $x=1$:
$$p_{X|Y}(1|1) = \frac{\left(\frac{2}{3}\right)^0 \cdot \frac{1}{3}}{\frac{19}{27}} = \frac{\frac{1}{3}}{\frac{19}{27}} = \frac{1}{3} \cdot \frac{27}{19} = \frac{9}{19}$$
- $x=2$:
$$p_{X|Y}(2|1) = \frac{\left(\frac{2}{3}\right)^1 \cdot \frac{1}{3}}{\frac{19}{27}} = \frac{\frac{2}{3} \cdot \frac{1}{3}}{\frac{19}{27}} = \frac{2}{9} \cdot \frac{27}{19} = \frac{6}{19}$$
- $x=3$:
$$p_{X|Y}(3|1) = \frac{\left(\frac{2}{3}\right)^2 \cdot \frac{1}{3}}{\frac{19}{27}} = \frac{\frac{4}{9} \cdot \frac{1}{3}}{\frac{19}{27}} = \frac{4}{27} \cdot \frac{27}{19} = \frac{4}{19}$$
- $x=4,5,6$:
$$p_{X|Y}(x|1) = 0$$
- For $Y=0$:
- $x=1,2,3$:
$$p_{X|Y}(x|0) = 0$$
- $x=4$:
$$p_{X|Y}(4|0) = \frac{\frac{8}{81}}{\frac{8}{27}} = \frac{8}{81} \cdot \frac{27}{8} = \frac{27}{81} = \frac{1}{3}$$
- $x=5$:
$$p_{X|Y}(5|0) = \frac{\frac{16}{243}}{\frac{8}{27}} = \frac{16}{243} \cdot \frac{27}{8} = \frac{432}{1944} = \frac{1}{4.5} = \frac{2}{9}$$
- $x=6$:
$$p_{X|Y}(6|0) = \frac{\frac{32}{243}}{\frac{8}{27}} = \frac{32}{243} \cdot \frac{27}{8} = \frac{864}{1944} = \frac{4}{9}$$
7. **Summary of conditional probabilities:**
| x | $p_{X|Y}(x|1)$ | $p_{X|Y}(x|0)$ |
|---|----------------|----------------|
| 1 | $\frac{9}{19}$ | 0 |
| 2 | $\frac{6}{19}$ | 0 |
| 3 | $\frac{4}{19}$ | 0 |
| 4 | 0 | $\frac{1}{3}$ |
| 5 | 0 | $\frac{2}{9}$ |
| 6 | 0 | $\frac{4}{9}$ |
These 12 values fully describe the conditional mass function $p_{X|Y}(x|y)$.
**Final answer:**
$$
p_{X|Y}(x|y) = \begin{cases}
\frac{9}{19}, \frac{6}{19}, \frac{4}{19}, 0, 0, 0 & \text{for } y=1, x=1..6 \\
0, 0, 0, \frac{1}{3}, \frac{2}{9}, \frac{4}{9} & \text{for } y=0, x=1..6
\end{cases}
$$