# What is the probability distribution of the following random variable?

Let $A^n$ and $B^n$ be independent random variables taking values in $\{0, 1\}^n$. Let $Y^n = A^n + B^n$ (Hence, taking values in $\{0, 1, 2\}^n$). How can we express the distribution of $Y^n$ in the most compact fashion ?
A simple example for $n = 1$ is the following:
$P_A = P_B = (\frac{1}{2}, \frac{1}{2})$. Then $P_Y = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$ on $(0, 1, 2)$.
for $n = 2$, $P_{A^2} = P_{B^2} = (\frac{1}{4}, \frac{1}{4},\frac{1}{4}, \frac{1}{4})$ on $(00, 01, 10, 11)$. Then $P_{Y^2} = (\frac{1}{16}, \frac{1}{8},\frac{1}{16}, \frac{1}{8},\frac{1}{4}, \frac{1}{8},\frac{1}{16}, \frac{1}{8},\frac{1}{16})$ on $(00, 01, 02, 10, 11, 12, 20, 21, 22).$
And in general, if $P_{A^n}$ and $P_{B^n}$ are uniform on $\{0, 1\}^n$, then $P_{Y^n}(y^n) = 2^{(\# \text{ number of 1's in }y^n) -2n}$.

$$\Pr\{(Y_1, Y_2, \ldots, Y_n) = (y_1, y_2, \ldots, y_n)\} = \prod_{i=1}^n \Pr\{Y_i = y_i\} = \frac {1} {4^n}\prod_{i=1}^n\binom {2} {y_i}, y_i \in \{0, 1, 2\}$$
• I am asking about the general case where $\{Y_i\}_{i=1}^{n}$ are not independent. This can easily follow from the fact that $\{A_i\}_{i=1}^{n}$ are not necessarily mutually independent. (as well as $\{B_i\}_{i=1}^{n}$). – Hussein Hammoud Jun 26 '16 at 23:22