Joint Pmf Analysis 0219Cf
1. **Problem statement:** Given the joint pmf of discrete random variables $X$ and $Y$ as
$$\begin{array}{c|ccc|c}
X \backslash Y & 0 & 1 & 3 & f_1(x) \\
\hline
0 & \frac{1}{8} & \frac{2}{8} & \frac{1}{8} & \frac{4}{8} \\
1 & \frac{2}{8} & \frac{1}{8} & \frac{1}{8} & \frac{4}{8} \\
\hline
f_2(y) & \frac{3}{8} & \frac{3}{8} & \frac{2}{8} & 1
\end{array}$$
Find:
(i) $E(Y|X=x)$
(ii) $\mathrm{Var}(Y|X=x)$
(iii) $\mathrm{Cov}(X,Y)$
(iv) Correlation coefficient $\rho_{XY}$
(v) Are $X$ and $Y$ independent?
---
2. **Recall formulas:**
- Conditional expectation: $E(Y|X=x) = \sum_y y P(Y=y|X=x)$
- Conditional variance: $\mathrm{Var}(Y|X=x) = E(Y^2|X=x) - [E(Y|X=x)]^2$
- Covariance: $\mathrm{Cov}(X,Y) = E(XY) - E(X)E(Y)$
- Correlation coefficient: $\rho_{XY} = \frac{\mathrm{Cov}(X,Y)}{\sqrt{\mathrm{Var}(X)\mathrm{Var}(Y)}}$
- Independence: $X$ and $Y$ are independent if $P(X=x,Y=y) = P(X=x)P(Y=y)$ for all $x,y$.
---
3. **Calculate conditional pmfs:**
- For $X=0$, $P(Y=y|X=0) = \frac{P(X=0,Y=y)}{P(X=0)}$:
- $P(Y=0|0) = \frac{1/8}{4/8} = \frac{1}{4}$
- $P(Y=1|0) = \frac{2/8}{4/8} = \frac{1}{2}$
- $P(Y=3|0) = \frac{1/8}{4/8} = \frac{1}{4}$
- For $X=1$, similarly:
- $P(Y=0|1) = \frac{2/8}{4/8} = \frac{1}{2}$
- $P(Y=1|1) = \frac{1/8}{4/8} = \frac{1}{4}$
- $P(Y=3|1) = \frac{1/8}{4/8} = \frac{1}{4}$
---
4. **Compute $E(Y|X=x)$:**
- $E(Y|0) = 0 \times \frac{1}{4} + 1 \times \frac{1}{2} + 3 \times \frac{1}{4} = 0 + \frac{1}{2} + \frac{3}{4} = \frac{5}{4} = 1.25$
- $E(Y|1) = 0 \times \frac{1}{2} + 1 \times \frac{1}{4} + 3 \times \frac{1}{4} = 0 + \frac{1}{4} + \frac{3}{4} = 1$
---
5. **Compute $E(Y^2|X=x)$ for variance:**
- For $X=0$:
$$E(Y^2|0) = 0^2 \times \frac{1}{4} + 1^2 \times \frac{1}{2} + 3^2 \times \frac{1}{4} = 0 + \frac{1}{2} + \frac{9}{4} = \frac{11}{4} = 2.75$$
- For $X=1$:
$$E(Y^2|1) = 0^2 \times \frac{1}{2} + 1^2 \times \frac{1}{4} + 3^2 \times \frac{1}{4} = 0 + \frac{1}{4} + \frac{9}{4} = \frac{10}{4} = 2.5$$
---
6. **Calculate conditional variances:**
- $\mathrm{Var}(Y|0) = E(Y^2|0) - [E(Y|0)]^2 = 2.75 - (1.25)^2 = 2.75 - 1.5625 = 1.1875$
- $\mathrm{Var}(Y|1) = 2.5 - (1)^2 = 2.5 - 1 = 1.5$
---
7. **Calculate marginal expectations:**
- $E(X) = 0 \times \frac{4}{8} + 1 \times \frac{4}{8} = 0 + 0.5 = 0.5$
- $E(Y) = 0 \times \frac{3}{8} + 1 \times \frac{3}{8} + 3 \times \frac{2}{8} = 0 + \frac{3}{8} + \frac{6}{8} = \frac{9}{8} = 1.125$
---
8. **Calculate $E(XY)$:**
Sum over all $x,y$ of $x y P(X=x,Y=y)$:
- For $x=0$: $0 \times (0 \times \frac{1}{8} + 1 \times \frac{2}{8} + 3 \times \frac{1}{8}) = 0$
- For $x=1$: $1 \times (0 \times \frac{2}{8} + 1 \times \frac{1}{8} + 3 \times \frac{1}{8}) = 1 \times (0 + \frac{1}{8} + \frac{3}{8}) = \frac{4}{8} = 0.5$
So, $E(XY) = 0 + 0.5 = 0.5$
---
9. **Calculate covariance:**
$$\mathrm{Cov}(X,Y) = E(XY) - E(X)E(Y) = 0.5 - 0.5 \times 1.125 = 0.5 - 0.5625 = -0.0625$$
---
10. **Calculate variances of $X$ and $Y$:**
- $E(X^2) = 0^2 \times \frac{4}{8} + 1^2 \times \frac{4}{8} = 0 + 0.5 = 0.5$
- $\mathrm{Var}(X) = E(X^2) - [E(X)]^2 = 0.5 - (0.5)^2 = 0.5 - 0.25 = 0.25$
- $E(Y^2) = 0^2 \times \frac{3}{8} + 1^2 \times \frac{3}{8} + 3^2 \times \frac{2}{8} = 0 + \frac{3}{8} + \frac{18}{8} = \frac{21}{8} = 2.625$
- $\mathrm{Var}(Y) = 2.625 - (1.125)^2 = 2.625 - 1.265625 = 1.359375$
---
11. **Calculate correlation coefficient:**
$$\rho_{XY} = \frac{-0.0625}{\sqrt{0.25 \times 1.359375}} = \frac{-0.0625}{\sqrt{0.33984375}} = \frac{-0.0625}{0.583} \approx -0.107$$
---
12. **Check independence:**
Check if $P(X=x,Y=y) = P(X=x)P(Y=y)$ for all $x,y$.
- For example, $P(0,0) = \frac{1}{8} = 0.125$ but $P(0)P(0) = \frac{4}{8} \times \frac{3}{8} = 0.1875 \neq 0.125$
Since this fails, $X$ and $Y$ are **not independent**.
---
**Final answers:**
- (i) $E(Y|X=0) = 1.25$, $E(Y|X=1) = 1$
- (ii) $\mathrm{Var}(Y|X=0) = 1.1875$, $\mathrm{Var}(Y|X=1) = 1.5$
- (iii) $\mathrm{Cov}(X,Y) = -0.0625$
- (iv) $\rho_{XY} \approx -0.107$
- (v) $X$ and $Y$ are not independent because $P(X,Y) \neq P(X)P(Y)$ for some $(x,y)$.